Backup, Update, and Rollback
Back up /data and /library safely, pin immutable Docker tags or digests, run zero-surprise upgrades, and roll back cleanly when needed.
Because Bunko stores SQLite databases alongside separate encryption and signing keys in /data, consistent backups and disciplined updates keep your library safe across schema upgrades.
What to back up
Always back up the entire /data volume as one atomic unit while Bunko is stopped:
/data/accounts.db— User accounts, password hashes, permissions, media root reservations, and shared catalog keys./data/users/<id>/— Every user's SQLite database (WALfiles included), retained covers, andtranslation-backups/./data/settings.key,/data/session.key, and/data/access.token— Withoutsettings.key, encrypted service and catalog credentials in SQLite cannot be decrypted.
Back up /library separately using your standard media/NAS backup strategy (snapshots, rsync, or Borg/Restic). Bunko never modifies or deletes media files during normal upgrades.
Taking a consistent backup
- Stop Bunko so SQLite cleanly checkpoints its WAL journal and no worker writes are in flight:
docker compose stop bunko- Archive the
/datavolume (adjust the volume name if yours differs):
docker run --rm -v bunko_bunko-data:/data:ro -v "$PWD/backups":/backup alpine \
tar -czf "/backup/bunko-data-$(date +%F).tar.gz" -C /data .- Restart Bunko:
docker compose start bunkoNever run two Bunko replicas on one volume
SQLite WAL requires single-host local file locking. Deploy strictly one Bunko container per /data volume and avoid placing /data on unreliable network filesystems (NFS/SMB).
Pinning image tags and digests
For predictable production operations, pin a specific version tag or immutable SHA-256 digest in docker-compose.yml instead of floating on :latest:
services:
bunko:
image: ghcr.io/lucas-lepajollec/bunko:1.0.0Record your currently running digest before every upgrade so you can roll back to the exact image bytes:
docker inspect --format='{{index .RepoDigests 0}}' bunkoSafe upgrade procedure
- Record the current image digest and stop Bunko (
docker compose stop bunko). - Take a fresh backup of the entire
/datavolume. - Pull the target image and recreate the container:
docker compose pull bunko
docker compose up -d bunko- Bunko runs additive transactional SQLite migrations automatically on startup (current tenant schema is
v35) without lowering a neweruser_version. - Verify health and your library before resuming bulk downloads:
curl -fsS http://127.0.0.1:2512/api/healthExpected response: {"status":"ok","version":"1.0.0"}.
Safe rollback procedure
Because SQLite schema migrations are forward-only, never run an older Bunko image directly against a database migrated by a newer release.
- Stop Bunko (
docker compose stop bunko). - Restore your pre-upgrade
/dataarchive into the volume so databases and keys match the previous release. - Set
image:indocker-compose.ymlback to your recorded previous tag or digest. - Start Bunko (
docker compose up -d bunko) and verify/api/health. - Leave
/librarymedia files intact unless you deliberately need to restore media files as well.
Security and Reverse Proxy
Understand Bunko's threat boundaries, configure a TLS reverse proxy safely, review SSRF and encryption protections, and perform emergency account recovery.
Troubleshooting
Diagnose and fix common Docker, UID 1000 permission, container networking, Suwayomi, Kavita, Jellyfin, TMDB, and reverse-proxy issues.