Skip to content

Backup and recovery

UniHomelabDash stores services, settings, users, and provider configuration in SQLite. Docker Compose keeps the database in the unihomelabdash-data volume at /app/data/unihomelabdash.sqlite.

Stop the application briefly for a consistent file-level copy:

Terminal window
docker compose stop unihomelabdash
docker run --rm \
-v unihomelabdash-data:/source:ro \
-v "$PWD":/backup \
alpine \
cp /source/unihomelabdash.sqlite /backup/unihomelabdash.sqlite
docker compose start unihomelabdash

Store the backup alongside the matching SESSION_SECRET in a secure location. Encrypted provider credentials cannot be recovered with a different secret.

  1. Stop the application.
  2. Preserve the current database before replacing it.
  3. Copy the reviewed backup into the named volume as /app/data/unihomelabdash.sqlite.
  4. Restore the matching SESSION_SECRET.
  5. Start the application and test sign-in and each provider.

Do not restore an untrusted database file.

For Docker Compose:

Terminal window
RESET_ADMIN_PASSWORD='choose-a-new-strong-password' \
docker compose exec unihomelabdash \
node scripts/reset-admin.mjs --username admin --confirm

For local development:

Terminal window
npm run reset-admin -- --username admin --confirm

The script requires --confirm, never prints the password, updates the single administrator (or creates it if missing), and marks setup complete.