How to change configuration
ThingsBoard Edge is configured via environment variables. Set them in the configuration file and restart the service — no YAML editing or config file merging is required when upgrading.
The full list of Edge-specific cloud.* environment variables is in Configuration reference. For transport, database, queue, and caching variables, see the other pages in this Reference section.
Linux (Debian / RHEL)
Section titled “Linux (Debian / RHEL)”Set environment variables in the Edge configuration file:
sudo nano /etc/tb-edge/conf/tb-edge.confAdd or edit variables using export syntax:
export CLOUD_RPC_HOST=my-thingsboard-server.example.comexport CLOUD_ROUTING_KEY=your-edge-keyexport CLOUD_ROUTING_SECRET=your-edge-secretRestart the service to apply changes:
sudo systemctl restart tb-edgeDocker
Section titled “Docker”Set environment variables in your Docker Compose file under the tb-edge service:
services: tb-edge: image: thingsboard/tb-edge:latest environment: CLOUD_RPC_HOST: my-thingsboard-server.example.com CLOUD_ROUTING_KEY: your-edge-key CLOUD_ROUTING_SECRET: your-edge-secret SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/tb_edgeRestart the container to apply changes:
docker compose down && docker compose up -dKubernetes
Section titled “Kubernetes”Set environment variables in the Edge Deployment or StatefulSet:
env: - name: CLOUD_RPC_HOST value: "my-thingsboard-server.example.com" - name: CLOUD_ROUTING_KEY valueFrom: secretKeyRef: name: tb-edge-credentials key: routingKey - name: CLOUD_ROUTING_SECRET valueFrom: secretKeyRef: name: tb-edge-credentials key: routingSecret