Administration

Running an instance means looking after accounts, storage and updates. Everything here is available in the workspace's admin area and in the API.

First-run setup

  1. Open the site in a browser.
  2. You will be asked to create the administrator account. This prompt is only offered while the instance has no users.
  3. Sign in, then add accounts for your team, or let them self-register.

Only offered once

As soon as an account exists, the setup endpoint refuses to create another administrator. If you lose the administrator account on an instance that already has users, you will need to recover from your data backup.

Roles

RoleCan do
User Everything in their own workspace: presentations, songs, service plans, media, settings and their own account.
Admin Everything a user can do, plus instance-wide tasks: the default quota, user management, the maintenance panel, backups and updates.

All accounts are isolated from each other at the data layer, and every protected request is authorised server-side and scoped to the account.

User management

Guard rails

  • A quota cannot be set below the storage the account already uses.
  • An administrator cannot remove their own admin role.
  • An administrator cannot delete their own account from the admin area.

Quotas and storage

Storage is measured for everything an account stores — presentations, songs, service plans and uploads all count, not just files.

The maintenance panel

The instance panel reports the current version, Node version, schema version, uptime and the data directory, whether update checking and self-update are configured, and the results of the last check and run. It also provides:

Backup and restore

Everything that matters lives in DATA_DIR. Back it up on a schedule:

# back up everything
tar -czf swp-backup-$(date +%F).tar.gz "$DATA_DIR"

# restore
tar -xzf swp-backup-YYYY-MM-DD.tar.gz

Upgrades

  1. Back up DATA_DIR Always the first step. See above.
  2. Fetch the new release git pull, or the new release archive for copied deployments.
  3. Install dependencies npm ci (or npm ci --omit=dev on a production host).
  4. Restart the process pm2 restart simple-worship-presenter, or restart in CloudPanel.

Database schema changes run automatically as numbered migrations on startup. Migrations are additive and never delete existing user data. If a data file cannot be read, the instance preserves a copy named *.corrupt-<timestamp> rather than overwriting it — restore from backup rather than editing it by hand.

The self-updater

Administrators can check for updates and install them from the maintenance panel. Both are used on demand only: nothing is contacted and nothing runs until someone presses the button.

Configure the feed and command in Configuration — self-update.

Closing registration

Set ALLOW_REGISTRATION=0 to close public sign-ups on your instance. Existing accounts keep working, and an administrator can still create accounts from the admin area — the usual pattern for a church server that only hosts its own team.

Admin in the API

Everything above is available over HTTP — instance settings, user CRUD, update control and the backup download. All admin routes require the admin role and return 403 otherwise. See the admin endpoints.