🧰 ThingsBoard FRP HTTPS Setup Summary - telemetryinsights/thingsboard GitHub Wiki

✅ Environment Overview

  • Raspberry Pi 5 running frpc to tunnel ThingsBoard ports
  • AWS EC2 (Ubuntu) instance running frps, NGINX, and HTTPS termination
  • FRP Version: 0.54.0
  • Public domains:
    • thingsboard.telemetryinsights.com
    • thingsboard.awetimation.com
    • thingsboard.homemations.com

🔧 Raspberry Pi (Client) Setup

Paths

  • FRP client binary: /home/ubuntu/frp_0.54.0_linux_arm64/frpc
  • Config file: /home/ubuntu/frp_0.54.0_linux_arm64/frpc.json

frpc.json

{
  "serverAddr": "3.214.48.74",
  "serverPort": 7000,
  "proxies": [
    {
      "name": "thingsboard-web",
      "type": "tcp",
      "localIP": "127.0.0.1",
      "localPort": 8080,
      "remotePort": 8080
    },
    {
      "name": "mqtt",
      "type": "tcp",
      "localIP": "127.0.0.1",
      "localPort": 1883,
      "remotePort": 1883
    },
    {
      "name": "mqtts",
      "type": "tcp",
      "localIP": "127.0.0.1",
      "localPort": 8883,
      "remotePort": 8883
    }
  ]
}

frpc systemd Service

[Unit]
Description=FRP Client Service
After=network.target

[Service]
Type=simple
Restart=always
RestartSec=5
ExecStart=/home/ubuntu/frp_0.54.0_linux_arm64/frpc -c /home/ubuntu/frp_0.54.0_linux_arm64/frpc.json

[Install]
WantedBy=multi-user.target

Enable & start:

sudo systemctl enable frpc
sudo systemctl start frpc

☁️ AWS EC2 (Server) Setup

Paths

  • FRP server binary: /home/ubuntu/frp_0.54.0_linux_amd64/frps
  • Config file: /home/ubuntu/frp_0.54.0_linux_amd64/frps.ini

frps.ini

[common]
bind_port = 7000
dashboard_port = 7500
dashboard_user = admin
dashboard_pwd = admin

frps systemd Service

[Unit]
Description=FRP Server Service
After=network.target

[Service]
Type=simple
Restart=always
RestartSec=5
ExecStart=/home/ubuntu/frp_0.54.0_linux_amd64/frps -c /home/ubuntu/frp_0.54.0_linux_amd64/frps.ini

[Install]
WantedBy=multi-user.target

Enable & start:

sudo systemctl enable frps
sudo systemctl start frps

🌐 NGINX + HTTPS

/etc/nginx/sites-available/thingsboard

server {
    listen 80;
    server_name thingsboard.telemetryinsights.com thingsboard.awetimation.com thingsboard.homemations.com;
    return 301 https://$host$request_uri;
}

server {
    listen 443 ssl;
    server_name thingsboard.telemetryinsights.com thingsboard.awetimation.com thingsboard.homemations.com;

    ssl_certificate /etc/letsencrypt/live/thingsboard.telemetryinsights.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/thingsboard.telemetryinsights.com/privkey.pem;
    include /etc/letsencrypt/options-ssl-nginx.conf;
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

    location / {
        proxy_pass http://localhost:8080;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}

Certbot

sudo apt install certbot python3-certbot-nginx
sudo certbot --nginx -d thingsboard.telemetryinsights.com -d thingsboard.awetimation.com -d thingsboard.homemations.com

Auto-renewal is scheduled by Certbot.