This guide will help you to install and start ThingsBoard Gateway using Docker Compose on Linux or Mac OS.
Prerequisites
- Install Docker Compose;
- You will need to have access to ThingsBoard. The easiest way is to use the ThingsBoard Demo server. The alternative option is to install the ThingsBoard locally using the installation guide.
Download docker-compose file
-
Go to the “Dashboards” page and open the “ThingsBoard IoT Gateways” dashboard;
-
Click the “plus” icon in the upper right corner to add a new gateway. Input the gateway name, specify the “default” device profile, and click “Create”;
-
The “Docker commands” window will open. Click the “Download” button to download docker-compose file for your gateway.
Running
Click the Docker QuickStart icon to launch a pre-configured Docker Toolbox terminal.
Start the Gateway by executing the following command from the folder containing the docker-compose.yml file in the Terminal:
1
docker compose up
Detaching commands
To detach from session (the container will keep running in the background) execute the following command:
1
docker compose up -d
To reattach to the terminal (to look at Gateway logs) execute the following command:
1
docker attach tb-gateway
Upgrading
In order to update to the latest image, execute the following commands:
1
2
3
docker compose down
docker pull thingsboard/tb-gateway
docker compose up