Dedicated migration-runner images (
midaz-ledger-migrations, midaz-tracer-migrations) apply the schema migrations. The apps do not migrate at startup. The official Helm chart runs these images for you. See Database migrations for details.Updating a deployment
To install, upgrade, or uninstall a Midaz deployment, see the Midaz chart README. It carries the procedure and the upgrade notes of each chart version. To move an integration from the v1 API contracts to the v2 contracts, see Migrate from API v1 to API v2. Before you upgrade, check these product rules:
- With
DEPLOYMENT_MODE=saasorMULTI_TENANT_ENABLED=true, the Ledger does not start without authentication. See Security. - Keep
LCRYPTO_HASH_SECRET_KEYandLCRYPTO_ENCRYPT_SECRET_KEYunchanged. Midaz cannot read the holder and instrument data that it encrypted with previous values. - Upgrade Midaz before its plugins. See Midaz and plugin compatibility.
- To upgrade to v4.2.0 or later, upgrade Tracer before the Ledger. While a Ledger on v4.2.0 or later runs, do not roll Tracer back to a version earlier than v4.2.0. While a Ledger on v4.3.0 or later runs, do not roll Tracer back to a version earlier than v4.3.0.
- From v4.2.0, the Ledger reaches Tracer over gRPC only. When
TRACER_BASE_URLis set, the Ledger does not start withTRACER_TRANSPORT=rest. If you setTRACER_TRANSPORT=rest, removeTRACER_TRANSPORTbefore you upgrade. Then setTRACER_BASE_URLto the Tracer gRPC address (TRACER_GRPC_PORT,:4021by default). See Midaz environment variables. - Run v4.2.0 or later on every Ledger instance before you set
deferrableon a fee. After you set it, do not roll the Ledger back to an earlier version. See Fee debt. - From v4.3.0, the Ledger publishes transaction audit messages only when
AUDIT_LOG_ENABLED=true. See Auditability. - From v4.3.0,
/readyzchecks RabbitMQ through its management API atRABBITMQ_HEALTH_CHECK_URL, with theRABBITMQ_DEFAULT_USERcredentials. A failed check makes/readyzanswer503. Give that user access to the management API. - Upgrade every Ledger instance to v4.3.0 before clients send
schemeon a transaction or linkoptionalOperationRouteson an accounting route. An earlier Ledger refusesschemeand treats every linked operation route as required. - Upgrade a Ledger from v4.2.x to v4.3.0 with a drained cutover, never a rolling update: cut traffic to the Ledger, let the v4.2.x instances finish their queued and recovery work, stop every v4.2.x instance, then start v4.3.0. A v4.2.x instance keeps claiming recovery work even without traffic and refuses work that v4.3.0 records, so none may run beside v4.3.0. The Ledger refuses writes during the cutover. The Midaz chart upgrade note carries the steps.
- After a Ledger runs v4.3.0, do not roll it back to v4.2.x, even after a drain. A v4.2.x Ledger can apply the money of a v4.3.0 transaction and then leave its record and metadata incomplete.
- From v4.4.0, the Ledger and Tracer do not start when an environment variable has a value that they cannot read. The error names the variable. A boolean accepts only
trueorfalse, a number must be a whole number, and a duration needs a unit, such as12s. Check your values before you upgrade. See Midaz environment variables. - The v4.4.0 onboarding migration stops if a ledger has two accounts with the same alias or two assets with the same code. Deleted accounts and assets do not count. The migration lists the duplicates, and Midaz does not merge or delete them. If the migration stops, contact Lerian before you run the upgrade again. While the migration runs, account and asset writes wait.
- Upgrade every Ledger instance to v4.4.0 before you assign an account plan. An earlier Ledger does not read account plans.

