Upgrading between versions
Patch releases within your line are one command. Moving to a new minor line, or from a pinned version, is a deliberate step: back up, read the notes, fetch the new compose file, then switch the tag.
Before you start
- Back up. Migrations are forward-only. Going back across a release that changed the database means restoring the backup (Backups).
- Read the notes for every release you skip in the upgrade notes. Some need a setting changed before you update. For example, a
TRUSTED_PROXY_CIDRSwider than an IPv4/24now stops the server from starting: narrow it to your proxy's address first. - Look at the release in Admin > System, with its notes.
Pinned, or a new minor line
Run this in the deployment folder. The first lines look up the newest release; set NEW yourself to install another.
NEW=$(curl -fsSL https://api.github.com/repos/mnema-xyz/talk/releases/latest | sed -n 's/.*"tag_name": *"v\([^"]*\)".*/\1/p')[ -n "$NEW" ] || { echo "could not read the latest version; set NEW=x.y.z yourself" >&2; false; }grep '^MNEMA_IMAGE=' .envcurl -fsS http://127.0.0.1:8080/api/healthcp docker-compose.yml docker-compose.yml.bak
base=https://raw.githubusercontent.com/mnema-xyz/talk/v$NEWcurl -fsSLo docker-compose.yml "$base/docker-compose.yml"curl -fsSLo .env.example.new "$base/.env.example"for f in backup.sh backup-common.sh backup-online.sh restore.sh upgrade-postgres.sh health-check.sh; do curl -fsSLo "scripts/$f" "$base/scripts/$f"donechmod +x scripts/*.sh
diff <(grep -o '^[A-Z_0-9]*=' .env | sort) <(grep -o '^[A-Z_0-9]*=' .env.example.new | sort)
if grep -q '^MNEMA_IMAGE=' .env; then sed -i "s|^MNEMA_IMAGE=.*|MNEMA_IMAGE=ghcr.io/mnema-xyz/mnema-talk:$NEW|" .envelse echo "MNEMA_IMAGE=ghcr.io/mnema-xyz/mnema-talk:$NEW" >> .envfidocker compose config -qdocker compose pull appdocker compose up -d
sed -i as written is for Linux; on macOS use sed -i ''. If you use the turn or autoupdate profile, add --profile turn or --profile autoupdate to the last command. Then check the result.
Rolling back
Stop the app before you change its image or database. If the new version applied migrations (migration applied in its log), the old version cannot run on that database: restore the backup you took before the update, then start the old image.
docker compose stop appcp docker-compose.yml.bak docker-compose.yml./scripts/restore.sh /path/to/backups/<timestamp> --verify./scripts/restore.sh /path/to/backups/<timestamp> --yes
Set MNEMA_IMAGE in .env back to the version you noted, then:
docker compose pull appdocker compose up -d --waitcurl -fsS http://127.0.0.1:8080/api/health
Keep the backup and docker-compose.yml.bak until the new version has passed your own checks. Version-specific rollback notes: Rollback.
Clients
The web app updates with the server. Desktop apps check their own updates and refuse to connect, with an explanation, when no verified app version fits the server; the upgrade notes name the desktop version each release needs.