Frame docs · Run your server

Backups and restore

Back up three things, and copy them off the server:

  • The database, made with backup
    Where (Linux installer):written wherever you ask
    Why:Accounts, friendships, moments and messages.
  • secrets.json
    Where (Linux installer):/var/lib/frame/secrets.json
    Why:Signing keys and the key that encrypts R2/S3 media. Lose it and that media can't be read.
  • media/ (local storage only)
    Where (Linux installer):/var/lib/frame/media/
    Why:The photos and videos.

The database backup is consistent and safe to take while Frame runs. With R2, the media is already in the bucket, so the database and secrets.json are what matter; for extra safety, mirror the bucket elsewhere with rclone sync.

Linux installer (systemd)

Terminal
sudo frame-admin backup /root/frame-$(date +%F).db       # consistent, safe while runningsudo tar -C /var/lib/frame -czf /root/frame-files-$(date +%F).tgz secrets.json media

Copy both files off the server, for example with scp to your computer, or with restic or rclone to another provider. Run it nightly with cron (sudo crontab -e):

crontab
15 3 * * * /usr/local/bin/frame-admin backup /root/frame-$(date +\%F).db && tar -C /var/lib/frame -czf /root/frame-files-$(date +\%F).tgz secrets.json media

Old backups pile up, so delete them now and then, or let your backup tool rotate them.

Docker

Terminal
docker compose exec frame frame-server backup /data/frame-backup.dbdocker compose cp frame:/data/frame-backup.db ./frame-$(date +%F).dbdocker run --rm -v frame_frame-data:/data:ro -v "$PWD":/backup alpine \  tar -C /data -czf /backup/frame-files-$(date +%F).tgz secrets.json media

With the Caddy setup, add -f docker-compose.caddy.yml after docker compose.

From the admin panel

Maintenance in the admin panel downloads a consistent copy of the database. It asks for your password again, and each download link works once, for two minutes. It doesn't include secrets.json or the media, so it doesn't replace the server-side backup above.

Restore

On the Linux installer (on a new machine, run install.sh first and copy over /etc/frame/frame.conf):

Terminal
sudo systemctl start frame && sudo systemctl stop frame   # makes sure the data dir existssudo tar -C /var/lib/frame -xzf frame-files-2026-11-07.tgzsudo cp frame-2026-11-07.db /var/lib/frame/frame.dbsudo rm -f /var/lib/frame/frame.db-wal /var/lib/frame/frame.db-shm# hand everything back to the service's user (the owner of the data dir itself):sudo chown -R --reference=/var/lib/private/frame /var/lib/private/framesudo systemctl start frame

Try a restore once, on a spare machine or a throwaway VPS, before you need it.

For AI tools: this page as Markdown, the page index and all pages in one file.

WhatsApp