Documentation for installation and configuration of ThingsBoard IoT Platform.

Installing ThingsBoard on Raspberry Pi 3 Model B

IoT PaaS Demo

We recommend to use ThingsBoard Professional Edition Live Demo for the seamless experience and the newest features from the latest source code!

Save time on the installation and configuration with several pre-provisioned devices, dashboards available in the cloud and pre-integrated email server to create new customer accounts and users.

This guide describes how to install ThingsBoard on a Raspberry Pi 3 running Raspbian Jessie.

Third-party components installation


ThingsBoard service is running on Java 8. Oracle Java 8 is already pre-installed on Raspbian. You can check java version using the following command

$ java -version
java version "1.8.0_65"
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) Client VM (build 25.65-b01, mixed mode)

Any Java version higher than or equal to 1.8 is fine.

External database installation

ThingsBoard is able to use SQL or NoSQL(Cassandra) database layer. You can configure your platform to use either scalable Cassandra DB cluster or various SQL databases. If you prefer to use an SQL database, we recommend PostgreSQL.

By default, ThingsBoard uses embedded HSQLDB instance which is very convenient for running tests and development but IS NOT RECOMMENDED for any evaluation or production environments.

SQL Database: PostgreSQL

NOTE: This is an optional step. It is required only for production usage. You can use embedded HSQLDB for platform evaluation or development

Instructions listed below will help you to install PostgreSQL.

sudo apt-get update
sudo apt-get install postgresql postgresql-contrib
sudo service postgresql start

Once PostgreSQL is installed you may want to create a new user or set the password for the the main user.

See the following guides for more details: using postgresql roles and databases and changing the postgres user password

When it’s done, connect to the database and create thingsboard DB:

psql -U postgres -d postgres -h -W

CREATE DATABASE thingsboard;

ThingsBoard service installation

Download installation package or build it from source.

# Download the package
$ wget
# Install ThingsBoard as a service
$ sudo dpkg -i thingsboard-2.3.1.deb
# Update ThingsBoard memory usage and restrict it to 150MB in /etc/thingsboard/conf/thingsboard.conf
export JAVA_OPTS="$JAVA_OPTS -Dplatform=rpi -Xms256M -Xmx256M"

Configure ThingsBoard to use PostgreSQL

Edit ThingsBoard configuration file

sudo nano /etc/thingsboard/conf/thingsboard.yml

Comment ‘# HSQLDB DAO Configuration’ block.

# HSQLDB DAO Configuration
#  data:
#    jpa:
#      repositories:
#        enabled: "true"
#  jpa:
#    hibernate:
#      ddl-auto: "validate"
#    database-platform: "org.hibernate.dialect.HSQLDialect"
#  datasource:
#    driverClassName: "${SPRING_DRIVER_CLASS_NAME:org.hsqldb.jdbc.JDBCDriver}"
#    url: "${SPRING_DATASOURCE_URL:jdbc:hsqldb:file:${SQL_DATA_FOLDER:/tmp}/thingsboardDb;sql.enforce_size=false}"
#    username: "${SPRING_DATASOURCE_USERNAME:sa}"

Uncomment ‘# PostgreSQL DAO Configuration’ block. Be sure to update the postgres databases username and password in the bottom two lines of the block (here, as shown, they are both “postgres”).

# PostgreSQL DAO Configuration
        enabled: "true"
      ddl-auto: "validate"
    database-platform: "org.hibernate.dialect.PostgreSQLDialect"
    driverClassName: "${SPRING_DRIVER_CLASS_NAME:org.postgresql.Driver}"
    url: "${SPRING_DATASOURCE_URL:jdbc:postgresql://localhost:5432/thingsboard}"
    username: "${SPRING_DATASOURCE_USERNAME:postgres}"
    password: "${SPRING_DATASOURCE_PASSWORD:postgres}"

Run installation script

Once ThingsBoard service is installed, you can execute the following script:

# --loadDemo option will load demo data: users, devices, assets, rules, widgets.
sudo /usr/share/thingsboard/bin/install/ --loadDemo

Start ThingsBoard service

Execute the following command to start ThingsBoard:

sudo service thingsboard start

Once started, you will be able to open Web UI using the following link:


NOTE: Please allow up to 2 minutes for the Web UI to start


ThingsBoard logs are stored in the following directory:


You can issue the following command in order to check if there are any errors on the backend side:

cat /var/log/thingsboard/thingsboard.log | grep ERROR

Next steps