Skip to content
Stand with Ukraine flag

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.

ParameterEnv variableDefaultDescription
cloud.routingKeyCLOUD_ROUTING_KEY_(empty)_Routing key for edge instance, typically a UUID
cloud.secretCLOUD_ROUTING_SECRET_(empty)_Secret key for secure communication with the cloud
cloud.reconnect_timeoutCLOUD_RECONNECT_TIMEOUT3000Reconnection timeout in milliseconds if cloud connectivity is lost
cloud.uplink_pack_timeout_secCLOUD_UPLINK_PACK_TIMEOUT_SEC60Timeout in seconds for packaging uplink data to the cloud
cloud.rpc.hostCLOUD_RPC_HOSTlocalhostHostname or IP of the ThingsBoard platform, e.g. thingsboard.cloud, demo.thingsboard.io, X.X.X.X or localhost
cloud.rpc.portCLOUD_RPC_PORT7070Port for RPC communication with the ThingsBoard server
cloud.rpc.timeoutCLOUD_RPC_TIMEOUT5Timeout in seconds for terminating an RPC channel
cloud.rpc.keep_alive_time_secCLOUD_RPC_KEEP_ALIVE_TIME_SEC10Specifies 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_secCLOUD_RPC_KEEP_ALIVE_TIMEOUT_SEC5Specifies 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.enabledCLOUD_RPC_SSL_ENABLEDfalseEnables TLS for secure communication
cloud.rpc.ssl.certCLOUD_RPC_SSL_CERT_(empty)_Path to the TLS certificate for secure communication
cloud.rpc.storage.max_read_records_countCLOUD_RPC_STORAGE_MAX_READ_RECORDS_COUNT50Maximum number of cloud event records to read from the local DB for sending
cloud.rpc.storage.no_read_records_sleepCLOUD_RPC_NO_READ_RECORDS_SLEEP1000Interval in milliseconds to check for new cloud events in the local DB
cloud.rpc.storage.sleep_between_batchesCLOUD_RPC_SLEEP_BETWEEN_BATCHES1000Interval in milliseconds to retry sending a failed batch of cloud events
cloud.rpc.max_inbound_message_sizeCLOUD_RPC_MAX_INBOUND_MESSAGE_SIZE4194304Maximum size in bytes of inbound messages from the cloud
cloud.rpc.proxy.enabledCLOUD_RPC_PROXY_ENABLEDfalseEnable or disable the use of a proxy server
cloud.rpc.proxy.hostCLOUD_RPC_PROXY_HOST_(empty)_Hostname or IP of the proxy server
cloud.rpc.proxy.portCLOUD_RPC_PROXY_PORT0Port number of the proxy server
cloud.rpc.proxy.usernameCLOUD_RPC_PROXY_USERNAME_(empty)_Username for proxy server authentication
cloud.rpc.proxy.passwordCLOUD_RPC_PROXY_PASSWORD_(empty)_Password for proxy server authentication