Skip to content

Upgrading

This guide covers how to upgrade your self-hosted ArchVault installation to a new version.

  1. Check the release notes for breaking changes or required manual steps.
  2. Back up your database before upgrading:
Terminal window
docker compose -f compose.prod.yaml exec db \
pg_dump -U archvault archvault > backup-$(date +%Y%m%d).sql

If your compose.prod.yaml uses ghcr.io/rubentalstra/archvault:latest:

Terminal window
# Pull the new image
docker compose -f compose.prod.yaml pull app
# Restart with the new image (migrations run automatically)
docker compose -f compose.prod.yaml up -d app

Update the image tag in your compose.prod.yaml:

services:
app:
image: ghcr.io/rubentalstra/archvault:1.1.0 # new version

Then apply:

Terminal window
docker compose -f compose.prod.yaml up -d app
  1. Docker pulls the new image
  2. The old container stops
  3. A new container starts from the updated image
  4. If AUTO_MIGRATE=true (default), pending database migrations run automatically
  5. The application starts serving requests

The health check ensures the container is marked healthy only after the app is fully ready.

If something goes wrong after upgrading:

  1. Stop the app:
Terminal window
docker compose -f compose.prod.yaml stop app
  1. Restore the database backup:
Terminal window
docker compose -f compose.prod.yaml exec -T db \
psql -U archvault archvault < backup-20260317.sql
  1. Pin the previous version in compose.prod.yaml:
services:
app:
image: ghcr.io/rubentalstra/archvault:1.0.0 # previous version
  1. Restart:
Terminal window
docker compose -f compose.prod.yaml up -d app

Query the health endpoint to see the running version:

Terminal window
curl -s http://localhost:3000/api/health | jq .version

The version corresponds to the git commit SHA of the build.