Skip to content
Niftyhelp 2026.10.1-beta.1 Support

Beta This is the help for Nifty 2026.10.1-beta.1, which isn't released yet. Help for the current release

Backups

What to copy, how to copy it while Nifty runs, and how to restore it.

On this page

Everything Nifty keeps is in one folder: /var/lib/nifty on a Linux server. Back up the database and files/, and keep secret.key safe somewhere else.

What's in the folder

Path What Back up?
nifty.db (with -wal, -shm) The database: everything you've written Yes, as below
files/ Photos, note images and documents Yes
secret.key Unlocks the AI providers' API keys saved in the database Separately
acme/ Let's Encrypt certificates Optional: Nifty gets new ones
nifty.db.v<N>-<time>.bak A copy made before each update changed the database Optional
cache/ The compiled PDF renderer, made again if missing No
lock, tmp/ Working files No

Back up while Nifty runs

Don't copy nifty.db directly while Nifty runs: the copy can be half-written. Let SQLite make it (install sqlite3 first, e.g. sudo apt install sqlite3):

sudo sqlite3 /var/lib/nifty/nifty.db "VACUUM INTO '/backups/nifty-$(date +%F).db'"
sudo rsync -a /var/lib/nifty/files/ /backups/files/

Run them daily from cron or a systemd timer, and copy /backups off the machine.

Keep the secret key apart

secret.key (or NIFTY_SECRET_KEY, if you set it) unlocks the AI providers' API keys. Keep it out of your regular backups, in a password manager, say. Without it, a restored Nifty works but asks for those API keys again in Settings → AI.

Restore

  1. Stop Nifty: sudo systemctl stop nifty.

  2. Put the database back, and remove the old -wal and -shm files:

    sudo cp /backups/nifty-2026-10-10.db /var/lib/nifty/nifty.db
    sudo rm -f /var/lib/nifty/nifty.db-wal /var/lib/nifty/nifty.db-shm
  3. Put files/ back: sudo rsync -a /backups/files/ /var/lib/nifty/files/.

  4. Put secret.key back, if you have it.

  5. Give it all to the nifty user: sudo chown -R nifty:nifty /var/lib/nifty.

  6. Start Nifty: sudo systemctl start nifty.

Restoring onto a newer version is fine: Nifty updates the database as it starts.

Copies before updates

Before an update changes the database, Nifty copies it to nifty.db.v<N>-<time>.bak in the same folder. Rolling back uses them. Nifty keeps the five newest and deletes older ones.

On a Mac

The Mac app keeps everything in ~/Library/Application Support/Nifty, unless you chose another folder when you first opened it. Quit Nifty and copy the folder, or run the same sqlite3 … "VACUUM INTO …" command while it runs.

Menu

2026.10.1-beta.1Contact support