This guide describes how to install ThingsBoard on a Windows machine. Instructions below are provided for Windows 10/8.1/8/7 32-bit/64-bit. Hardware requirements depend on chosen database and amount of devices connected to the system. To run ThingsBoard and PostgreSQL on a single machine you will need at least 2Gb of RAM. To run ThingsBoard and Cassandra on a single machine you will need at least 8Gb of RAM.
ThingsBoard service is running on Java 8. Follow this instructions to install OpenJDK 8.
You can check the installation using the following command (using Command Prompt):
java -version
Expected command output is:
C:\Users\User>java -version
openjdk version "1.8.0_212"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_212-b04)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.212-b04, mixed mode)
Download and run the installation package.
https://dist.thingsboard.io/thingsboard-windows-setup-3.0.1pe.exe
Note: We assume you have installed ThingsBoard to default location: C:\Program Files (x86)\thingsboard
We assume you have already chosen your subscription plan or decided to purchase a perpetual license. If not, please navigate to pricing page to select the best license option for your case and get your license. See How-to get pay-as-you-go subscription or How-to get perpetual license for more details.
Once you get the license secret, you should put it to the thingsboard configuration file.
Open the Notepad or other editor as administrator user (right click on the app icon and select “Run as administrator”).
Open the following file for editing (select “All Files” instead of “Text Documents” in file choosing dialog, the encoding is UTF-8):
C:\Program Files (x86)\thingsboard\conf\thingsboard.yml
Scroll to the bottom of the file and locate the following configuration block:
license:
secret: "${TB_LICENSE_SECRET:}" # license secret obtained from ThingsBoard License Portal (https://license.thingsboard.io)
and put your license secret. See example below:
license:
secret: "${TB_LICENSE_SECRET:YOUR_LICENSE_SECRET_HERE}" # license secret obtained from ThingsBoard License Portal (https://license.thingsboard.io)
ThingsBoard is able to use SQL or hybrid database approach. See corresponding architecture page for more details.
PostgreSQL InstallationDownload the installation file (PostgreSQL 11.7 or newer releases) here and follow the installation instructions. During PostgreSQL installation, you will be prompted for superuser (postgres) password. Don’t forget this password. It will be used later. For simplicity, we will substitute it with “postgres”. Create ThingsBoard DatabaseOnce installed, launch the “pgAdmin” software and login as superuser (postgres). Open your server and create database “thingsboard” with owner “postgres”. ThingsBoard ConfigurationIn case you have specified the PostgreSQL superuser password as “postgres”, you can skip this step. Open the Notepad or other editor as administrator user (right click on the app icon and select “Run as administrator”).
and locate “# SQL DAO Configuration” block. Don’t forget to replace “postgres” with your real postgres user password:
locate “SQL_POSTGRES_TS_KV_PARTITIONING” parameter in order to override the default value for timestamp key-value storage partitioning size:
|
PostgreSQL InstallationDownload the installation file (PostgreSQL 11.7 or newer releases) here and follow the installation instructions. During PostgreSQL installation, you will be prompted for superuser (postgres) password. Don’t forget this password. It will be used later. For simplicity, we will substitute it with “postgres”. Create ThingsBoard DatabaseOnce installed, launch the “pgAdmin” software and login as superuser (postgres). Open your server and create database “thingsboard” with owner “postgres”. Cassandra InstallationInstructions listed below will help you to install Cassandra.
ThingsBoard ConfigurationOpen the Notepad or other editor as administrator user (right click on the app icon and select “Run as administrator”).
and locate “# SQL DAO Configuration” block. Don’t forget to replace “postgres” with your real postgres user password:
locate “DATABASE_TS_TYPE” parameter. Replace “sql” with “cassandra”.
You can optionally tune parameters inside “cassandra” configuration block.
|
PostgreSQL InstallationDownload the installation file (PostgreSQL 11.7 or newer releases) here and follow the installation instructions. During PostgreSQL installation, you will be prompted for superuser (postgres) password. Don’t forget this password. It will be used later. For simplicity, we will substitute it with “postgres”. Create ThingsBoard DatabaseOnce installed, launch the “pgAdmin” software and login as superuser (postgres). Open your server and create database “thingsboard” with owner “postgres”. TimescaleDB InstallationPlease refer to the official TimescaleDB installation page on Windows and follow the instructions in accordance with your installed PostgreSQL version. ThingsBoard ConfigurationOpen the Notepad or other editor as administrator user (right click on the app icon and select “Run as administrator”).
and locate “# SQL DAO Configuration” block. Don’t forget to replace “postgres” with your real postgres user password:
locate “DATABASE_TS_TYPE” parameter. Replace “sql” with “timescale”.
You can optionally tune parameters that refer to the Timescale DB configuration: “timescale” configuration block inside “sql” configuration block.
|
ThingsBoard is able to use various messaging systems/brokers for storing the messages and communication between ThingsBoard services. How to choose the right queue implementation?
In Memory queue implementation is built-in and default. It is useful for development(PoC) environments and is not suitable for production deployments or any sort of cluster deployments.
Kafka is recommended for production deployments. This queue is used on the most of ThingsBoard production environments now. It is useful for both on-prem and private cloud deployments. It is also useful if you like to stay independent from your cloud provider. However, some providers also have managed services for Kafka. See AWS MSK for example.
RabbitMQ is recommended if you don’t have much load and you already have experience with this messaging system.
AWS SQS is a fully managed message queuing service from AWS. Useful if you plan to deploy ThingsBoard on AWS.
Google Pub/Sub is a fully managed message queuing service from Google. Useful if you plan to deploy ThingsBoard on Google Cloud.
Azure Service Bus is a fully managed message queuing service from Azure. Useful if you plan to deploy ThingsBoard on Azure.
See corresponding architecture page and rule engine page for more details.
In Memory queue is built-in and enabled by default. No additional configuration steps required. |
Kafka InstallationApache Kafka is an open-source stream-processing software platform. Install KafkaUse this instruction for installing Kafka in Docker container. ThingsBoard ConfigurationOpen the Notepad or other editor as administrator user (right click on the app icon and select “Run as administrator”).
and locate “queue:” block. Make sure the queue type is “kafka”, and don’t forget to replace “localhost:9092” with your real Kafka bootstrap servers:
|
AWS SQS ConfigurationTo access AWS SQS service, you first need to create an AWS account. To work with AWS SQS service you will need to create your next credentials using this instruction:
ThingsBoard ConfigurationOpen the Notepad or other editor as administrator user (right click on the app icon and select “Run as administrator”).
and locate “queue:” block. Make sure the queue type is “aws-sqs”, and don’t forget to replace “YOUR_KEY”, “YOUR_SECRET” with your real AWS SQS IAM user credentials and “YOUR_REGION” with your real AWS SQS account region:
|
Google Pub/Sub ConfigurationTo access Pub/Sub service, you first need to create an Google cloud account. To work with Pub/Sub service you will need to create a project using this instruction. Create service account credentials with the role “Editor” or “Admin” using this instruction, and save json file with your service account credentials step 9 here. ThingsBoard ConfigurationOpen the Notepad or other editor as administrator user (right click on the app icon and select “Run as administrator”).
and locate “queue:” block. Make sure the queue type is “pubsub”, and don’t forget to replace “YOUR_PROJECT_ID”, “YOUR_SERVICE_ACCOUNT” with your real Pub/Sub project id, and service account (it is whole data from json file):
|
Azure Service Bus ConfigurationTo access Azure Service Bus, you first need to create an Azure account. To work with Service Bus service you will need to create a Service Bus Namespace using this instruction. Create Shared Access Signature using this instruction. ThingsBoard ConfigurationOpen the Notepad or other editor as administrator user (right click on the app icon and select “Run as administrator”).
and locate “queue:” block. Make sure the queue type is “service-bus”, and don’t forget to replace “YOUR_NAMESPACE_NAME” with your real Service Bus namespace name, and “YOUR_SAS_KEY_NAME”, “YOUR_SAS_KEY” with your real Service Bus credentials. Note: “YOUR_SAS_KEY_NAME” it is “SAS Policy”, “YOUR_SAS_KEY” it is “SAS Policy Primary Key”:
|
RabbitMQ InstallationFor installing RabbitMQ use this instruction. ThingsBoard ConfigurationOpen the Notepad or other editor as administrator user (right click on the app icon and select “Run as administrator”).
and locate “queue:” block. Make sure the queue type is “rabbitmq” and don’t forget to replace “YOUR_USERNAME” and “YOUR_PASSWORD” with your real user credentials, “localhost” and “5672” with your real RabbitMQ host and port:
|
Open the Notepad or other editor as administrator user (right click on the app icon and select “Run as administrator”).
Open the following file for editing (select “All Files” instead of “Text Documents” in file choosing dialog, the encoding is UTF-8):
C:\Program Files (x86)\thingsboard\thingsboard.xml
Locate the following lines to the configuration file.
<startargument>-Xms512m</startargument>
<startargument>-Xmx1024m</startargument>
and change them to
<startargument>-Xms256m</startargument>
<startargument>-Xmx256m</startargument>
Launch windows shell (Command Prompt) as Administrator. Change directory to your ThingsBoard installation directory.
Execute install.bat script to install ThingsBoard as a Windows service (or run “install.bat –loadDemo” to install and add demo data). This means it will be automatically started on system startup. Similar, uninstall.bat will remove ThingsBoard from Windows services. The output should be similar to this one:
C:\Program Files (x86)\thingsboard>install.bat --loadDemo
Detecting Java version installed.
CurrentVersion 18
Java 1.8 found!
Installing thingsboard ...
...
ThingsBoard installed successfully!
Now let’s start the ThingsBoard service! Open the command prompt as an Administrator and execute the following command:
net start thingsboard
Expected output:
The ThingsBoard Server Application service is starting.
The ThingsBoard Server Application service was started successfully.
In order to restart the ThingsBoard service you can execute following commands:
net stop thingsboard
net start thingsboard
Once started, you will be able to open Web UI using the following link:
http://localhost:8080/
The following default credentials are available if you have specified –loadDemo during execution of the installation script:
You can always change passwords for each account in account profile page.
Download and extract the installation package.
https://dist.thingsboard.io/tb-web-report-windows-3.0.1pe.zip
Note: We assume you have extracted ThingsBoard Web Report Server to default location: C:\Program Files (x86)\tb-web-report
Launch windows shell (Command Prompt) as Administrator. Change directory to your ThingsBoard installation directory.
Execute install.bat script to install ThingsBoard Web Report Server as a Windows service. This means it will be automatically started on system startup. Similar, uninstall.bat will remove ThingsBoard from Windows services. The output should be like:
C:\Program Files (x86)\tb-web-report>install.bat
Installing tb-web-report ...
tb-web-report installed successfully!
Now let’s start the ThingsBoard service! Open the command prompt as an Administrator and execute the following command:
net start tb-web-report
Expected output:
C:\Program Files (x86)\tb-web-report>net start tb-web-report
The Thingsboard Web Report Microservice service is starting.
The Thingsboard Web Report Microservice service was started successfully.
The log files are located in logs folder (“C:\Program Files (x86)\thingsboard\logs” in our case).
The thingsboard.log file should contain following line:
YYYY-MM-DD HH:mm:ss,sss [main] INFO o.t.s.ThingsboardServerApplication - Started ThingsboardServerApplication in x.xxx seconds (JVM running for x.xxx)
In case of any unclear errors, use general troubleshooting guide or contact us.
In order to have external access to ThingsBoard Web UI and device connectivity (HTTP, MQTT, CoAP) you need to create a new inbound rule with Windows Firewall with Advanced Security.
Getting started guides - These guides provide quick overview of main ThingsBoard features. Designed to be completed in 15-30 minutes.
Connect your device - Learn how to connect devices based on your connectivity technology or solution.
Data visualization - These guides contain instructions how to configure complex ThingsBoard dashboards.
Data processing & actions - Learn how to use ThingsBoard Rule Engine.
IoT Data analytics - Learn how to use rule engine to perform basic analytics tasks.
Hardware samples - Learn how to connect various hardware platforms to ThingsBoard.
Advanced features - Learn about advanced ThingsBoard features.
Contribution and Development - Learn about contribution and development in ThingsBoard.