Skip to content

Self-host upgrades

For an install made with the one-line installer (deploy/selfhost, see Docker Compose). The Helm chart upgrades with helm upgrade; the same notes on migrations apply.

Upgrade

  1. Take a backup first (below). Upgrades are tested, but a backup is the only way back from a bad one that changed data.
  2. In the install directory (./neuroops by default):
    # pinned installs: put the new version in .env first, e.g. NEUROOPS_VERSION=1.2.0
    docker compose pull
    docker compose up -d
    
  3. Check: curl -fs http://localhost/readyz (your port), or watch docker compose ps until all three services say healthy.

The server migrates the database when it starts, under a lock, so there is no separate migration step. Running the installer again also works: it downloads the newest docker-compose.yml and keeps your .env. Put your own changes in docker-compose.override.yml, never in docker-compose.yml, so a new copy does not lose them.

Roll back

Set NEUROOPS_VERSION in .env to the version you came from and run docker compose up -d again. Migrations only ever add tables and columns, so an older server runs on the newer schema.

If an upgrade did change data in a way you cannot keep, restore the backup you took in step 1 into a fresh database (below) and run the older version on it.

What we tested

deploy/selfhost/install_test.sh installs release 1.1.0 from its published images, creates an account, moves .env to a newer build, runs docker compose up -d, and checks the account still signs in; then it rolls back to 1.1.0 the same way and checks again. It also runs the backup and restore commands below on a fresh install and signs in afterwards. On a laptop on 2026-11-15 the upgrade was ready in about 13 s and the rollback in about 10 s, with an empty database. A big database takes longer on the first start after an upgrade that adds an index.

Backups

The data is in the compose volume <project>_pgdata (neuroops_pgdata by default). A simple nightly dump from the install directory:

docker compose exec -T db sh -c 'pg_dump --format=custom -U "$POSTGRES_USER" "$POSTGRES_DB"' > neuroops-$(date +%F).dump

Keep the dumps somewhere else, and keep .env with them (separately protected): without MASTER_ENCRYPTION_KEY the stored integration secrets cannot be read. For encrypted off-site dumps to S3-compatible storage, use scripts/backup/backup.sh and scripts/backup/restore.sh (monitoring and backups).

Restore into a fresh install with the same .env:

docker compose stop backend
docker compose exec -T db sh -c 'dropdb -U "$POSTGRES_USER" "$POSTGRES_DB" && createdb -U "$POSTGRES_USER" "$POSTGRES_DB"'
docker compose exec -T db sh -c 'pg_restore --no-owner --no-privileges -U "$POSTGRES_USER" -d "$POSTGRES_DB"' < neuroops-2026-11-15.dump
docker compose up -d