1. Back up the database
- SQLite (Docker volume)
- SQLite (binary)
- PostgreSQL
- MongoDB
Stop the gateway so the file is not written mid-copy, then archive the
volume:Replace
gomodel_data with your volume name (docker volume ls). If you
bind-mount a host directory instead, cp -a ./data ./data.bak-$(date +%F)
is enough.2. Update
Docker Compose
storage configured line with your database path.
docker run
Recreating the container discards its flags, so read them off the running one first:/app/data, the database lives in the container
filesystem and docker rm deletes it. Copy it out and seed the volume you are
about to mount, while the old container still exists — an empty volume hides the
copy, and the gateway starts with no keys, usage, or logs:
65532 is the image’s nonroot UID — the gateway cannot write a volume owned by
anyone else.
Then replace the container, passing the same mount and environment flags back:
Binary
Re-run the installer. It fetches the latest release and replaces the binary in place:- macOS / Linux
- Windows
3. Verify
GET /version reports the running version, the latest published release, and
whether an update is available:
What migrations do
Migrations run on the first start of a new version. There is no separate migration command, and an update never moves or deletes your database, configuration, or cache. Most are additive: missing tables, indexes, and columns are created, and a partially applied schema is safe to retry on the next start. Some releases transform storage instead — when budgets and rate limits gained scopes, their tables were rebuilt and the old ones dropped. Both are safe going forward, which is what makes the reverse direction worth care. On PostgreSQL, a start that finds the schema up to date changes nothing and takes no table locks, so starting or restarting a replica does not stall the others. A migration that does add a table, column, or index waits for its table half a second at a time, for about a minute per statement. If a long-running statement holds the table for that whole minute, a table or column migration fails the start instead of queueing traffic behind it. A request log index that cannot get its table is skipped with a logged warning, along with the request log indexes after it, and the start continues; the next start creates them. After v0.2.5 the request log’s storage was renamed fromaudit_logs to
request_logs: the tables on SQLite and PostgreSQL, the collection on
MongoDB. The rename happens in place and copies no rows; on SQLite and
PostgreSQL the indexes keep their idx_audit_ names. On
PostgreSQL the old names stay behind as views, so replicas still on the older
version keep reading and writing the request log during a rolling upgrade, and a
rolled-back version still starts (it logs index-creation warnings, since it
cannot index a view); point your own queries at request_logs. On
SQLite and MongoDB an older version that runs after the rename starts a new,
empty audit_logs, and the next start of a current version with request logging on moves what it logged
into request_logs. If MongoDB refuses the rename, for example because the
role lacks the privilege, the gateway logs a warning and keeps using
audit_logs.
Pinning a version
Updates default to the latest release. To stay on a known version, pin it:- Docker
- macOS / Linux
- Windows
latest.X.Y.Z with a
published release.
Rolling back
Install or pull the previous version and restart. That is enough only if every migration in between was additive; across a transforming one the older binary looks for storage the upgrade rebuilt. You cannot tell the two apart from the outside, so restore the step 1 backup unless the older version is known to start against the migrated database. Restoring a SQLite volume backup replaces the volume’s contents, so stop the gateway first —docker compose stop gomodel, or docker stop gomodel for a
standalone container — then unpack the archive and start it again:
If something goes wrong
Still stuck? Ask on Discord or open a
GitHub issue.