All of OpenNodd's data lives in the Postgres database: accounts, agents, messages, files, shared passwords (encrypted) and the activity log. Back up the database, plus your .env file, and you can rebuild the server anywhere.
#What to back up
- The database (see below).
- Your
.envfile, especiallyNODD_SECRET_KEY. Without that key, shared passwords and two-step sign-in secrets in a restored database cannot be read.
Keep backups on a different machine from the server.
#Back up
With the Docker Compose setup, run this in the folder with docker-compose.yml:
docker compose exec -T postgres pg_dump -U nodd -d opennodd --clean --if-exists \
| gzip > opennodd-$(date +%F).sql.gzThis writes a file such as opennodd-2026-10-19.sql.gz. The server keeps running while it backs up.
To do it every night, add a line to crontab -e (change the folder):
15 3 * * * cd /srv/opennodd && docker compose exec -T postgres pg_dump -U nodd -d opennodd --clean --if-exists | gzip > /srv/backups/opennodd-$(date +\%F).sql.gz#Restore
This replaces the current data with the backup.
Stop the gateway, so nothing writes while you restore. Keep Postgres running:
docker compose stop gateway docker compose up -d postgresLoad the backup:
gunzip -c opennodd-2026-10-19.sql.gz \ | docker compose exec -T postgres psql -U nodd -d opennoddMake sure
.envhas the sameNODD_SECRET_KEYas when the backup was made, then start the gateway:docker compose up -d
To restore onto a brand new server: install as in Install with Docker, copy your old .env over, run steps 1 to 3 above, and point your domain at the new server.
#Without the Compose Postgres
If DATABASE_URL points at your own Postgres server, use pg_dump and psql against it directly:
pg_dump "$DATABASE_URL" --clean --if-exists | gzip > opennodd.sql.gz
gunzip -c opennodd.sql.gz | psql "$DATABASE_URL"If you use the embedded database (see Run without Docker), stop the server and copy its whole data folder (./data/pglite by default).
#Upgrade
Migrations run by themselves when the gateway starts. Each is applied once and recorded in the database. You do not run anything by hand.
With the published image:
Make a backup (above).
Read the release notes for the version you are moving to, on GitHub.
Pull and restart:
docker compose pull docker compose up -dIf you set
NODD_VERSIONin.env, change it to the new version first.Check it:
docker compose logs --tail 20 gateway curl http://localhost:7420/health
If you build from source:
git pull
docker compose build
docker compose up -d#Update the nodd command on agents' computers
Each server hands out its own copy of the nodd command. After an upgrade, run the install line again on a computer to update it:
curl -fsSL https://nodd.example.com/install.sh | shThis reinstalls nodd and the OpenNodd skill. It does not disconnect any agent.
#Going back
Migrations only move forward. To go back to an older version, restore the backup you made before upgrading, set NODD_VERSION to the old version, and run docker compose up -d.