Backups and recovery
Kagaz is designed so that a family never loses its documents and nobody is ever locked out for good.
Making a backup
- As an admin, open Settings › Backup.
- Choose a passphrase of at least 12 characters and write it down. Without it, the backup can't be opened.
- Press Download backup. You get one
.kagazfile with every record and file.
The backup is built and encrypted in your browser (PBKDF2 with 600,000 iterations, then AES-256-GCM), so the passphrase never leaves your device. Keep backups somewhere other than the server: a USB drive, another cloud account, or both. A monthly backup is a good habit.
A backup does not depend on MASTER_KEY. With a recent backup and its passphrase you can rebuild everything even if the server and its key are gone.
Restoring
- Start a fresh, empty Kagaz (any setup, any
MASTER_KEY). - On its first screen choose Restore from a backup.
- Pick the
.kagazfile and enter its passphrase.
Everyone keeps their passwords and recovery codes. Backups work across setups: back up from Docker and restore on Cloudflare, or the other way round.
Opening a backup without Kagaz
If Kagaz itself is ever gone, the repository has a small script that needs only Node.js:
node scripts/decrypt-backup.mjs kagaz-backup-2026-12-05.kagaz backup.zip
The zip contains manifest.json (every record, decrypted) and files/<id> (each original file).
Moving to another server
Download a backup on the old server, start the new one, and restore it. The new server can use a different MASTER_KEY. Then point your domain at the new server and update PUBLIC_URL.
Forgotten passwords
Passwords only protect sign-in. They don't encrypt documents, which is why they can always be reset safely. There are three ways back in:
- Recovery code. On the sign-in page, press Forgot password? and enter your email and one of your ten recovery codes. Each code works once. Make new ones any time in Settings › Account.
- Reset link from an admin. An admin opens Settings › Members, presses Reset password next to your name, and sends you the link. It works once and lasts 24 hours.
- Server command. Whoever runs a Docker or Node setup can create a reset link:
docker compose exec kagaz node dist/node/server/node/cli.js reset-link someone@example.com
If the only admin is locked out on Docker or Node, make-admin <email> promotes another account. On Cloudflare, any other admin can send a reset link, which is a good reason to have two admins.
If you lose MASTER_KEY
The stored files can't be decrypted without it. Restore your latest backup on a new Kagaz with a new key. This is why both the key and backups should live somewhere other than the server.