Skip to content
Stand with Ukraine flag

How to Change Configuration

This guide will help you to get familiar with ThingsBoard configuration files and parameters. We recommend to configure ThingsBoard using environment variables. This way you do not need to merge the configuration files when a new platform release arrives. The list of available configuration parameters and corresponding environment variables is located in the Configuration Reference.

If ThingsBoard is installed on Linux as a monolithic application, you may specify the environment variables in the thingsboard.conf file:

Terminal window
sudo nano /usr/share/thingsboard/conf/thingsboard.conf

Use the simple example below to add a new environment variable HTTP_BIND_PORT with value 8081:

Terminal window
export HTTP_BIND_PORT=8081

If ThingsBoard is installed on Windows as a monolithic application, you may specify the environment variables in the thingsboard.yml file located in the following directory:

YOUR_INSTALL_DIR/conf

The configuration file is written in YAML. All configuration parameters have a corresponding environment variable name and default value. To change a configuration parameter you can simply change its default value. For example:

server:
address: "${HTTP_BIND_ADDRESS:0.0.0.0}"

In this case, HTTP_BIND_ADDRESS is the environment variable name and 0.0.0.0 is the default value.

If ThingsBoard is installed in a Docker Compose environment, you may edit the scripts and add environment variables for the corresponding containers. See the Docker documentation for more details.

If ThingsBoard is installed in a Kubernetes environment, you may edit the scripts and add environment variables for the corresponding deployments/stateful sets. See the Kubernetes documentation for more details.