Upgrade
Upgrading an instance means backing it up, running the image of the new version, and letting it migrate its database at start; migrations only go forward, and an older image refuses a newer database.
Steps
-
Read the release notes. A patch or a minor release needs nothing else; a major one says what to change first (versioning policy).
-
Back up the database and keep the master key with the copy (backup). The start that migrates makes a copy of its own too (below), but on the same volume: a backup is what survives losing the volume.
-
Take the new version. Every release publishes an image at
ghcr.io/vaubaan/gateway:<version>(the 2.0.0 pre-releases too, for example2.0.0-alpha.15). If thegatewayservice runs a released image, change itsimage:line to the new version, pinned by digest (ghcr.io/vaubaan/gateway@sha256:<digest>;docker buildx imagetools inspect ghcr.io/vaubaan/gateway:<version>prints it), verify it where the release offers an attestation, and restart:docker compose --env-file deploy/config/.env -f deploy/compose.yaml up -dIf you build the image from the sources, as the quick start does, check out the new release tag (
git fetch --tags && git checkout v<version>) and run the same command with--build. On Railway, deploy a verified build of the new version (Railway, step 5). The commands to verify an image: verify an image. -
Check
/healthz: it answers the new version and commit.
Schema migrations run at start, forward-only and checksummed. Before it migrates, the start writes a copy of the database beside it, in pre-migration/ next to the database file (/data/pre-migration/ in the image), named after the time and the schema versions (gateway.db.20261128T101500Z.0042-to-0043.sqlite), and keeps the three most recent. If it cannot write that copy (a full disk, no write access), it stops before migrating anything and says so.
Go back to the former version
There is no downgrade in place: an older image refuses a newer database. To go back, stop the gateway, start the former version's image with the copy the upgrade left, and restart:
docker compose --env-file deploy/config/.env -f deploy/compose.yaml run --rm gateway \
node apps/gateway/restore.mjs /data/pre-migration/<copy>.sqlite --force
The copy opens with the same master key, and the database it replaces is kept beside it as <name>.replaced-<time> (restore). What changed after the upgrade is lost: the copy is the database as it was when the new version started.
Changing the identity provider
A person is the pair (issuer, subject), so another identity provider means new accounts for everybody; the earlier ones keep their accounts and missions and are reached by nobody. When you upgrade an instance that already has users, let somebody sign in once before you change idp.*.
Last changed 2026-12-02. This page as Markdown: /docs/operations/upgrade.md