Skip to content
Stand with Ukraine flag

Upgrade instructions

Check your upgrade path, prepare each release, then run the upgrade for your deployment

TBMQ upgrades one release at a time. Each upgrade migrates the PostgreSQL database to the new version and restarts TBMQ on the new image; some releases also need manual changes first.

  1. Find your current version. Log in to the TBMQ UI: the Version card on the Home page shows the deployed version under Current.

    To confirm which version the database is on, run this against the TBMQ database:

    SELECT schema_version FROM tb_schema_settings;

    The result encodes the version as major × 1000000 + minor × 1000 + patch. For example, 2004000 is 2.4.0.

  2. Back up PostgreSQL, for example with pg_dump, or with your managed database’s snapshots.

  3. Read the notes for every release between your version and the target, not only the last one. Some releases need changes before the upgrade runs, and each note says whether you must stop TBMQ or can upgrade without downtime.

Upgrade along this chain one step at a time: each upgrade accepts only the release right before it. The one exception is 2.1.0, which accepts both 2.0.0 and 2.0.1. Select a version to jump to its notes.

Every version note says which of two kinds of upgrade it is:

  • Stop TBMQ Stop every TBMQ node before the upgrade migrates the database, then start them on the new version. MQTT clients cannot connect until the nodes are back.
  • Rolling upgrade The database is migrated while the old nodes keep running, then the nodes are replaced one at a time. The cluster keeps accepting connections: clients on the node being replaced are disconnected, and when they reconnect, the load balancer sends them to a running node.

A rolling upgrade needs at least two TBMQ nodes and a deployment that replaces them one by one:

Deployment Rolling upgrade
Docker (Linux, macOS, Windows) No — a single node, so clients are disconnected while it restarts
Docker Compose cluster No — its upgrade procedure stops every node; clients can reconnect once the cluster is back
Kubernetes scripts (Minikube, AWS, Azure, GCP) Yes — pods are replaced one at a time, each only after the previous one is ready
Helm Yes — same one-at-a-time pod replacement

The Kubernetes manifests and the Helm chart run two TBMQ nodes by default. If you need upgrades without downtime, deploy on Kubernetes or Helm.

Open the guide for your deployment. Its Upgrading section has the commands, plus any deployment-specific steps for the notes on this page.

What each upgrade changes and what you must do, newest first.

From 2.4.1. The upgrade only records the new schema version — no table is created or altered, and no data is migrated.

Downtime: Rolling upgrade on deployments that support it.

Check before upgrading:

  • SCRAM-only authentication. With SCRAM as the only enabled provider, TBMQ now refuses clients that send no MQTT 5 Authentication Method. 2.4.1 and earlier accepted them without credentials, as DEVICE clients with no topic restrictions. Move every client to SCRAM before upgrading, as Accept only SCRAM clients describes. During a rolling upgrade, nodes still on 2.4.1 keep accepting such clients until they are replaced.
  • Kafka integration with Send only message payload. A payload that is not valid UTF-8 is now sent as its raw bytes instead of Base64. Update consumers that decode the Base64. During a rolling upgrade, an Integration Executor still on 2.4.1 keeps sending Base64.
  • Kafka integration value serializer. Record values are now always sent as bytes, and the JSON body as UTF-8. A value.serializer in Other properties is ignored for every Kafka integration, with a warning in the Integration Executor log, and serializer.encoding or value.serializer.encoding no longer changes how the value is encoded. serializer.encoding still applies to the record key. See the Kafka integration page.

See the 2.4.2 release notes for the other changes.

From 2.4.0. The upgrade only records the new schema version — no table is created or altered, and no data is migrated.

Downtime: Rolling upgrade on deployments that support it.

Check before upgrading: MQTT_TOPIC_MAX_SEGMENTS_COUNT now counts topic segments instead of / delimiters. If you set it, raise it by 1 to keep the previous limit. The default 0 (no limit) is unaffected. See the 2.4.1 release notes for the other behavior changes.

From 2.3.0. The upgrade only records the new schema version — no table is created or altered, and no data is migrated.

Downtime: Rolling upgrade on deployments that support it. During a rolling upgrade, don’t create, edit or delete integrations until every TBMQ node runs 2.4.0: 2.3.0 nodes ignore the integration change notifications that 2.4.0 nodes send.

Check before upgrading: if you scrape TBMQ metrics, several Prometheus metric and tag names changed, so queries, recording rules, alerts and dashboards need updating. The 2.4.0 release notes list them.

From 2.2.0. This release replaces the Bitnami images for third-party components with official open-source images, in TBMQ’s Docker Compose files and Kubernetes manifests alike.

Downtime: Stop TBMQ — stop every TBMQ node before the upgrade.

Component 2.2.0 2.3.0 What it means for your data
PostgreSQL postgres:16 postgres:17 Major-version upgrade: PostgreSQL 17 cannot open a 16 data directory, so the data must be migrated
Kafka bitnamilegacy/kafka:3.7.0 apache/kafka:4.0.0 New data directory — the Bitnami volume cannot be reused
Redis → Valkey bitnamilegacy/redis:7.2.5 valkey/valkey:8.0 New data directory and a new volume

The TBMQ upgrade migrates only the PostgreSQL schema. It does not upgrade PostgreSQL itself and moves no Kafka or Redis data. Before running it:

  1. Back up everything you intend to keep: the PostgreSQL database (for example, with pg_dump), and the Kafka and Redis volumes if you plan to migrate them.
  2. Upgrade PostgreSQL 16 to 17, for example with pg_upgrade or a dump and restore into a fresh PostgreSQL 17 instance.
  3. Decide what to do with Kafka and Redis data: migrate it manually to the new images, or start them on new, empty volumes.

These changes follow the long-term plan in the Bitnami image migration guide. Contact us if you need guidance on the migration.

From 2.1.0. MQTT authentication settings move from YAML and environment variables into the database. The upgrade creates the authentication providers from these legacy variables, each defaulting to false:

  • SECURITY_MQTT_BASIC_ENABLED — enables the Basic provider
  • SECURITY_MQTT_SSL_ENABLED — enables the X.509 provider
  • SECURITY_MQTT_SSL_SKIP_VALIDITY_CHECK_FOR_CLIENT_CERT — usually false

Downtime: Stop TBMQ — stop every TBMQ node before the upgrade.

Do before upgrading: pass your current values of these variables to the upgrade. Where they go depends on the deployment, and the deployment guide says which file to set them in.

The upgrade also makes MQTT client credential names unique: where two credentials share a name, the later one gets a random three-character suffix.

From 2.0.0 or 2.0.1. From this release on, the upgrade detects the source version itself — fromVersion is no longer needed.

Downtime: Stop TBMQ — stop every TBMQ node before the upgrade.

Do before upgrading:

  • Add the Integration Executor service. This release introduces the Integration Executor microservice; the deployment guide shows how to add it.
  • Upgrade the third-party services. PostgreSQL moves from 15 to 16, a major-version upgrade that needs a data migration (pg_upgrade or dump and restore). Kafka moves from 3.5.1 to 3.7.0 and Redis from 7.0 to 7.2.5; follow each project’s upgrade notes.

From 1.4.0, with fromVersion set to 1.4.0. Redis becomes a required component: TBMQ now stores messages for persistent DEVICE clients in Redis instead of PostgreSQL, and the upgrade copies the stored messages across. See the architecture for details.

Downtime: Stop TBMQ — stop every TBMQ node before the upgrade.

Do before upgrading: back up PostgreSQL. Standalone Docker deployments must also add a Redis service; the Docker guides show how.

Upgrading to 2.0.1 and earlier

Section titled Upgrading to 2.0.1 and earlier

Downtime: Stop TBMQ — stop every TBMQ node before each of these upgrades.

They need no other preparation, but you must pass the version you are upgrading from as fromVersion:

Target fromVersion
2.0.1 2.0.0
1.4.0 1.3.0
1.3.0 1.2.1
1.2.1 1.2.0
1.2.0 1.1.0
1.1.0 1.0.0 or 1.0.1

The upgrade validates the database before it changes anything. If a check fails, the upgrade stops without touching the database; search its output for Upgrade failed: and match the message that follows it below.

Upgrade failed: database already upgraded to current version.

The database is already on the version you are upgrading to, so there is nothing to do — usually because this upgrade already completed. Start TBMQ on the new version.

Upgrade failed: database version 'X' is not supported for upgrade. Supported versions are: [...]

The database is on version X, but this upgrade accepts only the versions in the list — normally just the release immediately before the target. Upgrade one release at a time along the supported upgrade paths above, starting from X.

Upgrade failed: can't upgrade TBMQ CE database using TBMQ PE. (or … TBMQ PE database using TBMQ CE.)

The edition you are upgrading with does not match the edition recorded in the database. Use TBMQ to upgrade a TBMQ database and TBMQ PE to upgrade a TBMQ PE database.

Upgrade failed: can't upgrade TBMQ null database using TBMQ CE.

The tb_schema_settings table is empty: the upgrade is pointed at the wrong database, or at one that a TBMQ installation never initialized. Check the database connection settings of the upgrade.

Upgrade failed: the database schema version is missing.

The tb_schema_settings table records an edition but no version, or it is empty and the checks were skipped with SKIP_SCHEMA_VERSION_CHECK. Check that the upgrade points at your TBMQ database.

Setting the SKIP_SCHEMA_VERSION_CHECK environment variable to true on the upgrade makes it skip all of the validation above and run regardless. Set it where your deployment’s upgrade reads its environment:

Deployment Where to set SKIP_SCHEMA_VERSION_CHECK=true
Docker (Linux, macOS, Windows) .tbmq-upgrade.env, next to docker-compose.yml
Docker Compose cluster tbmq.env
Kubernetes scripts (Minikube, AWS, Azure, GCP) the env list of the tb-db-setup pod in database-setup.yml

Remove it again once the upgrade has run.

A normal upgrade never needs it. The new version is recorded only after the schema and data changes succeed, so a run that fails part-way leaves the old version in place, and the check lets you run the upgrade again once the cause is fixed.