Skip to content
Stand with Ukraine flag

Server 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
server.addressHTTP_BIND_ADDRESS0.0.0.0Server bind-address
server.portHTTP_BIND_PORT8080Server bind port
server.forward_headers_strategyHTTP_FORWARD_HEADERS_STRATEGYframeworkServer forward headers strategy. Required for SWAGGER UI when reverse proxy is used
server.ssl.enabledSSL_ENABLEDfalseEnable/disable SSL support
server.ssl.credentials.typeSSL_CREDENTIALS_TYPEPEMServer credentials type (PEM - pem certificate file; KEYSTORE - java keystore)
server.ssl.credentials.pem.cert_fileSSL_PEM_CERTserver.pemPath to the server certificate file (holds server certificate or certificate chain, may include server private key)
server.ssl.credentials.pem.key_fileSSL_PEM_KEYserver_key.pemPath to the server certificate private key file (optional). Required if the private key is not present in the server certificate file
server.ssl.credentials.pem.key_passwordSSL_PEM_KEY_PASSWORDserver_key_passwordServer certificate private key password (optional)
server.ssl.credentials.keystore.typeSSL_KEY_STORE_TYPEPKCS12Type of the key store (JKS or PKCS12)
server.ssl.credentials.keystore.store_fileSSL_KEY_STOREclasspath:keystore/keystore.p12Path to the key store that holds the SSL certificate
server.ssl.credentials.keystore.store_passwordSSL_KEY_STORE_PASSWORDthingsboardPassword used to access the key store
server.ssl.credentials.keystore.key_aliasSSL_KEY_ALIAStomcatKey alias
server.ssl.credentials.keystore.key_passwordSSL_KEY_PASSWORDthingsboardPassword used to access the key
server.http.max_payload_sizeHTTP_MAX_PAYLOAD_SIZE_LIMIT_CONFIGURATION/api/image*/**=52428800;/api/resource/**=52428800;/api/**=16777216Semi-colon-separated list of urlPattern=maxPayloadSize pairs that define max http request size for specified url pattern. After first match all other will be skipped
server.http2.enabledHTTP2_ENABLEDtrueEnable/disable HTTP/2 support
server.log_controller_error_stack_traceHTTP_LOG_CONTROLLER_ERROR_STACK_TRACEfalseLog errors with stacktrace when REST API throws an exception with the message “Please contact sysadmin”
server.ws.send_timeoutTB_SERVER_WS_SEND_TIMEOUT5000Timeout for sending data to client WebSocket session in milliseconds
server.ws.ping_timeoutTB_SERVER_WS_PING_TIMEOUT30000recommended timeout >= 30 seconds. The platform will attempt to send a ‘ping’ request 3 times within the timeout
server.ws.dynamic_page_link.refresh_intervalTB_SERVER_WS_DYNAMIC_PAGE_LINK_REFRESH_INTERVAL_SEC60Refresh rate of the dynamic alarm end entity data queries
server.ws.dynamic_page_link.refresh_pool_sizeTB_SERVER_WS_DYNAMIC_PAGE_LINK_REFRESH_POOL_SIZE1Thread pool size to execute dynamic queries
server.ws.dynamic_page_link.max_alarm_queries_per_refresh_intervalTB_SERVER_WS_MAX_ALARM_QUERIES_PER_REFRESH_INTERVAL10Maximum number of dynamic queries per refresh interval. For example, no more than 10 alarm queries are executed by the user simultaneously in all browsers.
server.ws.dynamic_page_link.max_per_userTB_SERVER_WS_DYNAMIC_PAGE_LINK_MAX_PER_USER10Maximum number of dynamic queries per user. For example, no more than 10 alarm widgets opened by the user simultaneously in all browsers
server.ws.max_entities_per_data_subscriptionTB_SERVER_WS_MAX_ENTITIES_PER_DATA_SUBSCRIPTION10000Maximum number of entities returned for single entity subscription. For example, no more than 10,000 entities on the map widget
server.ws.max_entities_per_alarm_subscriptionTB_SERVER_WS_MAX_ENTITIES_PER_ALARM_SUBSCRIPTION10000Maximum number of alarms returned for single alarm subscription. For example, no more than 10,000 alarms on the alarm widget
server.ws.max_queue_messages_per_sessionTB_SERVER_WS_DEFAULT_QUEUE_MESSAGES_PER_SESSION1000Maximum queue size of the websocket updates per session. This restriction prevents infinite updates of WS
server.ws.auth_timeout_msTB_SERVER_WS_AUTH_TIMEOUT_MS10000Maximum time between WS session opening and sending auth command
server.ws.rate_limits.subscriptions_per_tenantTB_SERVER_WS_SUBSCRIPTIONS_PER_TENANT_RATE_LIMIT_(empty)_Per-tenant rate limit for WS subscriptions
server.ws.rate_limits.subscriptions_per_userTB_SERVER_WS_SUBSCRIPTIONS_PER_USER_RATE_LIMIT_(empty)_Per-user rate limit for WS subscriptions
server.rest.server_side_rpc.min_timeoutMIN_SERVER_SIDE_RPC_TIMEOUT5000Minimum value of the server-side RPC timeout. May override value provided in the REST API call. Since 2.5 migration to queues, the RPC delay depends on the size of the pending messages in the queue. So default UI parameter of 500ms may not be sufficient for loaded environments.
server.rest.server_side_rpc.default_timeoutDEFAULT_SERVER_SIDE_RPC_TIMEOUT10000Default value of the server-side RPC timeout.
server.rest.rate_limits.reset_password_per_userRESET_PASSWORD_PER_USER_RATE_LIMIT_CONFIGURATION5:3600Limit that prohibits resetting the password for the user too often. The value of the rate limit. By default, no more than 5 requests per hour
ParameterEnv variableDefaultDescription
app.version_(none)_"@project.version@"Application version
ParameterEnv variableDefaultDescription
zk.enabledZOOKEEPER_ENABLEDfalseEnable/disable zookeeper discovery service.
zk.urlZOOKEEPER_URLlocalhost:2181Zookeeper connect string
zk.retry_interval_msZOOKEEPER_RETRY_INTERVAL_MS3000Zookeeper retry interval in milliseconds
zk.connection_timeout_msZOOKEEPER_CONNECTION_TIMEOUT_MS3000Zookeeper connection timeout in milliseconds
zk.session_timeout_msZOOKEEPER_SESSION_TIMEOUT_MS3000Zookeeper session timeout in milliseconds
zk.zk_dirZOOKEEPER_NODES_DIR/thingsboardName of the directory in zookeeper ‘filesystem’
zk.recalculate_delayZOOKEEPER_RECALCULATE_DELAY_MS0The recalculate_delay property is recommended in a microservices architecture setup for rule-engine services. This property provides a pause to ensure that when a rule-engine service is restarted, other nodes don’t immediately attempt to recalculate their partitions. The delay is recommended because the initialization of rule chain actors is time-consuming. Avoiding unnecessary recalculations during a restart can enhance system performance and stability.
ParameterEnv variableDefaultDescription
cluster.stats.enabledTB_CLUSTER_STATS_ENABLEDfalseEnable/Disable the cluster statistics. Calculates the number of messages sent between cluster nodes based on each type
cluster.stats.print_interval_msTB_CLUSTER_STATS_PRINT_INTERVAL_MS10000Interval of printing the cluster stats to the log file
ParameterEnv variableDefaultDescription
plugins.scan_packagesPLUGINS_SCAN_PACKAGESorg.thingsboard.server.extensions,org.thingsboard.rule.engineComma-separated package list used during classpath scanning for plugins
ParameterEnv variableDefaultDescription
spring.mvc.cors.mappings."[/api/**]".allowed-origin-patterns_(none)_"*"Comma-separated list of origins to allow. ’*’ allows all origins. When not set, CORS support is disabled.
spring.mvc.cors.mappings."[/api/**]".allowed-methods_(none)_"*"Comma-separated list of methods to allow. ’*’ allows all methods.
spring.mvc.cors.mappings."[/api/**]".allowed-headers_(none)_"*"Comma-separated list of headers to allow in a request. ’*’ allows all headers.
spring.mvc.cors.mappings."[/api/**]".max-age_(none)_"1800"How long, in seconds, the response from a pre-flight request can be cached by clients.
spring.mvc.cors.mappings."[/api/**]".allow-credentials_(none)_"true"Set whether credentials are supported. When not set, credentials are not supported.
ParameterEnv variableDefaultDescription
spring.main.allow-circular-references_(none)_"true"Spring Boot configuration property that controls whether circular dependencies between beans are allowed.
spring.freemarker.checkTemplateLocation_(none)_"false"spring freemarker configuration
spring.mvc.async.request-timeoutSPRING_MVC_ASYNC_REQUEST_TIMEOUT30000The default timeout for asynchronous requests in milliseconds
spring.mvc.pathmatch.matching-strategy_(none)_"ANT_PATH_MATCHER"For endpoints matching in Swagger
spring.resources.chain.compressed_(none)_"true"This property enables or disables support for serving pre-compressed resources (for example, a .gzip or .br file)
spring.resources.chain.strategy.content.enabled_(none)_"true"This property enables or disables the content Version Strategy. This strategy allows Spring to generate a unique version for static resources, which is based on the content of the resource
spring.servlet.multipart.max-file-sizeSPRING_SERVLET_MULTIPART_MAX_FILE_SIZE50MBTotal file size cannot exceed 50MB when configuring file uploads
spring.servlet.multipart.max-request-sizeSPRING_SERVLET_MULTIPART_MAX_REQUEST_SIZE50MBTotal request size for a multipart/form-data cannot exceed 50MB
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation_(none)_"true"Fix Postgres JPA Error (Method org.postgresql.jdbc.PgConnection.createClob() is not yet implemented)
spring.jpa.properties.hibernate.order_by.default_null_orderingSPRING_JPA_PROPERTIES_HIBERNATE_ORDER_BY_DEFAULT_NULL_ORDERINGlastNote: as for current Spring JPA version, custom NullHandling for the Sort.Order is ignored and this parameter is used
spring.jpa.properties.hibernate.dialectSPRING_JPA_DIALECTorg.thingsboard.server.dao.ThingsboardPostgreSQLDialectwe use custom dialect that contains ilike(arg1, arg2) function (is interpreted to postgres ILIKE operator)
ParameterEnv variableDefaultDescription
springdoc.api-docs.enabledSWAGGER_ENABLEDtrueIf false swagger API docs will be unavailable
springdoc.default-produces-media-typeSWAGGER_DEFAULT_PRODUCES_MEDIA_TYPEapplication/jsonSwagger default produces media-type
ParameterEnv variableDefaultDescription
swagger.api_pathSWAGGER_API_PATH/api/**General swagger match pattern of swagger UI links
swagger.security_path_regexSWAGGER_SECURITY_PATH_REGEX/api/.*General swagger match pattern path of swagger UI links
swagger.non_security_path_regexSWAGGER_NON_SECURITY_PATH_REGEX/api/(?:noauth|v1)/.*Nonsecurity API path match pattern of swagger UI links
swagger.titleSWAGGER_TITLEThingsBoard REST APIThe title on the API doc UI page
swagger.descriptionSWAGGER_DESCRIPTIONThingsBoard open-source IoT platform REST API documentation.The description on the API doc UI page
swagger.contact.nameSWAGGER_CONTACT_NAMEThingsBoard teamThe contact name on the API doc UI page
swagger.contact.urlSWAGGER_CONTACT_URLhttps://thingsboard.ioThe contact URL on the API doc UI page
swagger.contact.emailSWAGGER_CONTACT_EMAIL[email protected]The contact email on the API doc UI page
swagger.license.titleSWAGGER_LICENSE_TITLEApache License Version 2.0The license title on the API doc UI page
swagger.license.urlSWAGGER_LICENSE_URLhttps://github.com/thingsboard/thingsboard/blob/master/LICENSELink to the license body on the API doc UI page
swagger.versionSWAGGER_VERSION_(empty)_The version of the API doc to display. Default to the package version.
swagger.group_nameSWAGGER_GROUP_NAMEthingsboardThe group name (definition) on the API doc UI page.
ParameterEnv variableDefaultDescription
metrics.enabledMETRICS_ENABLEDfalseEnable/disable actuator metrics.
metrics.timer.percentilesMETRICS_TIMER_PERCENTILES0.5Metrics percentiles returned by actuator for timer metrics. List of double values (divided by ,).
metrics.system_info.persist_frequencyMETRICS_SYSTEM_INFO_PERSIST_FREQUENCY_SECONDS60Persist frequency of system info (CPU, memory usage, etc.) in seconds
metrics.system_info.ttlMETRICS_SYSTEM_INFO_TTL_DAYS7TTL in days for system info timeseries
ParameterEnv variableDefaultDescription
management.endpoints.web.exposure.include_(none)_'${METRICS_ENDPOINTS_EXPOSE:info}'Expose metrics endpoint (use value ‘prometheus’ to enable prometheus metrics).
management.health.elasticsearch.enabled_(none)_"false"Enable the org.springframework.boot.actuate.elasticsearch.ElasticsearchRestClientHealthIndicator.doHealthCheck