Installing ThingsBoard using Docker (Linux or Mac OS)
IoT PaaS Demo
We recommend to use ThingsBoard Live Demo for the seamless experience and the newest features from the latest source code!
Save time on the installation and configuration with several pre-provisioned devices, dashboards available in the cloud and pre-integrated email server to create new customer accounts and users.
This guide will help you to install and start ThingsBoard using Docker on Linux or Mac OS.
- Download the following files from thingsboard repo:
- docker-compose.yml - main docker-compose file.
- .env - main env file that contains default location of cassandra data folder and cassandra schema.
- tb.env - default thingsboard environment variables.
curl -L https://raw.githubusercontent.com/thingsboard/thingsboard/release-2.0/docker/docker-compose.yml > docker-compose.yml
curl -L https://raw.githubusercontent.com/thingsboard/thingsboard/release-2.0/docker/.env > .env
curl -L https://raw.githubusercontent.com/thingsboard/thingsboard/release-2.0/docker/tb.env > tb.env
- If you have already installed ThingsBoard using docker and want to upgrade or cleanup your installation, please cleanup HSQLDB data directory
sudo rm -rf /home/docker/hsqldb_volume
- If you would like to create system and demo data and to start ThingsBoard node execute next command
ADD_SCHEMA_AND_SYSTEM_DATA=true ADD_DEMO_DATA=true bash -c 'docker-compose up -d tb'
- In case you would like to skip creation of system and demo data or you have already added and you only need to start ThingsBoard node then execute docker-compose command
- Once started, you will be able to open Web UI using following link:
One can modify .env file to configure following parameters:
- CASSANDRA_DATA_DIR - location of cassandra data folder on host machine
- POSTGRES_DATA_DIR - location of postgres data folder on host machine
- HSQLDB_DATA_DIR - location of hsqldb data folder on host machine
- ADD_SCHEMA_AND_SYSTEM_DATA - create schema and add system user and rule chains. by default false
- ADD_DEMO_DATA - add demo accounts, dashboards and devices. by default false
- CASSANDRA_URL - url of cassandra container
One can set thingsboard service environment variables using this file. See configuration for more details.
Note If you observe errors related to DNS issues, for example
127.0.1.1:53: cannot unmarshal DNS message
You may configure your system to use Google public DNS servers.
See corresponding Linux and Mac OS instructions.