Star

Installation

Documentation for installation and configuration of ThingsBoard IoT Platform.

Installing ThingsBoard using Docker (Windows)


IoT PaaS Demo


We recommend to use ThingsBoard Professional Edition 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 Windows.

Prerequisites

Running

Depending on the database used there are three type of ThingsBoard single instance docker images:

In this instruction thingsboard/tb-cassandra image will be used. You can choose any other images with different databases (see above).

Windows users should use docker managed volume for ThingsBoard DataBase. Create docker volume (for ex. mytb-data) before executing docker run command: Open “Docker Quickstart Terminal”. Execute the following command to create docker volume:

$ docker volume create mytb-data
$ docker volume create mytb-logs

Execute the following command to run this docker directly:

$ docker run -it -p 9090:9090 -p 1883:1883 -p 5683:5683/udp -v mytb-data:/data -v ~/mytb-logs:/var/log/thingsboard --name mytb --restart always thingsboard/tb-cassandra

Where:

In order to get access to necessary resources from external IP/Host on Windows machine, please execute the following commands:

$ VBoxManage controlvm "default" natpf1 "tcp-port9090,tcp,,9090,,9090"  
$ VBoxManage controlvm "default" natpf1 "tcp-port1883,tcp,,1883,,1883"
$ VBoxManage controlvm "default" natpf1 "tcp-port5683,tcp,,5683,,5683"

After executing this command you can open http://{your-host-ip}:9090 in you browser (for ex. http://localhost:9090). You should see ThingsBoard login page. Use the following default credentials:

You can always change passwords for each account in account profile page.

Detaching, stop and start commands

You can detach from session terminal with Ctrl-p Ctrl-q - the container will keep running in the background.

To reattach to the terminal (to see ThingsBoard logs) run:

$ docker attach mytb

To stop the container:

$ docker stop mytb

To start the container:

$ docker start mytb

Upgrading

In order to update to the latest image, open “Docker Quickstart Terminal” and execute the following commands:

$ docker pull thingsboard/tb-cassandra
$ docker stop mytb
$ docker run -it -v mytb-data:/data --rm thingsboard/tb-cassandra upgrade-tb.sh
$ docker rm mytb
$ docker run -it -p 9090:9090 -p 1883:1883 -p 5683:5683/udp -v ~/mytb-data:/data -v ~/mytb-logs:/var/log/thingsboard --name mytb --restart always thingsboard/tb-cassandra

NOTE: if you use different database change image name in all commands from thingsboard/tb-cassandra to thingsboard/tb-postgres or thingsboard/tb correspondingly.

NOTE: replace volume mytb-data with volume used during container creation.

Troubleshooting

DNS issues

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

Next steps