Thingsboard Gateway IoT

Thingsboard Gateway IoT


Thingsboard, a leading open-source IoT platform, enables rapid development, management, and scaling of IoT projects. It is highly scalable, fault-tolerant, robust, efficient, customizable, and durable IoT platform. Thingsboard provided default pre-configured live demo instance for quick testing. Thingsboard IoT gateway integrates devices connected to third-party and legacy systems. In this blog, let us discuss about installing and setting up Thingsboard IoT gateway on Windows and performing testing with Thingsboard live demo instance.


Note: To know more about installing Thingsboard locally, refer our previous blog on Thingsboard Installation on Windows.

Use Case

Installing Java 8

Install Java 8 on Windows machine. If already installed, check the version of Java by using the below command:


Installing TB Gateway

To install TB Gateway, perform the following:

  • Double-click on the downloaded tb-gateway configuration file that is a pre-archived file. You can view a list of files in the tb-gateway folder as shown in the below diagram:


  • Click Windows Start button.
  • Search cmd and press “Ctrl + Shift + Enter” keys to open Administrator command prompt.
  • Go to tb-gateway folder directory and enter the below command to install TB Gateway: C:\tb-gateway>install.bat


Provisioning IoT Gateway

In this section, let us discuss about provisioning the Gateway by using Live Demo instance. To connect IoT Gateway to Thingsboard server, gateway credentials are required. Let us consider access token credentials for simple and better understanding. To provision the gateway, perform the following:

  • Create a tenant administrator account.
  • Log in to Thingsboard.
  • On the left pane, click Device option as shown in the below diagram:


  • Name the device.
  • Enable “Is gateway” option as shown in the below diagram:


  • On successfully creating the device, open the device card.
  • Click “COPY ACCESS TOKEN” button to copy your access token as it is needed during configuration process.


Configuring IoT Gateway

To configure IoT gateway, perform the following steps:

  • Open tb-gateway configuration folder as shown in the below diagram:


  • Open tb-gateway.yml file.
  • Change property to Thingsboard host (Use “” as live demo instance is used).
  • Change gateway. security. accessToken property to newly created device token that was copied during IoT gateway provisioning. The tb-gateway.yml file configuration setup looks similar to the below diagram:


  • On completing edit, save the file and close it.

Launching IoT Gateway

To launch IoT Gateway, perform the following:

  • Open the administrator command prompt.
  • Execute the below command to start the tb-gateway process:
select Note: To stop or restart the tb-gateway process, use the below commands:

IoT Gateway Statistics

To view the IoT gateway statistics, perform the following:

  • On successfully starting the tb-gateway, go to open your device.
  • Check “devicesOnline, attributesUploaded, and telemetryUploaded” Keys.
  • Ensure that values of all the keys are 0 as shown in the below diagram to confirm successful connection of IoT gateway with Thingsboard server.



In this blog, we discussed about installing and configuring Thingsboard IoT gateway with proper commands. In our next blog, let us discuss about connecting IoT gateway extension with external communication protocol broker, and mapping JSON with custom protocol message mappers and so on.


Getting Started Thingsboard:

6916 Views 5 Views Today