Skip to content

Instantly share code, notes, and snippets.

@drthilina
Forked from mfalkvidd/nginx-thingsboard
Created July 9, 2025 03:40
Show Gist options
  • Select an option

  • Save drthilina/9c26e9477f1f6dc4abb883cf4b9ad89d to your computer and use it in GitHub Desktop.

Select an option

Save drthilina/9c26e9477f1f6dc4abb883cf4b9ad89d to your computer and use it in GitHub Desktop.

Revisions

  1. @mfalkvidd mfalkvidd revised this gist Mar 25, 2018. 1 changed file with 1 addition and 4 deletions.
    5 changes: 1 addition & 4 deletions nginx-thingsboard
    Original file line number Diff line number Diff line change
    @@ -23,12 +23,9 @@ server {

    location / {
    proxy_pass http://LOCAL_THINGSGBOARD_IP_OR_DOMAN:8080;
    }

    location /api/ws {
    proxy_pass http://LOCAL_THINGSGBOARD_IP_OR_DOMAN:8080/api/ws;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";
    proxy_set_header Host $host;
    }
    }
  2. @mfalkvidd mfalkvidd renamed this gist Jan 22, 2018. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. @mfalkvidd mfalkvidd created this gist Jan 22, 2018.
    34 changes: 34 additions & 0 deletions thingsboard
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,34 @@
    server {
    listen 80;
    server_name EXTERNAL_THINGSBOARD_DOMAIN.com;

    if ($scheme != "https") {
    return 301 https://$host$request_uri;
    } # managed by Certbot
    }

    server {
    listen 443 ssl;
    server_name EXTERNAL_THINGSBOARD_DOMAIN.com;
    ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; # managed by Certbot
    ssl_session_cache shared:SSL:1m;
    ssl_session_timeout 1d;
    ssl_protocols TLSv1.2;
    ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256';
    ssl_prefer_server_ciphers on;
    ssl_stapling on;
    ssl_stapling_verify on;


    location / {
    proxy_pass http://LOCAL_THINGSGBOARD_IP_OR_DOMAN:8080;
    }

    location /api/ws {
    proxy_pass http://LOCAL_THINGSGBOARD_IP_OR_DOMAN:8080/api/ws;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";
    }
    }