Termsheep Cloud is coming soon.Cloud is coming soon.Join the waitlist →

Upgrade and diagnose the service

Build a reviewed revision, preserve backups, inspect health and read logs without exposing secrets.

On this page

Use the arrow keys to scroll the table.

Retired pre-release database schema

Databases from the retired pre-release schema cannot be upgraded. Keep the old snapshot with its matching build and use a fresh database for the current build. The following steps apply to compatible databases.

Move to PostgreSQL 19

The supplied Compose stacks require PostgreSQL 19. The Compose guard refuses to start 19 over an older data directory. For a compatible PostgreSQL 16 pre-release database, stop Termsheep writers and provision a separate empty 19 installation with its own storage. Follow the PostgreSQL 19 runbook for the dry run, logical dump and transactional restore. Keep the original 16 volume, its matching build and configuration, the sealing-key file and the migration archive. Verify the 19 installation in isolation before cutover. For rollback, use the preserved 16 installation with its matching build. A retired Termsheep schema still requires a fresh database.

Rehearse the transition

Record the existing image identity or source revision and the client versions. Read the release notes for schema changes and supported pairings. Use an immutable verified image digest or a reviewed source revision. Restore a backup privately on an independent cluster and trial the transition there first. No public predecessor or tested public upgrade range is available yet.

Quiesce writes and upgrade

Schedule downtime and quiesce user writes. Keep the matching platform running while you take and verify the final backup. Keep the previous image, pepper and deployment configuration, including its Compose file set. Leave PostgreSQL available for migration.

Run from the current installation directory with its usual Compose project. Keep the complete file list in COMPOSE_FILE in .env, including any release overrides or source overrides. The command below uses an externally mounted pepper. For a server-managed pepper, omit secrets/pepper and preserve the managed file separately.

backup_dir=/protected/backups/termsheep-before-upgrade
/path/to/docker/backup.sh "$backup_dir" secrets/pepper &&
  test -s "$backup_dir/manifest" &&
  test "$(openssl dgst -sha256 -r "$backup_dir/database.dump" | cut -d " " -f1)" = "$(sed -n '3p' "$backup_dir/manifest")" &&
  docker compose exec -T db pg_restore --list < "$backup_dir/database.dump" > /dev/null &&
  docker compose stop platform
  • Source Compose. Switch to the reviewed new revision, build with docker compose build platform, then run docker compose up -d --wait. In this single-owner profile, startup applies migrations using DATABASE_URL.
  • Release Compose. Verify and pull the new digest, set TERMSHEEP_IMAGE_DIGEST in the installation's .env, and run the one-shot owner migration before serving again.
docker compose run --rm migrate &&
  docker compose up -d --wait platform

For manual split-role installs, run termsheep-platform migrate separately with the owner credential. Start the serving process with the two restricted URLs. See split credentials.

Diagnose and verify

Check /healthz and docker compose ps. The HTTP check is database-backed readiness. A running process can be unready while PostgreSQL is unavailable. The startup command termsheep-platform check can apply migrations in owner mode. Use the HTTP probe for routine readiness checks. Inspect sanitized startup logs with docker compose logs --tail=100 platform.

Test sign-in, client sync and a limited set of real operations before allowing traffic. Check queue age and failed deliveries. Webhooks retry with backoff and then record a terminal failure. Receivers can use the delivery ID to deduplicate. Reconcile deliveries before allowing a recovered queue to send. Keep the host clock synchronized and allow time for a graceful stop. Deployment limits and multi-replica behavior need workload-specific validation.

Roll back with a matched snapshot

After schema changes, restore the previous build and its pre-upgrade snapshot into a new cluster. Keep the failed upgrade isolated while investigating. The restored point loses writes after that snapshot unless separately reconciled. Review access revocations, member changes, queued work and retained copies before redirecting traffic.