Self-hosting
Updates and backups
Update a self-hosted install (code and migrations) for each way of running it, and back up the database, files and encryption keys.
Updating#
Every update has two parts: the new code, and any new database migrations. Apply both, migrations first. The table is the short version; Upgrade to a new release walks through each way of running it, with extensions, the CLI, checks and rollback.
| You run | To update |
|---|---|
| One-line installer | usertasks upgrade: backup, verified download, migrations, switch, health check and automatic code rollback. usertasks backup and usertasks restore cover the backups below |
| Source with Supabase | git pull, npm ci, npx supabase db push --linked (or npx supabase db reset on a local stack, which wipes it), npm run build, then restart npm start |
| Source with your own PostgreSQL | git pull, npm ci, npm run admin -- db migrate, npm run build, then restart npm start |
Docker Compose, supabase profile | git pull, npx supabase db push --linked, then docker compose up -d --build |
| Docker Compose, standalone or laptop trial | git pull, then docker compose --profile standalone up -d --build --wait (or npm run stack -- up). The migrate container applies migrations on every start |
| Kubernetes | Build and push the new image, then helm upgrade with the new image.tag. Migrations run as a hook or a Job before the new pods start |
| Air-gapped bundle | Build a new bundle with the same signing key, then verify, load, and ./bundle.sh up or helm upgrade |
Before updating, read the release notes and Database and migrations: it lists any migration that needs care on a live database. usertasks-admin db status shows which migrations are applied. GET /api/version shows the version and commit a server is running.
Backups#
Back up three things. The database matters most.
- The database. It holds everything: workspaces, workflows, runs, tasks, data tables and the audit log.
- Hosted Supabase: the project's backups, plus your own dump with
npx supabase db dump. - Your own PostgreSQL: your usual tool (
pg_dump, snapshots, your cloud's backups). For the standalone profile:
- Hosted Supabase: the project's backups, plus your own dump with
docker compose exec -T postgres pg_dump -U usertasks -Fc usertasks > usertasks-$(date +%F).dump- Files. Uploads, generated documents and logos live in the storage provider: Supabase Storage, the MinIO volume (
miniodata), your S3, Blob or GCS bucket, or theSTORAGE_LOCAL_ROOTfolder. - Keys and settings. Your
.env,.env.localor Kubernetes Secret.- Keep a safe copy of
ENCRYPTION_KEY(or your KMS key) in particular: without it, the connector passwords and tokens stored in the database can't be read. - If the Helm chart created the Secret for you, back up its generated
ENCRYPTION_KEYandCRON_SECRET.
- Keep a safe copy of
Restore#
With the one-line installer, usertasks restore <backup folder | latest> does all of this (and takes a fresh backup first). By hand:
- Stop the app and the worker so nothing writes meanwhile (
docker compose stop app worker, or scale the Deployments to 0). - Restore the database into an empty database of the same name. For the standalone profile:
docker compose exec -T postgres psql -U usertasks -d postgres -c 'DROP DATABASE IF EXISTS usertasks WITH (FORCE)' -c 'CREATE DATABASE usertasks'
docker compose exec -T postgres pg_restore -U usertasks -d usertasks --no-owner --exit-on-error < usertasks-2026-01-31.dumpYour own PostgreSQL: pg_restore --clean --if-exists --no-owner -d "$MIGRATION_DATABASE_URL" usertasks.dump.
- Put the files back where they came from (the MinIO volume, your bucket, or
STORAGE_LOCAL_ROOT). - Use the same
ENCRYPTION_KEY(or KMS key) as when the backup was taken, then start the app again. Its migrations bring an older backup up to the running version; a backup from a newer version needs that version.
Provider switches make their own backups before they change anything: see Switching providers. To keep workflows, forms and settings in Git as well, use Config as code (usertasks config export <dir>).