Cloud Connection Configuration
All parameters listed here correspond to settings in tb-edge.yml (or tb-edge.conf on Linux). Set them as environment variables in /etc/tb-edge/conf/tb-edge.conf (Linux) or as container environment variables (Docker / Kubernetes). For instructions on applying changes, see How to change configuration.
Cloud configuration
Section titled “Cloud configuration”| Parameter | Env variable | Default | Description |
|---|---|---|---|
cloud.routingKey | CLOUD_ROUTING_KEY | _(empty)_ | Routing key for edge instance, typically a UUID |
cloud.secret | CLOUD_ROUTING_SECRET | _(empty)_ | Secret key for secure communication with the cloud |
cloud.reconnect_timeout | CLOUD_RECONNECT_TIMEOUT | 3000 | Reconnection timeout in milliseconds if cloud connectivity is lost |
cloud.uplink_pack_timeout_sec | CLOUD_UPLINK_PACK_TIMEOUT_SEC | 60 | Timeout in seconds for packaging uplink data to the cloud |
cloud.rpc.host | CLOUD_RPC_HOST | localhost | Hostname or IP of the ThingsBoard platform, e.g. thingsboard.cloud, demo.thingsboard.io, X.X.X.X or localhost |
cloud.rpc.port | CLOUD_RPC_PORT | 7070 | Port for RPC communication with the ThingsBoard server |
cloud.rpc.timeout | CLOUD_RPC_TIMEOUT | 5 | Timeout in seconds for terminating an RPC channel |
cloud.rpc.keep_alive_time_sec | CLOUD_RPC_KEEP_ALIVE_TIME_SEC | 10 | Specifies the amount of time in seconds the client waits in idle (with no read operations on the connection) before sending a keepalive ping to the server. This setting is crucial for ensuring that the connection remains alive during periods of inactivity and helps prevent the server from closing the connection due to a timeout. It’s used to probe the server periodically to check if it is still responsive and maintain the connection through potential network devices that might drop inactive connections (like NATs and load balancers). |
cloud.rpc.keep_alive_timeout_sec | CLOUD_RPC_KEEP_ALIVE_TIMEOUT_SEC | 5 | Specifies how long the client will wait for a response to its keepalive ping. If the ping isn’t acknowledged within this timeframe, the client assumes the connection is dead or unreachable. This timeout is essential for detecting when the server side might have issues or when there might be network failures preventing communication. If the server does not respond to a keepalive ping within this period, the client will consider the connection as lost and may attempt to reconnect or take other recovery actions. |
cloud.rpc.ssl.enabled | CLOUD_RPC_SSL_ENABLED | false | Enables TLS for secure communication |
cloud.rpc.ssl.cert | CLOUD_RPC_SSL_CERT | _(empty)_ | Path to the TLS certificate for secure communication |
cloud.rpc.storage.max_read_records_count | CLOUD_RPC_STORAGE_MAX_READ_RECORDS_COUNT | 50 | Maximum number of cloud event records to read from the local DB for sending |
cloud.rpc.storage.no_read_records_sleep | CLOUD_RPC_NO_READ_RECORDS_SLEEP | 1000 | Interval in milliseconds to check for new cloud events in the local DB |
cloud.rpc.storage.sleep_between_batches | CLOUD_RPC_SLEEP_BETWEEN_BATCHES | 1000 | Interval in milliseconds to retry sending a failed batch of cloud events |
cloud.rpc.max_inbound_message_size | CLOUD_RPC_MAX_INBOUND_MESSAGE_SIZE | 4194304 | Maximum size in bytes of inbound messages from the cloud |
cloud.rpc.proxy.enabled | CLOUD_RPC_PROXY_ENABLED | false | Enable or disable the use of a proxy server |
cloud.rpc.proxy.host | CLOUD_RPC_PROXY_HOST | _(empty)_ | Hostname or IP of the proxy server |
cloud.rpc.proxy.port | CLOUD_RPC_PROXY_PORT | 0 | Port number of the proxy server |
cloud.rpc.proxy.username | CLOUD_RPC_PROXY_USERNAME | _(empty)_ | Username for proxy server authentication |
cloud.rpc.proxy.password | CLOUD_RPC_PROXY_PASSWORD | _(empty)_ | Password for proxy server authentication |