Skip to content
Stand with Ukraine flag

Transport configuration

ThingsBoard Edge runs the same transport services as ThingsBoard Community Edition — MQTT, HTTP, CoAP, LwM2M, and SNMP. Set the variables listed below 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
transport.sessions.inactivity_timeoutTB_TRANSPORT_SESSIONS_INACTIVITY_TIMEOUT600000Session inactivity timeout in milliseconds. After this period of no activity, the session is closed and all subscriptions are deleted. Should be ≥ the device inactivity timeout (DEFAULT_INACTIVITY_TIMEOUT, which is in seconds).
transport.sessions.report_timeoutTB_TRANSPORT_SESSIONS_REPORT_TIMEOUT3000Interval (ms) for periodic check of expired sessions and reporting of session last-activity changes.
transport.activity.reporting_strategyTB_TRANSPORT_ACTIVITY_REPORTING_STRATEGYLASTStrategy for reporting activity events per reporting period. Values: FIRST, LAST, FIRST_AND_LAST, ALL.
transport.json.type_cast_enabledJSON_TYPE_CAST_ENABLEDtrueCast string data to numeric when possible while processing telemetry/attributes JSON.
transport.json.max_string_value_lengthJSON_MAX_STRING_VALUE_LENGTH0Maximum allowed string value length in telemetry/attributes JSON. 0 disables the check.
transport.client_side_rpc.timeoutCLIENT_SIDE_RPC_TIMEOUT60000Processing timeout (ms) for client-side RPC commands.
transport.api_enabledTB_TRANSPORT_API_ENABLEDtrueEnable/disable all transport protocols (HTTP, MQTT, CoAP, LwM2M). Takes priority over each protocol’s own enabled flag.
transport.log.enabledTB_TRANSPORT_LOG_ENABLEDtrueLog transport messages to telemetry (e.g. LwM2M registration updates).
transport.log.max_lengthTB_TRANSPORT_LOG_MAX_LENGTH1024Maximum length of a transport log message. Content is truncated to this value.
transport.rate_limits.ip_limits_enabledTB_TRANSPORT_IP_RATE_LIMITS_ENABLEDfalseEnable/disable IP-based rate limits. Device and tenant-specific limits are controlled via Tenant Profile.
transport.rate_limits.max_wrong_credentials_per_ipTB_TRANSPORT_MAX_WRONG_CREDENTIALS_PER_IP10Maximum number of connection attempts with invalid credentials before an IP is blocked.
transport.rate_limits.ip_block_timeoutTB_TRANSPORT_IP_BLOCK_TIMEOUT60000Timeout (ms) after which a blocked IP address is unblocked.

Default ports: 8080 (plain), 443 (TLS)

ParameterEnv variableDefaultDescription
transport.http.enabledHTTP_ENABLEDtrueEnable/disable the HTTP transport protocol.
transport.http.request_timeoutHTTP_REQUEST_TIMEOUT60000HTTP request processing timeout in milliseconds.
transport.http.max_request_timeoutHTTP_MAX_REQUEST_TIMEOUT300000HTTP maximum request processing timeout in milliseconds.
transport.http.max_payload_sizeHTTP_TRANSPORT_MAX_PAYLOAD_SIZE_LIMIT_CONFIGURATION/api/v1/*/rpc/**=65536;/api/v1/**=52428800Semicolon-separated list of urlPattern=maxPayloadSize pairs. First match wins.

Default ports: 1883 (plain), 8883 (TLS)

ParameterEnv variableDefaultDescription
transport.mqtt.enabledMQTT_ENABLEDtrueEnable/disable the MQTT transport protocol.
transport.mqtt.bind_addressMQTT_BIND_ADDRESS0.0.0.0MQTT bind address.
transport.mqtt.bind_portMQTT_BIND_PORT1883MQTT bind port.
transport.mqtt.proxy_enabledMQTT_PROXY_PROTOCOL_ENABLEDfalseEnable HAProxy PROXY protocol support (v1 and v2). Useful for obtaining the real client IP for logs and rate limits.
transport.mqtt.timeoutMQTT_TIMEOUT10000MQTT processing timeout in milliseconds.
transport.mqtt.disconnect_timeoutMQTT_DISCONNECT_TIMEOUT1000Time (ms) to wait for client disconnect after the server sends a disconnect message.
transport.mqtt.msg_queue_size_per_device_limitMQTT_MSG_QUEUE_SIZE_PER_DEVICE_LIMIT100Max messages queued before the device connects. Applied before Tenant Profile limits.
transport.mqtt.gateway_metrics_report_interval_secMQTT_GATEWAY_METRICS_REPORT_INTERVAL_SEC60Interval (s) for periodic reporting of gateway metrics.
transport.mqtt.netty.leak_detector_levelNETTY_LEAK_DETECTOR_LVLDISABLEDNetty buffer leak detector level.
transport.mqtt.netty.boss_group_thread_countNETTY_BOSS_GROUP_THREADS1Number of Netty boss threads.
transport.mqtt.netty.worker_group_thread_countNETTY_WORKER_GROUP_THREADS12Number of Netty worker threads.
transport.mqtt.netty.max_payload_sizeNETTY_MAX_PAYLOAD_SIZE65536Maximum MQTT payload size in bytes.
transport.mqtt.netty.so_keep_aliveNETTY_SO_KEEPALIVEfalseEnable TCP keepalive probes on idle connections.
transport.mqtt.ssl.enabledMQTT_SSL_ENABLEDfalseEnable/disable MQTT SSL support.
transport.mqtt.ssl.bind_addressMQTT_SSL_BIND_ADDRESS0.0.0.0MQTT SSL bind address.
transport.mqtt.ssl.bind_portMQTT_SSL_BIND_PORT8883MQTT SSL bind port.
transport.mqtt.ssl.protocolMQTT_SSL_PROTOCOLTLSv1.2SSL protocol. See Java standard algorithm names.
transport.mqtt.ssl.credentials.typeMQTT_SSL_CREDENTIALS_TYPEPEMServer credentials type: PEM (certificate file) or KEYSTORE (Java keystore).
transport.mqtt.ssl.credentials.pem.cert_fileMQTT_SSL_PEM_CERTmqttserver.pemPath to the server certificate (or chain) file. May include the private key.
transport.mqtt.ssl.credentials.pem.key_fileMQTT_SSL_PEM_KEYmqttserver_key.pemPath to the server private key file. Required if the key is not in the cert file.
transport.mqtt.ssl.credentials.pem.key_passwordMQTT_SSL_PEM_KEY_PASSWORDserver_key_passwordPassword for the server private key (optional).
transport.mqtt.ssl.credentials.keystore.typeMQTT_SSL_KEY_STORE_TYPEJKSKey store type: JKS or PKCS12.
transport.mqtt.ssl.credentials.keystore.store_fileMQTT_SSL_KEY_STOREmqttserver.jksPath to the keystore holding the SSL certificate.
transport.mqtt.ssl.credentials.keystore.store_passwordMQTT_SSL_KEY_STORE_PASSWORDserver_ks_passwordPassword to access the keystore.
transport.mqtt.ssl.credentials.keystore.key_aliasMQTT_SSL_KEY_ALIAS(none)Alias of the private key. If not set, the first private key in the keystore is used.
transport.mqtt.ssl.credentials.keystore.key_passwordMQTT_SSL_KEY_PASSWORDserver_key_passwordPassword to access the private key (optional).
transport.mqtt.ssl.skip_validity_check_for_client_certMQTT_SSL_SKIP_VALIDITY_CHECK_FOR_CLIENT_CERTfalseSkip certificate validity check for client certificates.

Default ports: 5683 UDP (plain), 5684 UDP (DTLS)

ParameterEnv variableDefaultDescription
transport.coap.enabledCOAP_ENABLEDtrueEnable/disable the CoAP transport protocol.
transport.coap.timeoutCOAP_TIMEOUT10000CoAP processing timeout in milliseconds.
transport.coap.piggyback_timeoutCOAP_PIGGYBACK_TIMEOUT500CoAP piggyback response timeout in milliseconds.
transport.coap.psm_activity_timerCOAP_PSM_ACTIVITY_TIMER10000Default PSM Activity Timer if not specified in the device profile.
transport.coap.paging_transmission_windowCOAP_PAGING_TRANSMISSION_WINDOW10000Default Paging Transmission Window if not specified in the device profile.

Default ports: 5685 CoAP, 5686 CoAP/DTLS, 5687 Bootstrap, 5688 Bootstrap/DTLS

ParameterEnv variableDefaultDescription
transport.lwm2m.enabledLWM2M_ENABLEDtrueEnable/disable the LwM2M transport protocol.
transport.lwm2m.dtls.retransmission_timeoutLWM2M_DTLS_RETRANSMISSION_TIMEOUT_MS9000DTLS retransmission timeout in milliseconds (RFC 7925 default).
transport.lwm2m.dtls.connection_id_lengthLWM2M_DTLS_CONNECTION_ID_LENGTH(off)DTLS Connection ID length (RFC 9146). Values: off, on, or a positive integer for CID size in bytes.
transport.lwm2m.server.idLWM2M_SERVER_ID123LwM2M server identifier.
transport.lwm2m.server.bind_addressLWM2M_BIND_ADDRESS0.0.0.0LwM2M server bind address.
transport.lwm2m.server.bind_portLWM2M_BIND_PORT5685LwM2M server CoAP bind port.
transport.lwm2m.server.security.bind_addressLWM2M_SECURITY_BIND_ADDRESS0.0.0.0LwM2M server DTLS bind address.
transport.lwm2m.server.security.bind_portLWM2M_SECURITY_BIND_PORT5686LwM2M server DTLS bind port.
transport.lwm2m.server.security.credentials.enabledLWM2M_SERVER_CREDENTIALS_ENABLEDfalseEnable LwM2M server X.509 / RPK certificate support.
transport.lwm2m.server.security.credentials.typeLWM2M_SERVER_CREDENTIALS_TYPEPEMServer credentials type: PEM or KEYSTORE.
transport.lwm2m.server.security.credentials.pem.cert_fileLWM2M_SERVER_PEM_CERTlwm2mserver.pemPath to the server certificate (or chain) file.
transport.lwm2m.server.security.credentials.pem.key_fileLWM2M_SERVER_PEM_KEYlwm2mserver_key.pemPath to the server private key file. Required if not included in the cert file.
transport.lwm2m.server.security.credentials.pem.key_passwordLWM2M_SERVER_PEM_KEY_PASSWORDserver_key_passwordServer private key password (optional).
transport.lwm2m.server.security.credentials.keystore.typeLWM2M_SERVER_KEY_STORE_TYPEJKSKeystore type: JKS or PKCS12.
transport.lwm2m.server.security.credentials.keystore.store_fileLWM2M_SERVER_KEY_STORElwm2mserver.jksPath to the keystore holding the SSL certificate.
transport.lwm2m.server.security.credentials.keystore.store_passwordLWM2M_SERVER_KEY_STORE_PASSWORDserver_ks_passwordPassword to access the keystore.
transport.lwm2m.server.security.credentials.keystore.key_aliasLWM2M_SERVER_KEY_ALIASserverKey alias in the keystore.
transport.lwm2m.server.security.credentials.keystore.key_passwordLWM2M_SERVER_KEY_PASSWORDserver_ks_passwordPassword to access the private key.
transport.lwm2m.server.security.skip_validity_check_for_client_certTB_LWM2M_SERVER_SECURITY_SKIP_VALIDITY_CHECK_FOR_CLIENT_CERTfalseSkip validity check for client X.509 certificates.
transport.lwm2m.bootstrap.enabledLWM2M_ENABLED_BStrueEnable/disable the LwM2M Bootstrap server.
transport.lwm2m.bootstrap.idLWM2M_SERVER_ID_BS111Bootstrap server short ID (used in the LwM2M Security object).
transport.lwm2m.bootstrap.bind_addressLWM2M_BS_BIND_ADDRESS0.0.0.0Bootstrap server bind address.
transport.lwm2m.bootstrap.bind_portLWM2M_BS_BIND_PORT5687Bootstrap server CoAP bind port.
transport.lwm2m.bootstrap.security.bind_addressLWM2M_BS_SECURITY_BIND_ADDRESS0.0.0.0Bootstrap server DTLS bind address.
transport.lwm2m.bootstrap.security.bind_portLWM2M_BS_SECURITY_BIND_PORT5688Bootstrap server DTLS bind port.
transport.lwm2m.bootstrap.security.credentials.enabledLWM2M_BS_CREDENTIALS_ENABLEDfalseEnable Bootstrap server X.509 / RPK certificate support.
transport.lwm2m.bootstrap.security.credentials.typeLWM2M_BS_CREDENTIALS_TYPEPEMBootstrap server credentials type: PEM or KEYSTORE.
transport.lwm2m.bootstrap.security.credentials.pem.cert_fileLWM2M_BS_PEM_CERTlwm2mserver.pemPath to the bootstrap server certificate (or chain) file.
transport.lwm2m.bootstrap.security.credentials.pem.key_fileLWM2M_BS_PEM_KEYlwm2mserver_key.pemPath to the bootstrap server private key file.
transport.lwm2m.bootstrap.security.credentials.pem.key_passwordLWM2M_BS_PEM_KEY_PASSWORDserver_key_passwordBootstrap server private key password (optional).
transport.lwm2m.bootstrap.security.credentials.keystore.typeLWM2M_BS_KEY_STORE_TYPEJKSBootstrap keystore type: JKS or PKCS12.
transport.lwm2m.bootstrap.security.credentials.keystore.store_fileLWM2M_BS_KEY_STORElwm2mserver.jksPath to the bootstrap keystore.
transport.lwm2m.bootstrap.security.credentials.keystore.store_passwordLWM2M_BS_KEY_STORE_PASSWORDserver_ks_passwordPassword to access the bootstrap keystore.
transport.lwm2m.bootstrap.security.credentials.keystore.key_aliasLWM2M_BS_KEY_ALIASbootstrapKey alias in the bootstrap keystore.
transport.lwm2m.bootstrap.security.credentials.keystore.key_passwordLWM2M_BS_KEY_PASSWORDserver_ks_passwordPassword to access the bootstrap private key.
transport.lwm2m.security.trust-credentials.enabledLWM2M_TRUST_CREDENTIALS_ENABLEDfalseLoad X.509 trust certificates for client verification.
transport.lwm2m.security.trust-credentials.typeLWM2M_TRUST_CREDENTIALS_TYPEPEMTrust store type: PEM or KEYSTORE.
transport.lwm2m.security.trust-credentials.pem.cert_fileLWM2M_TRUST_PEM_CERTlwm2mtruststorechain.pemPath to the trust certificate chain file.
transport.lwm2m.security.trust-credentials.keystore.typeLWM2M_TRUST_KEY_STORE_TYPEJKSTrust keystore type: JKS or PKCS12.
transport.lwm2m.security.trust-credentials.keystore.store_fileLWM2M_TRUST_KEY_STORElwm2mtruststorechain.jksPath to the trust keystore.
transport.lwm2m.security.trust-credentials.keystore.store_passwordLWM2M_TRUST_KEY_STORE_PASSWORDserver_ks_passwordPassword to access the trust keystore.
transport.lwm2m.security.recommended_ciphersLWM2M_RECOMMENDED_CIPHERSfalseAllow only recommended DTLS cipher suites.
transport.lwm2m.security.recommended_supported_groupsLWM2M_RECOMMENDED_SUPPORTED_GROUPStrueAllow only recommended DTLS supported groups (curves).
transport.lwm2m.timeoutLWM2M_TIMEOUT120000LwM2M operation timeout in milliseconds.
transport.lwm2m.uplink_pool_sizeLWM2M_UPLINK_POOL_SIZE10Thread pool size for LwM2M uplink processing.
transport.lwm2m.downlink_pool_sizeLWM2M_DOWNLINK_POOL_SIZE10Thread pool size for LwM2M downlink processing.
transport.lwm2m.ota_pool_sizeLWM2M_OTA_POOL_SIZE10Thread pool size for OTA update processing.
transport.lwm2m.clean_period_in_secLWM2M_CLEAN_PERIOD_IN_SEC2Period (s) for cleanup of stale registrations in the store.
transport.lwm2m.log_max_lengthLWM2M_LOG_MAX_LENGTH1024Maximum LwM2M log message size.
transport.lwm2m.psm_activity_timerLWM2M_PSM_ACTIVITY_TIMER10000Default PSM Activity Timer if not specified in the device profile.
transport.lwm2m.paging_transmission_windowLWM2M_PAGING_TRANSMISSION_WINDOW10000Default Paging Transmission Window for eDRX support if not specified in the device profile.

Default port: 161 UDP

ParameterEnv variableDefaultDescription
transport.snmp.enabledSNMP_ENABLEDtrueEnable/disable the SNMP transport protocol.
transport.snmp.bind_portSNMP_BIND_PORT1620SNMP bind port.
transport.snmp.response_processing.parallelism_levelSNMP_RESPONSE_PROCESSING_PARALLELISM_LEVEL4Parallelism level for the executor handling responses from SNMP devices.
transport.snmp.underlying_protocolSNMP_UNDERLYING_PROTOCOLudpTransport protocol for SNMP: udp or tcp.
transport.snmp.max_request_oidsSNMP_MAX_REQUEST_OIDS100Maximum OID mappings per single SNMP request PDU. Larger requests are split into multiple PDUs.
transport.snmp.request_chunk_delay_msSNMP_REQUEST_CHUNK_DELAY_MS100Delay (ms) between sending each PDU chunk when a request is split.
transport.snmp.response.ignore_type_cast_errorsSNMP_RESPONSE_IGNORE_TYPE_CAST_ERRORSfalseIgnore type mismatch errors in SNMP response values.
transport.snmp.scheduler_thread_pool_sizeSNMP_SCHEDULER_THREAD_POOL_SIZE4Thread pool size for the scheduler that executes device polling tasks.
ParameterEnv variableDefaultDescription
transport.stats.enabledTB_TRANSPORT_STATS_ENABLEDtrueEnable/disable collection of transport statistics.
transport.stats.print-interval-msTB_TRANSPORT_STATS_PRINT_INTERVAL_MS60000Interval (ms) for logging transport statistics.
ParameterEnv variableDefaultDescription
coap.enabledCOAP_SERVER_ENABLEDtrueEnable/disable the CoAP server.
coap.bind_addressCOAP_BIND_ADDRESS0.0.0.0CoAP server bind address.
coap.bind_portCOAP_BIND_PORT5683CoAP server bind port.
coap.dtls.enabledCOAP_DTLS_ENABLEDfalseEnable/disable DTLS 1.2 support.
coap.dtls.retransmission_timeoutCOAP_DTLS_RETRANSMISSION_TIMEOUT_MS9000DTLS retransmission timeout in milliseconds.
coap.dtls.bind_addressCOAP_DTLS_BIND_ADDRESS0.0.0.0CoAP DTLS bind address.
coap.dtls.bind_portCOAP_DTLS_BIND_PORT5684CoAP DTLS bind port.
coap.dtls.connection_id_lengthCOAP_DTLS_CONNECTION_ID_LENGTH(off)DTLS Connection ID length (RFC 9146). Values: off, on, or a positive integer for CID size in bytes.
coap.dtls.credentials.typeCOAP_DTLS_CREDENTIALS_TYPEPEMServer credentials type: PEM or KEYSTORE.
coap.dtls.credentials.pem.cert_fileCOAP_DTLS_PEM_CERTcoapserver.pemPath to the server certificate (or chain) file.
coap.dtls.credentials.pem.key_fileCOAP_DTLS_PEM_KEYcoapserver_key.pemPath to the server private key file. Required if not included in the cert file.
coap.dtls.credentials.pem.key_passwordCOAP_DTLS_PEM_KEY_PASSWORDserver_key_passwordServer private key password (optional).
coap.dtls.credentials.keystore.typeCOAP_DTLS_KEY_STORE_TYPEJKSKeystore type: JKS or PKCS12.
coap.dtls.credentials.keystore.store_fileCOAP_DTLS_KEY_STOREcoapserver.jksPath to the keystore holding the SSL certificate.
coap.dtls.credentials.keystore.store_passwordCOAP_DTLS_KEY_STORE_PASSWORDserver_ks_passwordPassword to access the keystore.
coap.dtls.credentials.keystore.key_aliasCOAP_DTLS_KEY_ALIASserveraliasKey alias in the keystore.
coap.dtls.credentials.keystore.key_passwordCOAP_DTLS_KEY_PASSWORDserver_key_passwordPassword to access the private key.
coap.dtls.x509.skip_validity_check_for_client_certTB_COAP_X509_DTLS_SKIP_VALIDITY_CHECK_FOR_CLIENT_CERTfalseSkip certificate validity check for client certificates.
coap.dtls.x509.dtls_session_inactivity_timeoutTB_COAP_X509_DTLS_SESSION_INACTIVITY_TIMEOUT86400000DTLS session inactivity timeout (ms). Used to clean up the session cache.
coap.dtls.x509.dtls_session_report_timeoutTB_COAP_X509_DTLS_SESSION_REPORT_TIMEOUT1800000Interval (ms) for periodic eviction of timed-out DTLS sessions.

Controls which connectivity endpoints are advertised in the Check connectivity widget on the device page.

ParameterEnv variableDefaultDescription
device.connectivity.http.enabledDEVICE_CONNECTIVITY_HTTP_ENABLEDtrueInclude HTTP curl command in connectivity check.
device.connectivity.http.hostDEVICE_CONNECTIVITY_HTTP_HOST(base URL)HTTP transport host. Defaults to the base URL if empty.
device.connectivity.http.portDEVICE_CONNECTIVITY_HTTP_PORT8080HTTP transport port.
device.connectivity.https.enabledDEVICE_CONNECTIVITY_HTTPS_ENABLEDfalseInclude HTTPS curl command in connectivity check.
device.connectivity.https.hostDEVICE_CONNECTIVITY_HTTPS_HOST(base URL)HTTPS transport host. Defaults to the base URL if empty.
device.connectivity.https.portDEVICE_CONNECTIVITY_HTTPS_PORT443HTTPS transport port.
device.connectivity.mqtt.enabledDEVICE_CONNECTIVITY_MQTT_ENABLEDtrueInclude MQTT mosquitto command in connectivity check.
device.connectivity.mqtt.hostDEVICE_CONNECTIVITY_MQTT_HOST(base URL)MQTT transport host. Defaults to the base URL host if empty.
device.connectivity.mqtt.portDEVICE_CONNECTIVITY_MQTT_PORT1883MQTT transport port.
device.connectivity.mqtts.enabledDEVICE_CONNECTIVITY_MQTTS_ENABLEDfalseInclude MQTTS mosquitto command in connectivity check.
device.connectivity.mqtts.hostDEVICE_CONNECTIVITY_MQTTS_HOST(base URL)MQTTS transport host. Defaults to the base URL host if empty.
device.connectivity.mqtts.portDEVICE_CONNECTIVITY_MQTTS_PORT8883MQTTS transport port.
device.connectivity.mqtts.pem_cert_fileDEVICE_CONNECTIVITY_MQTTS_CA_ROOT_CERTcafile.pemPath to the MQTT CA root certificate file.
device.connectivity.coap.enabledDEVICE_CONNECTIVITY_COAP_ENABLEDtrueInclude CoAP command in connectivity check.
device.connectivity.coap.hostDEVICE_CONNECTIVITY_COAP_HOST(base URL)CoAP transport host. Defaults to the base URL host if empty.
device.connectivity.coap.portDEVICE_CONNECTIVITY_COAP_PORT5683CoAP transport port.
device.connectivity.coaps.enabledDEVICE_CONNECTIVITY_COAPS_ENABLEDfalseInclude CoAPs command in connectivity check.
device.connectivity.coaps.hostDEVICE_CONNECTIVITY_COAPS_HOST(base URL)CoAPs transport host. Defaults to the base URL host if empty.
device.connectivity.coaps.portDEVICE_CONNECTIVITY_COAPS_PORT5684CoAPs transport port.