Skip to content

Cookie preferences

We use cookies for our own analytics, to see how our campaigns perform and, if you allow it, to load the site search from Google. We never sell your data. Necessary cookies keep the site working and cannot be switched off. See our Cookie Policy for details and our Privacy Policy for how we handle personal data.

Security, load balancing and remembering your cookie choice.

Show us which pages people read, how they find the site and where they get stuck, so we can improve it (Google Analytics).

Remember the campaign or partner link you arrived from, so we know which campaign or partner brought you when you sign up or contact us (partner program). We do not use it to build advertising profiles.

Load the site search from Google when you use it. Google sets its own cookies and shows ads in the search results.

776 Try for free Menu

TBMQ live demo

Try TBMQ in your browser

A free account on our public broker. Open the TBMQ UI and connect your MQTT clients. No credit card required.

Rather run it yourself? Install on your own servers

Install with Docker

Beta

TBMQ Lite is the single-node edition of TBMQ: one container and one data volume, with no Kafka, PostgreSQL or Valkey beside it. It keeps TBMQ’s MQTT 3.1, 3.1.1 and 5 handling, persistent sessions with durable offline queues, retained messages, all five authentication providers, the REST API and the web UI, and stores everything in an embedded database on the volume. It supports DEVICE clients only. To see how it differs from clustered TBMQ, read Lite compared with TBMQ.

Host Architectures Status
Linux with Docker Engine linux/amd64, linux/arm64 Supported. One image serves both architectures.
Raspberry Pi OS, 64-bit linux/arm64 Supported. A 32-bit OS cannot run the image.
Windows and macOS with Docker Desktop linux/amd64, linux/arm64 Supported. Use a named volume, as in the commands below.

The broker is sized for a container with 2 CPUs and 2 GB of memory, where it sustains 15,000 msg/s of QoS 1 throughput across 10,000 clients; it also starts in less memory. See Guarantees and limits for how it was measured.

Terminal window
docker run -d --name tbmq-lite --restart unless-stopped \
-p 1883:1883 -p 8083:8083 -p 8084:8084 \
-v tbmq-lite:/data thingsboard/tbmq-lite:2.5.0-beta
Port Purpose
1883 MQTT over TCP
8083 HTTP: the web UI, the REST API and the health endpoint
8084 MQTT over WebSocket, used by the web UI’s WebSocket client page

The TLS listeners (MQTTS on 8883, WSS on 8085) are off until you enable them, see Configuration.

Everything the broker keeps lives under /data: the store in /data/db and the checkpoints taken before an upgrade in /data/backups. Both commands above mount the named volume tbmq-lite there, so the data survives when the container is removed. Without -v, Docker keeps /data in an unnamed volume that a new container does not reuse: after an upgrade or a recreate the broker starts empty.

The broker runs as the non-root user with uid and gid 799. A named volume needs no preparation. A bind mount must be a directory that uid 799 can write, otherwise the broker cannot open its store:

Terminal window
sudo mkdir -p /srv/tbmq-lite
sudo chown 799:799 /srv/tbmq-lite
docker run -d --name tbmq-lite --restart unless-stopped \
-p 1883:1883 -p 8083:8083 -p 8084:8084 \
-v /srv/tbmq-lite:/data thingsboard/tbmq-lite:2.5.0-beta

Open http://localhost:8083 (or the host’s address) and sign in as the system administrator:

Field Value
Username sysadmin@thingsboard.org
Password sysadmin

The broker does not let this password in: it asks for a new one at once. The new password must meet the password policy and may not be sysadmin. After you set it, you are signed in.

To start with a password of your own, set TBMQ_ADMIN_PASSWORD on the first start, with your password in place of choose-a-strong-password, and sign in with it instead of sysadmin:

Terminal window
docker run -d --name tbmq-lite --restart unless-stopped \
-p 1883:1883 -p 8083:8083 -p 8084:8084 \
-e TBMQ_ADMIN_PASSWORD='choose-a-strong-password' \
-v tbmq-lite:/data thingsboard/tbmq-lite:2.5.0-beta
  • It applies only when the broker creates the system administrator, that is, on the first start with an empty volume. Changing or removing the variable later does nothing; change the password in the UI from the account’s profile instead.
  • It is used exactly as set, without trimming. It must be 6 to 72 characters long, at most 72 bytes in UTF-8, and not sysadmin, otherwise the broker does not start and the log names the variable.

Administrators you add later on the Users page with the default password are also asked to change it at their first sign-in.

After signing in, continue with Getting started.

The broker logs to standard output:

Terminal window
docker logs -f tbmq-lite

The first line shows what the start script read from the container’s limits and which JVM settings it chose, for example:

TBMQ Lite: memory 2048 MiB, CPUs 2 (cgroup v2), collector G1, max direct memory 204 MiB, jemalloc on

The image has a Docker health check, so docker ps shows the container as healthy once the broker is up.

  • Every 10 seconds it requests /actuator/health on the HTTP port inside the container and passes when the status is UP.
  • It follows HTTP_BIND_PORT, and HTTP_BIND_ADDRESS when that names one address. It needs the default actuator base path.
  • With SSL_ENABLED=true (HTTPS on the HTTP port) it only checks that the port accepts a connection.
  • To turn it off, run the container with --no-healthcheck, or set healthcheck: disable: true in Compose.

Stop and start the broker with docker stop tbmq-lite and docker start tbmq-lite. Docker’s default stop timeout of 10 seconds covers the broker’s shutdown, which waits up to STANDALONE_SHUTDOWN_DRAIN_TIMEOUT_MS (4 seconds by default) for the publishes in flight. If you raise that value, raise --stop-timeout with it.

Upgrade by recreating the container with the new image and the same volume:

  1. Back up the store.

    Download a backup first, see Backup and restore.

  2. Recreate the container.

    Terminal window
    docker pull thingsboard/tbmq-lite:<new version>
    docker stop tbmq-lite
    docker rm tbmq-lite
    docker run -d --name tbmq-lite --restart unless-stopped \
    -p 1883:1883 -p 8083:8083 -p 8084:8084 \
    -v tbmq-lite:/data thingsboard/tbmq-lite:<new version>

    The docker run line is the install command with the new tag. Run it with the options the broker was started with: the same -e settings and the same -v mounts. Without them the new container drops those settings, and a broker that kept its data in a bind mount starts on an empty tbmq-lite volume instead.

    With Compose, set the new tag in docker-compose.yml and run this instead. Compose pulls the image and recreates the container on the same volume:

    Terminal window
    docker compose up -d
  3. Check the log.

    On start the broker upgrades the store when the new version needs it. Before it changes anything, it takes a checkpoint named pre-upgrade-<from>-<to> under /data/backups and keeps the three newest.

A store written by a newer version is refused: going back to an older image is not supported, restore a backup taken with that version instead.

Terminal window
docker rm -f tbmq-lite
docker volume rm tbmq-lite