Back up
From the deploy directory:
./backup.sh
It writes backups/<UTC timestamp>/ with:
- the database,
- the console's files (imported agent releases),
- Caddy's data: certificates and, in private-CA mode, the CA itself,
.env, which holds the secrets.
Logs aren't included. Backups older than 14 days are removed (KEEP_DAYS=30 ./backup.sh to keep more).
Every night
Add it to root's crontab (crontab -e), with your own path:
15 3 * * * /opt/serverkeel/deploy/backup.sh >> /opt/serverkeel/deploy/backups/backup.log 2>&1
Then **copy backups/ off the box**: to another server, a NAS or object storage. A backup on the same disk doesn't survive the disk. The backup holds your secrets, so keep the copy somewhere only you can read.
When it's in place, tick Back up the console every night on the Home checklist.
Restore
On the same box, or a new one with the release unpacked:
cp backups/<timestamp>/env deploy/.env # new box only docker compose up -d # new box only ./restore.sh backups/<timestamp>
restore.sh checks the backup's checksums, warns if the secrets in .env differ from the backup's, restores the database, files and Caddy data, then marks every server offline. Agents keep their identities and reconnect by themselves within a minute, even to a new box, as long as the console's name points at it.