Skip to content
© 2026 The ThingsBoard Authors
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

Installing ThingsBoard on Raspberry Pi

This guide walks you through installing ThingsBoard on a Raspberry Pi, from a clean environment to a fully running instance. By the end, you will have a licensed, activated ThingsBoard instance — free, no credit card required — with a system administrator account and, optionally, a demo tenant.

  • Raspberry Pi with at least 4 GB of RAM
  • Raspberry Pi OS (64-bit) based on Debian 13 “Trixie” — earlier releases do not provide the OpenJDK 25 packages
  • A user account with sudo privileges
  • Outbound internet access to download packages and to reach the ThingsBoard License Portal during activation

ThingsBoard runs on the Java Virtual Machine and requires Java 25. Install OpenJDK 25:

Terminal window
sudo apt update
sudo apt install -y openjdk-25-jdk-headless

Set OpenJDK 25 as the default Java version:

Terminal window
sudo update-alternatives --config java

Verify the installation:

Terminal window
java -version

The reported version must be 25.

Download the installation package:

Terminal window
wget https://github.com/thingsboard/thingsboard/releases/download/v4.4/thingsboard-4.4.deb

Install ThingsBoard as a service:

Terminal window
sudo dpkg -i thingsboard-4.4.deb

Install PostgreSQL 16:

Terminal window
sudo apt install -y postgresql-common
sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh
sudo apt update
sudo apt -y install postgresql-16
sudo service postgresql start

Set a password for the postgres user:

Terminal window
sudo -u postgres psql -c "\password"

Enter and confirm the password when prompted. Connect to PostgreSQL and create the ThingsBoard database:

Terminal window
psql -U postgres -d postgres -h 127.0.0.1 -W
CREATE DATABASE thingsboard;

Press Ctrl+D twice to exit.

Configure ThingsBoard to use PostgreSQL. Edit the configuration file:

Terminal window
sudo nano /etc/thingsboard/conf/thingsboard.conf

Add the following lines. Replace PUT_YOUR_POSTGRESQL_PASSWORD_HERE with your actual postgres password:

Terminal window
# DB Configuration
export DATABASE_TS_TYPE=sql
export SPRING_DATASOURCE_URL=jdbc:postgresql://localhost:5432/thingsboard
export SPRING_DATASOURCE_USERNAME=postgres
export SPRING_DATASOURCE_PASSWORD=PUT_YOUR_POSTGRESQL_PASSWORD_HERE

ThingsBoard uses a message broker for internal communication between services. Choose one of the options below:

  • In Memory — built-in, default. Suitable for development and PoC environments. Not recommended for production or cluster deployments.
  • Confluent Cloud — fully managed streaming platform based on Kafka. Useful for cloud-agnostic deployments.

In Memory queue is built-in and enabled by default. No configuration needed.

Raspberry Pi devices typically have limited RAM. Edit the ThingsBoard configuration file:

Terminal window
sudo nano /etc/thingsboard/conf/thingsboard.conf

Add or update the following environment variable. Set the value to half of your total RAM (e.g. 2G for a 4 GB Raspberry Pi):

Terminal window
export JAVA_OPTS="$JAVA_OPTS -Xms2G -Xmx2G"

Run the installation script to initialize the database schema:

Terminal window
sudo /usr/share/thingsboard/bin/install/install.sh

Start the ThingsBoard service:

Terminal window
sudo service thingsboard start

Open the required ports in your firewall so devices and users can reach the platform — expand the list below for the full set of ports and protocols.

Full port list
PortProtocolDescription
8080TCPWeb UI and REST API. Not required if using a load balancer.
1883TCPMQTT
8883TCPMQTT over SSL
5683UDPCoAP
5684UDPCoAP over DTLS
5685UDPLwM2M CoAP
5686UDPLwM2M CoAP over DTLS
5687UDPLwM2M (Bootstrap)
5688UDPLwM2M over DTLS (Bootstrap)
161UDPSNMP
7070TCPEdge RPC (gRPC)
9090TCPRemote Integration Executor (gRPC)

Open ThingsBoard in a web browser:

http://localhost:8080

On first launch you are greeted with the activation screen:

Welcome to ThingsBoard 4.4.0
Get your free license and start building

Continue with the next step to license and activate your instance.

Step 8. License and Activate Your Instance

Section titled “Step 8. License and Activate Your Instance”

Opening ThingsBoard in your browser for the first time shows an activation welcome screen.

  1. Click Open the License Portal, then create an account or sign in.
  2. Choose a free license: Commercial (up to 100 devices, one server) or Non-commercial (up to 1,000 devices, any number of servers).
  3. Check the confirmation box to agree to the Terms of Use, Privacy Policy, and ThingsBoard License (BUSL 1.1), then click Accept and activate to issue the license and activate your instance.
  4. Click Continue setup on your instance to proceed to account creation. Your license key stays available on this screen and in your License Portal account.

Once activated, ThingsBoard prompts you to create your System Administrator account — the account that manages the platform itself (tenants, system settings, platform-wide resources).

  1. Enter Email, Password, and Confirm password.
  2. The Set up a demo tenant option is selected by default: it creates a ready-made tenant with dashboards, devices, and rule chains for exploring the platform before building your own solution. Clear it if you want to start with an empty platform.
  3. Click Create account. You are signed in as the system administrator.

Your ThingsBoard instance is now installed and running.

[Optional] Install ThingsBoard WebReport Component

Section titled “[Optional] Install ThingsBoard WebReport Component”

The WebReport service renders dashboards into PDF and PNG reports. Install it if you need scheduled or on-demand dashboard reports. Choose one of the installation methods below:

Install Docker:

Terminal window
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh

Create the Docker Compose file:

Terminal window
nano tb-web-report.yml

Add the following content:

version: '3.0'
services:
tb-web-report:
container_name: tb-web-report
restart: always
image: "thingsboard/tb-web-report:4.4.0"
ports:
- "8383:8383"
env_file:
- ./tb-web-report.env

Create the environment file:

Terminal window
nano tb-web-report.env

Add the following content:

HTTP_BIND_ADDRESS=0.0.0.0
HTTP_BIND_PORT=8383
LOGGER_LEVEL=info
LOG_FOLDER=logs
LOGGER_FILENAME=tb-web-report-%DATE%.log
DOCKER_MODE=true
DEFAULT_PAGE_NAVIGATION_TIMEOUT=120000
DASHBOARD_IDLE_WAIT_TIME=3000
USE_NEW_PAGE_FOR_REPORT=true

Start the WebReport service:

Terminal window
docker compose -f tb-web-report.yml up -d

Check the container logs:

Terminal window
docker logs -f tb-web-report

Check the service status:

Terminal window
sudo service thingsboard status

ThingsBoard logs are stored in /var/log/thingsboard. Check for errors:

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

Monitor logs in real time:

Terminal window
tail -f /var/log/thingsboard/thingsboard.log

For more troubleshooting tips, see the Troubleshooting guide.

With ThingsBoard running, these concept guides help you build your first solution: