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.
Before you upgrade
Section titled “Before you upgrade”-
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,2004000is 2.4.0. -
Back up PostgreSQL, for example with
pg_dump, or with your managed database’s snapshots. -
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.
Version history
Section titled Version historyThe table below lists all supported upgrade paths. Versions must be upgraded sequentially — you cannot skip versions.
| Target version | Upgrade from | Downtime | Notes |
|---|---|---|---|
| 2.4.2PE | 2.4.1PE | Rolling upgrade | See what the 2.4.2PE upgrade does below |
| 2.4.2PE | TBMQ 2.4.2 (CE) | Stop TBMQ | See CE-to-PE migration below |
| 2.4.1PE | 2.4.0PE | Rolling upgrade | See what the 2.4.1PE upgrade does below |
| 2.4.1PE | TBMQ 2.4.1 (CE) | Stop TBMQ | See CE-to-PE migration below |
| 2.4.0PE | 2.3.0PE | Rolling upgrade | See what the 2.4.0PE upgrade does below |
| 2.4.0PE | TBMQ 2.4.0 (CE) | Stop TBMQ | See CE-to-PE migration below |
| 2.3.0PE | 2.2.0PE | Stop TBMQ | |
| 2.3.0PE | TBMQ 2.3.0 (CE) | Stop TBMQ | See CE-to-PE migration below |
| 2.2.0PE | TBMQ 2.2.0 (CE) | Stop TBMQ | See CE-to-PE migration — third-party changes apply |
Downtime
Section titled “Downtime”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.
Run the upgrade
Section titled “Run the upgrade”Open the guide for your deployment. Its Upgrading section has the commands, plus any deployment-specific steps for the notes on this page.
Standalone
Cluster
Cloud
Helm
Upgrading to 2.4.2PE
Section titled Upgrading to 2.4.2PEThe 2.4.2PE upgrade only records the new schema version in the database — 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.1PE 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.1PE 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.1PE keeps sending Base64.
- Kafka integration value serializer. Record values are now always sent as bytes, and the JSON body as UTF-8. A
value.serializerin Other properties is ignored for every Kafka integration, with a warning in the Integration Executor log, andserializer.encodingorvalue.serializer.encodingno longer changes how the value is encoded.serializer.encodingstill applies to the record key. See the Kafka integration page.
See the 2.4.2 release notes for the other changes.
Upgrading to 2.4.1PE
Section titled Upgrading to 2.4.1PEThe 2.4.1PE upgrade only records the new schema version in the database — no table is created or altered, and no data is migrated.
Downtime: Rolling upgrade on deployments that support it. 2.4.1PE adds new source integration types; create them only after every TBMQ node and Integration Executor runs 2.4.1PE.
Review the behavior changes in the 2.4.1 release notes 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.
Upgrading to 2.4.0PE
Section titled Upgrading to 2.4.0PEThe 2.4.0PE upgrade records the new schema version and creates the dropped_msg table and its index, used by dropped message analytics.
Nothing else changes: no existing table is altered and no data is migrated.
Downtime: Rolling upgrade on deployments that support it. 2.3.0PE nodes never use the new table, so they keep working while the cluster is replaced. Don’t create, edit or delete integrations until every TBMQ node runs 2.4.0PE: 2.3.0PE nodes ignore the integration change notifications that 2.4.0PE nodes send.
Upgrade from TBMQ to TBMQ PE
Section titled Upgrade from TBMQ to TBMQ PEDowntime: Stop TBMQ — stop every TBMQ node before the upgrade. The migration creates the PE tables and makes a role mandatory for every user
(broker_user.role_id becomes NOT NULL), which TBMQ CE nodes don’t set — so no node may run during it.
You can migrate from TBMQ to TBMQ PE of the same version. For example, TBMQ 2.4.2 can be upgraded to TBMQ PE 2.4.2. Cross-version migration (e.g. TBMQ 2.4.1 to TBMQ PE 2.4.2) is not supported — upgrade TBMQ to the target version first, then migrate to TBMQ PE.
Third-party component updates (CE v2.2.0 → PE v2.2.0 only)
Section titled Third-party component updates (CE v2.2.0 → PE v2.2.0 only)The following changes apply only when migrating from TBMQ v2.2.0 to TBMQ PE v2.2.0. They do not apply to v2.3.0 and later.
These updates follow the modernization plan outlined in the Bitnami Image Migration guide.
| Component | TBMQ v2.2.0 | TBMQ PE v2.2.0 | Notes |
|---|---|---|---|
| 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 |
Migrated from Bitnami to the official Apache Kafka image. New volume paths are required. |
| Redis → Valkey | bitnamilegacy/redis:7.2.5 |
valkey/valkey:8.0 |
Migrated from Bitnami Redis to Valkey, with a new volume. |
Before starting, create full backups of your environment — including the PostgreSQL database (for example, using pg_dump) and your Kafka and Redis data volumes if you plan to migrate them.
PostgreSQL is upgraded from 16 to 17. PostgreSQL 17 cannot start on a 16 data directory, so you must migrate the data (for example, using pg_upgrade or a dump and restore).
Kafka and Redis have been migrated from Bitnami images to official open-source alternatives. The new images use different internal data directories and volume mappings, so existing Bitnami volumes cannot be reused directly. You must either migrate your data manually or start from new, empty volumes.
The standard upgrade script updates only the PostgreSQL database schema and does not include data migration logic for Kafka or Valkey.
Troubleshooting
Section titled “Troubleshooting”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.
To migrate a TBMQ database to TBMQ PE, run the CE-to-PE upgrade described in Upgrade from TBMQ to TBMQ PE — it takes the source edition as an argument, which a plain upgrade does not.
Upgrade failed: transitioning from CE to PE requires the database to first be upgraded to version 'X' using TBMQ CE.
A CE-to-PE migration is only supported at the same version. Upgrade TBMQ to the version reported in the message first, then migrate to TBMQ PE.
Upgrade failed: the database schema version is missing.
The tb_schema_settings table holds no version: 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.
Forcing a re-upgrade
Section titled “Forcing a re-upgrade”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.