Skip to content

Cookie preferences

We use cookies for our own analytics, to see how our campaigns perform and, if you allow it, to load content from other services such as the Google site search. We never sell your data. Necessary cookies keep the site working and cannot be switched off. See our Cookie Policy for details and our Privacy Policy for how we handle personal data.

Security, load balancing and remembering your cookie choice.

Show us which pages people read, how they find the site and where they get stuck, so we can improve it (Google Analytics, Microsoft Clarity).

Show us which of our ad campaigns bring visitors to the site and remember the campaign or partner link you arrived from (Google Ads, LinkedIn, Meta, partner program). We do not use these cookies to build advertising profiles.

Load the site search from Google when you use it. Google sets its own cookies and shows ads in the search results.

© 2026 The ThingsBoard Authors
180 Try for free

ThingsBoard Cloud

Choose your data region

Your data stays in the region you choose, for residency and compliance. No credit card required.

Rather run it yourself? Install on your own servers

Deploy with IoT Gateway

ThingsBoard Edge can run alongside the ThingsBoard IoT Gateway on the same device. The IoT Gateway collects data from local sensors and legacy protocols, translates it into ThingsBoard-compatible format, and sends it to the Edge. The Edge rule engine processes it in real time and synchronizes results with the central server.

Architecture diagram: the IoT Gateway sends data to Edge, and Edge synchronizes with the ThingsBoard server
  • Docker installed on the IoT Gateway device.
  • A ThingsBoard server account (ThingsBoard Cloud or self-hosted).
  • A Linux-based IoT Gateway device with SSH access.
  1. Log in to your ThingsBoard server and go to Edge management > Edges.

  2. Click Add edge and select Add new edge.

  3. Enter a name for the Edge instance and click Add. The new Edge appears at the top of the list, and the Edge created! Check Install & Connect Instructions dialog opens with ready-to-use installation instructions. You can close it for now: the next step shows how to open the instructions again.

Step 2. Install Edge on the IoT Gateway device

Section titled “Step 2. Install Edge on the IoT Gateway device”

Connect to the device over SSH:

Terminal window
ssh username@ip_address

Replace username and ip_address with your device credentials. If SSH runs on a non-default port, add -p <port> to the command.

  1. Create a directory for the Edge service:

    Terminal window
    mkdir tb_edge
  2. Inside that directory, create a docker-compose.yml file:

    Terminal window
    nano docker-compose.yml
  3. On the server, go to Edge management > Edges, open the Edge, and click Install & Connect Instructions on its Details tab.

  4. Select the Docker tab, copy the configuration lines, paste them into docker-compose.yml, and save the file. Press CTRL+X to close the editor.

  5. Start the Edge container:

    Terminal window
    docker compose up -d
    docker compose logs -f mytbedge

    Run both commands from the tb_edge directory.

To verify Edge started successfully, log in to the Edge UI and go to Edge > Status. The Status field should show Connected.

To access the Edge UI from your local machine, open another terminal tab and set up SSH port forwarding:

Terminal window
ssh -N -L 8080:127.0.0.1:8080 username@ip_address
  • 8080 (first): The port on your local machine.
  • 127.0.0.1: The target host accessible from the IoT Gateway device.
  • 8080 (second): The port on the IoT Gateway device.
  • username: The username with access to the device.
  • ip_address: The IP address of the device.

Any connection to localhost:8080 on your local machine is forwarded to 127.0.0.1:8080 on the IoT Gateway device. Open http://127.0.0.1:8080 and log in with your tenant credentials.

  1. Open the Edge UI at http://127.0.0.1:8080, log in with your tenant credentials, and go to Devices & assets > Gateways.

  2. Click Add Gateway. In the Add gateway dialog, enter the gateway name in the Name field, select the default device profile, and click Create.

  3. The Launch command dialog opens. Under Download configuration file, click Download to get the docker-compose.yml file for the IoT Gateway. The file already contains the access token of the gateway and the address of the Edge. To open this dialog again later, open the gateway in the list and click Launch command.

Step 4. Install the IoT Gateway software on the device

Section titled “Step 4. Install the IoT Gateway software on the device”

Connect to the device over SSH:

Terminal window
ssh username@ip_address
  1. Create a directory for the IoT Gateway service:

    Terminal window
    mkdir iot_gateway
  2. Inside that directory, create a docker-compose.yml file:

    Terminal window
    nano docker-compose.yml
  3. Paste the contents of the downloaded docker-compose.yml into the new file and save it. Press CTRL+X to close.

  4. Start the IoT Gateway:

    Terminal window
    docker compose up -d
    docker compose logs -f

To verify the IoT Gateway connected successfully, go to Devices & assets > Gateways on the Edge. The Status of the gateway changes from Inactive to Active.