Self-host ThingsBoard with Levelrail
An IoT platform to collect, store and visualise device data, in one container with its own PostgreSQL.
- Authorthingsboard
- LicenceApache-2.0
- Memory4 GiB
- Services1
How to self-host ThingsBoard
-
Pull the images
One image is pulled on your server.
Show images
thingsboard/tb-postgres:4.2.1.1
-
Create the app
One service starts in a single Compose app, with 2 named volume mounts for your data, on ports 8080, 1883.
-
Fill in the secrets
1 setting is preset, you do not have to fill in anything.
-
Open it
Without a domain the app gets an sslip.io address; add --domain SERVICE=HOST to use your own.
After the first start
- Sign in as tenant@thingsboard.org with password tenant and change it at once. The first start takes several minutes.
ThingsBoard requirements
- Memory
- About 4 GiB
- Architectures
- amd64 unknown, arm64 unknown
- Ports
- 8080, 1883
- Domain
- Optional, an sslip.io address is used without one
- Settings
- none to fill in
- License
- Apache-2.0, permissive license
- Listed. It is in the catalog but not verified. Back up the data volume before changing an image tag.
Install Levelrail first
On a server with Levelrail running, run the command above, or open the dashboard: Apps, New app, Browse templates, then ThingsBoard. New to Levelrail? Install it on a fresh VPS first.
docker pull ghcr.io/glincker/levelrail:latest Then levelrail-cli login --device. See Getting started and the ThingsBoard docs page.
Deploy ThingsBoard your way
Every format below deploys the same pinned images. Pick the one that fits how you work.
Deploy ThingsBoard from the CLI
levelrail-cli templates deploy thingsboard --name my-thingsboard Deploy ThingsBoard with the API
curl -X POST -H "Authorization: Bearer $TOKEN" \
https://levelrail.example.com/api/v1/service-templates/thingsboard/deploy ThingsBoard configuration
ThingsBoard services
| Service | Image | Ports | Volumes |
|---|---|---|---|
| thingsboard | thingsboard/tb-postgres:4.2.1.1 | 8080, 1883 | data -> /datalogs -> /var/log/thingsboard |
ThingsBoard environment variables
| Variable | Service | Value |
|---|---|---|
| TB_QUEUE_TYPE | thingsboard | Preset by the template |
Ports and volumes
- Ports
- 8080, 1883
- Volumes
- 2 named mounts: data -> /data, logs -> /var/log/thingsboard
ThingsBoard FAQ
How much memory does ThingsBoard need?
The catalog lists about 4 GiB of memory for ThingsBoard.
Does ThingsBoard run on arm64?
For ThingsBoard, arm64 support is not confirmed; amd64 is unknown.
What licence is ThingsBoard under?
ThingsBoard is licensed under Apache-2.0, which is permissive, with few conditions on reuse.
Does ThingsBoard need configuration before it starts?
No. The template fills in its own defaults.
Which database does ThingsBoard bundle?
The template includes Postgres, running as part of the stack.
Which ports does ThingsBoard use?
ThingsBoard listens on ports 8080 and 1883 inside the stack.
Where does ThingsBoard keep its data?
In named volumes: data mounted at /data and logs mounted at /var/log/thingsboard.
Can I deploy ThingsBoard on Dokploy or Dokku?
The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list has an entry with the id thingsboard for this app, so check that entry as well. Dokku deploys container images with its own commands, so the pinned image thingsboard/tb-postgres:4.2.1.1 is what you deploy there.