Skip to content

Self-hosting

Upgrade to a new release

Move a self-hosted install to a new UserTasks release: check your version, back up, apply migrations, update the app for each way of running it (Docker Compose, source, Kubernetes, air-gapped bundle), update extensions and the CLI, check it worked, and roll back if you need to.

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

Every release has two parts: new code and, often, new database migrations. An upgrade applies both, in that order: migrations first, then the code. The release notes say when a release needs anything more.

On usertasks.com there's nothing to do: we upgrade the cloud service for you.

Before you start#

  1. Check what you run now. Open https://tasks.yourcompany.com/api/version (no sign-in needed). It shows the version, the git commit and the build time:
JSON
{ "version": "0.1.0", "commit": "0da2dba09", "buildTime": "2026-11-14T02:10:00Z" }

usertasks-admin db status lists the migrations already applied and any that are pending.

  1. Read the release notes for every version between yours and the new one. Look for migrations marked "apply before deploying the code", new required settings, and instance-level steps. Database and migrations describes each migration and any that need care on a busy database.
  2. Back up: the database, files, and your .env or Kubernetes Secret, especially ENCRYPTION_KEY. See Updates and backups. A backup taken just before the upgrade is the only way to undo a migration.
  3. Pick a quiet time. Migrations are additive and most take seconds, but some take short table locks. Workflow runs are queued in the database, so work waiting while the app restarts is picked up when it's back.
  4. Try it on a copy first if you can: restore last night's backup into a test install, upgrade that, and click through your main workflows and forms.

Skipping versions is fine. Migrations apply in order, so going from 0.1.0 straight to the latest runs every migration in between. Don't skip the release notes in between, though.

Upgrade, for each way of running it#

Pin an exact version wherever you can (an image tag, a git tag or commit), so every server runs the same thing and you know what to roll back to.

One-line installer#

Bash
usertasks upgrade

usertasks upgrade --to 0.2.0 picks the version; without it, the latest release. It follows this page step by step and prints what it did:

  1. Backs up the database, the files and .env to backups/<time>-<old>-before-<new>/ (--skip-backup skips it; don't, unless you just took one).
  2. Downloads and verifies the new release: the signature of SHA256SUMS with the release key saved at install time, then the checksum. Nothing changes if either fails.
  3. Pulls the image the release pins (--build builds it locally if it can't be pulled).
  4. Applies the migrations with the new code (usertasks-admin db migrate, then ext migrate) while the old version keeps serving. If a migration fails, it stops here: no code was switched, the old version keeps running, and the failed file left nothing half-applied.
  5. Switches the app and the worker to the new version and checks that it answers and runs the new image.
  6. Rolls the code back by itself if the new version doesn't become healthy: the previous version starts again on the newer (additive) schema, and it prints the backup to restore if you need the database exactly as before.

It refuses to go to an older version unless you add --allow-downgrade. On Windows, the same in PowerShell: usertasks upgrade -To 0.2.0.

Editions (UserTasks Enterprise): before step 1 the licence is checked with usertasks.com (the licence installed in UserTasks, or --licence <file>); a lapsed licence stops the upgrade with the reason and changes nothing. --edition enterprise switches a plain install (or one made as the older SharePoint edition) to UserTasks Enterprise and --edition core back, keeping all data; --bundle <file> upgrades from an offline bundle. On Enterprise, adding another paid extension is just installing its licence: no upgrade needed.

Laptop trial and Docker Compose (standalone)#

From the folder you installed from (Compose names the containers and volumes after it, so a different folder starts an empty install):

Bash
git fetch && git checkout <new version tag or commit>
docker compose --profile standalone up -d --wait

git pull works instead of the checkout, and npm run stack -- up instead of the docker compose line.

The migrate container applies new migrations before the app starts. Compose uses the published image for the new version (ghcr.io/homepresso/usertasks:<version>) and builds it locally when none is published; add --build to always build locally. To pin the image yourself, set USERTASKS_IMAGE=ghcr.io/homepresso/usertasks:<version> in .env.

Docker Compose with Supabase#

Bash
git fetch && git checkout <new version>
npx supabase db push --linked --dry-run
npx supabase db push --linked
docker compose up -d --build

The --dry-run line lists the migrations it will apply, without applying them.

From source with Supabase#

Bash
git fetch && git checkout <new version>
npm ci
npx supabase db push --linked --dry-run
npx supabase db push --linked
npm run build

Then restart: stop the running npm start (or your service) and start it again.

A local Supabase stack (supabase start) takes the same db push without --linked. Don't use npx supabase db reset to upgrade: it wipes the database.

From source with your own PostgreSQL#

Bash
git fetch && git checkout <new version>
npm ci
npm run admin -- db status
npm run admin -- db migrate
npm run build

db status lists the pending migrations. Then restart the app and the worker.

db migrate takes a lock, so two servers running it at once can't both apply the same migration; each file runs in its own transaction.

Kubernetes (Helm)#

Bash
git fetch && git checkout <new version>
helm upgrade usertasks deploy/helm/usertasks -n usertasks -f my-values.yaml \
  --set image.tag=<new version> --wait --wait-for-jobs

The migrations run first (a pre-upgrade hook or a Job for the new revision). Then the pods roll one at a time with maxUnavailable: 0, so the app stays up. helm history usertasks -n usertasks lists the revisions. Details: Kubernetes setup.

Air-gapped bundle#

On a connected machine, build the bundle for the new version with the same signing key as before. Then, on the offline host:

Bash
./bundle.sh verify --fingerprint <your key fingerprint>
cp ../usertasks-bundle-<old version>/compose/.env compose/.env
./bundle.sh load
./bundle.sh up

With a registry, use ./bundle.sh load --registry … --push; on Kubernetes, helm upgrade as above instead of up.

Copy compose/.env from the old bundle folder before up. Without it, up writes fresh secrets, including a new ENCRYPTION_KEY, and the connector passwords stored in the database can no longer be read. The bundle always uses the Compose project usertasks-onprem, so the new folder keeps the same database and file volumes.

Extensions#

Extensions are built into the app, so rebuild with the same USERTASKS_EXTENSIONS list when you upgrade. Then apply their migrations; Docker Compose and Helm don't do this for you:

Bash
usertasks-admin ext status
usertasks-admin ext migrate

From source, run them as npm run admin -- ext status and npm run admin -- ext migrate.

Each extension declares the UserTasks versions it supports (engines.usertasks in its manifest). If the new release is outside that range, the app starts without that extension: Settings → Extensions says why, and its data stays untouched until a compatible version is installed. Check your extensions' supported versions before upgrading. See Extensions.

The CLI#

The CLI is updated separately from the server:

Bash
npm install -g @user-tasks/cli@latest
usertasks --version

Check it worked#

  1. /api/version shows the new version and commit.
  2. usertasks-admin db status (and ext status if you use extensions) shows nothing pending.
  3. usertasks-admin doctor checks the database, storage, email, the scheduler and the other providers.
  4. Sign in, open a task, submit a form, and start a test workflow run. If you have scheduled workflows, check that the next one runs.

If something goes wrong#

  • The app won't start after the upgrade: check its logs first. The most common causes are a migration that didn't run (db status shows it pending: run db migrate or db push) and a new required setting (the release notes name it).
  • A migration failed: each file runs in its own transaction, so a failed file leaves nothing half-applied. Fix the cause it reports (often a lock timeout on a busy table: run it again) and run the migration command again.
  • Roll back the code: deploy the previous version again (git checkout <old version> and rebuild, the old image tag, or helm rollback usertasks <revision>). Migrations are additive: they add tables, columns and permissions and never remove what people built (an automated check on every release enforces this). So the previous version normally runs on the newer schema and you don't need to undo them. The release notes say if a release is an exception.
  • Roll back the database: only as a last resort, by restoring the backup you took before the upgrade. Anything people did after that backup is lost.

Next#

Updates and backups · Troubleshooting

Was this page helpful?