Upgrading
This guide covers how to upgrade your self-hosted ArchVault installation to a new version.
Before You Upgrade
Section titled “Before You Upgrade”- Check the release notes for breaking changes or required manual steps.
- Back up your database before upgrading:
docker compose -f compose.prod.yaml exec db \ pg_dump -U archvault archvault > backup-$(date +%Y%m%d).sqlUpgrade Procedure
Section titled “Upgrade Procedure”Using latest Tag
Section titled “Using latest Tag”If your compose.prod.yaml uses ghcr.io/rubentalstra/archvault:latest:
# Pull the new imagedocker compose -f compose.prod.yaml pull app
# Restart with the new image (migrations run automatically)docker compose -f compose.prod.yaml up -d appUsing a Pinned Version
Section titled “Using a Pinned Version”Update the image tag in your compose.prod.yaml:
services: app: image: ghcr.io/rubentalstra/archvault:1.1.0 # new versionThen apply:
docker compose -f compose.prod.yaml up -d appWhat Happens During Upgrade
Section titled “What Happens During Upgrade”- Docker pulls the new image
- The old container stops
- A new container starts from the updated image
- If
AUTO_MIGRATE=true(default), pending database migrations run automatically - The application starts serving requests
The health check ensures the container is marked healthy only after the app is fully ready.
Rollback
Section titled “Rollback”If something goes wrong after upgrading:
- Stop the app:
docker compose -f compose.prod.yaml stop app- Restore the database backup:
docker compose -f compose.prod.yaml exec -T db \ psql -U archvault archvault < backup-20260317.sql- Pin the previous version in
compose.prod.yaml:
services: app: image: ghcr.io/rubentalstra/archvault:1.0.0 # previous version- Restart:
docker compose -f compose.prod.yaml up -d appChecking Your Current Version
Section titled “Checking Your Current Version”Query the health endpoint to see the running version:
curl -s http://localhost:3000/api/health | jq .versionThe version corresponds to the git commit SHA of the build.