Connect Edge behind a proxy — Debian-based
Running ThingsBoard Edge behind a proxy server means that its gRPC connection to the ThingsBoard server (port 7070 by default, set by CLOUD_RPC_PORT) is routed through the proxy instead of going directly to the internet. Edge opens this connection through the proxy with an HTTP CONNECT tunnel. Only this connection uses the proxy: devices, the Edge UI, and the local database are not affected, so there is no bypass list to configure.
This setup is common in restricted network environments where direct internet access is deliberately blocked. Proxies also add a security layer by filtering and monitoring outbound traffic, and can cache resources to reduce bandwidth usage.
Prerequisites
Section titled “Prerequisites”- An HTTP proxy server that allows
CONNECTto the ThingsBoard server’s gRPC port, with its host, port, and credentials if required. - ThingsBoard Edge must be installed and running.
Step 1. Modify the configuration file
Section titled “Step 1. Modify the configuration file”Edit /etc/tb-edge/conf/tb-edge.conf to enable the proxy:
sudo tee -a /etc/tb-edge/conf/tb-edge.conf > /dev/null <<EOL#Enable the proxyexport CLOUD_RPC_PROXY_ENABLED=true
#Set the proxy server host and portexport CLOUD_RPC_PROXY_HOST="proxy_host"export CLOUD_RPC_PROXY_PORT="proxy_port"EOLReplace proxy_host and proxy_port with your proxy’s hostname and port.
Configure authentication
Section titled “Configure authentication”If your proxy requires authentication, append the following to the same file:
export CLOUD_RPC_PROXY_USERNAME="proxy_username"export CLOUD_RPC_PROXY_PASSWORD="proxy_password"Replace proxy_username and proxy_password with your actual credentials.
Verify the changes
Section titled “Verify the changes”cat /etc/tb-edge/conf/tb-edge.confConfirm that CLOUD_RPC_PROXY_ENABLED, CLOUD_RPC_PROXY_HOST, and CLOUD_RPC_PROXY_PORT appear with the correct values.
Step 2. Restart ThingsBoard Edge
Section titled “Step 2. Restart ThingsBoard Edge”sudo service tb-edge restartOnce restarted, open the Edge UI at http://localhost:8080 and log in with your tenant credentials. Go to Edge → Status and confirm the Status field shows Connected — this confirms Edge is reaching the server through the proxy.
Troubleshooting
Section titled “Troubleshooting”Check Edge logs for errors:
cat /var/log/tb-edge/tb-edge.log | grep ERRORTest connectivity through the proxy:
curl -x http://proxy_host:proxy_port https://your_tb_cloud_urlConfirm the proxy host is reachable:
ping proxy_hosttraceroute proxy_hostWas this helpful?