Backup and restore
A backup is two things taken together: the PostgreSQL database and the data
volume.
- The database holds everything you see in Nautelle: projects, cards, sessions, usage, the audit log, and the stored secrets in sealed form.
- The
datavolume (/datain the API container) holdssecrets.json, the keys the API generated on its first start (APP_ENCRYPTION_KEY,AUDIT_HMAC_KEY,LLM_SECRETS_KEY), and the board card attachments.
secrets.json is as important as the database: without it, a restored
database cannot unseal its secrets (two-factor sign-in, the Telegram bot
token, AI provider keys, GitHub App and webhook secrets) and the audit chain
no longer verifies. Keep nautelle/.env too, for the database and Redis
passwords, and nautelle/api.env if you have one.
Back up
Section titled “Back up”cd nautelledocker compose exec -T postgres pg_dump -U nautelle nautelle > nautelle.sqldocker compose exec -T api tar -cf - -C /data . > data.tarcp .env env-backupStore data.tar apart from the dump, and as safely: whoever holds both can
read every stored secret. Either alone is useless to them, and to you.
Redis holds only job queues and is not part of the backup; a restored install starts with empty queues, and schedules are recreated from the database.
Restore on a new host
Section titled “Restore on a new host”-
Write the files without starting anything:
Terminal window curl -fsSL https://raw.githubusercontent.com/AndreyBegma/Nautelle/main/deploy/compose/install.sh | sh -s -- --no-startcd nautelle -
Put the saved
.env(andapi.env) in place of the new one. -
Restore the database and the data volume before the API starts:
Terminal window docker compose up -d postgresdocker compose exec -T postgres psql -U nautelle nautelle < nautelle.sqldocker compose run --rm --no-deps -T --entrypoint tar api -xf - -C /data < data.tardocker compose up -d
The API must not start before secrets.json is back: it would generate new
keys that do not fit the restored database. If that happened, stop the stack,
restore data.tar again over the new file, and start it.
Volume-level backups
Section titled “Volume-level backups”The volumes are nautelle_pgdata, nautelle_data, nautelle_redis and, in
domain mode, nautelle_caddy-data. Back them up with your own tooling while
the stack is stopped (docker compose stop); a copy of pgdata taken while
PostgreSQL runs is not consistent.
Runners
Section titled “Runners”A runner keeps its own state on its machine: its token and policy in
~/.config/nautelle/runner.json, and the event spool. Nothing there needs a
backup — a lost runner is paired again — but the worktrees of running cards
live in your repositories on that machine.