Skip to content

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.

Last updated 2 min read Edit this page on GitHub
On this page

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 runTo update
One-line installerusertasks upgrade: backup, verified download, migrations, switch, health check and automatic code rollback. usertasks backup and usertasks restore cover the backups below
Source with Supabasegit 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 PostgreSQLgit pull, npm ci, npm run admin -- db migrate, npm run build, then restart npm start
Docker Compose, supabase profilegit pull, npx supabase db push --linked, then docker compose up -d --build
Docker Compose, standalone or laptop trialgit pull, then docker compose --profile standalone up -d --build --wait (or npm run stack -- up). The migrate container applies migrations on every start
KubernetesBuild 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 bundleBuild 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.

  1. 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:
Bash
docker compose exec -T postgres pg_dump -U usertasks -Fc usertasks > usertasks-$(date +%F).dump
  1. Files. Uploads, generated documents and logos live in the storage provider: Supabase Storage, the MinIO volume (miniodata), your S3, Blob or GCS bucket, or the STORAGE_LOCAL_ROOT folder.
  2. Keys and settings. Your .env, .env.local or 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_KEY and CRON_SECRET.

Restore#

With the one-line installer, usertasks restore <backup folder | latest> does all of this (and takes a fresh backup first). By hand:

  1. Stop the app and the worker so nothing writes meanwhile (docker compose stop app worker, or scale the Deployments to 0).
  2. Restore the database into an empty database of the same name. For the standalone profile:
Bash
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.dump

Your own PostgreSQL: pg_restore --clean --if-exists --no-owner -d "$MIGRATION_DATABASE_URL" usertasks.dump.

  1. Put the files back where they came from (the MinIO volume, your bucket, or STORAGE_LOCAL_ROOT).
  2. 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>).

Was this page helpful?