Stand with Ukraine flag
Try it now Pricing
IoT Gateway
Community Edition Professional Edition Cloud Edge PE Edge IoT Gateway License Server Trendz Analytics Mobile Application PE Mobile Application MQTT Broker
Installation > Installation from sources (Latest version)
Getting Started Documentation

IoT Gateway installation from sources.

Installation from sources

To install ThingsBoard Gateway from sources, you should follow steps below:

1. Install required libraries to the system with apt:

sudo apt install python3-dev python3-pip python3-venv libglib2.0-dev git

2. Download repository from GitHub:

git clone --recurse-submodules --depth 1

3. Move into downloaded directory:

cd thingsboard-gateway

4. Create and activate virtual environment:

python3 -m venv venv && source venv/bin/activate

5. Install python requirements:

pip install -r requirements.txt

6. Install the library:

python install

7. Create “logs” folder:

mkdir logs

8. Configure the gateway to work with your instance of the ThingsBoard platform: change the “host” and “accessToken” to your values in a tb_gateway.json configuration file. You can find a description of this file in the IoT Gateway Configuration guide.

The tb_gateway.json file is located in the config folder:


9. Run gateway, to check installation result:

python3 ./thingsboard_gateway/

Build local docker image

In order to build local docker image, follow the next steps:

1. Copy Dockerfile to root folder, using the following command:

cp docker/Dockerfile .

2. From project root folder execute the following command:

docker build -t local-gateway . 

Hot Reloader

If you are using Gateway for development, you can enable Hot Reloader to restart Gateway every time when you edit any project file.

To run Gateway with Hot Reloader, use the following command:

python3 ./thingsboard_gateway/ true