Upgrades

Upgrade and rollback process for self-hosted ctx| deployments.

Treat upgrades as an operational change: back up state, run migrations once, deploy compatible services together, and validate product workflows before inviting users back in.

Upgrade checklist

  1. Read release notes or the relevant pull request.
  2. Back up Postgres.
  3. Back up or snapshot the graph database.
  4. Preserve current deployment secrets and image tags or commit SHA.
  5. Confirm there are no long-running connector or ingestion jobs you need to let finish first.
  6. Run migrations against the target database.
  7. Deploy backend, worker, UI, and codesearch from the same commit or release.
  8. Validate health, sign-in, repository indexing, Chat/MCP, and connectors.

Docker Compose flow

For source-based Compose deployments:

git fetch origin
git checkout <target-ref>
docker compose --profile deploy build
docker compose --profile deploy up -d

The deploy profile runs the migrate service before app services. Check the migrator logs before validating the app.

docker compose logs migrate
docker compose logs backend worker codesearch

Image-based flow

For platforms that run prebuilt images:

  1. Build images for backend, worker, UI, and codesearch from the same commit.
  2. Push images with an immutable tag, such as a commit SHA.
  3. Run migrations using the backend image for that same commit.
  4. Update all app services to the new image tags.
  5. Keep the previous image tags available until validation completes.

Validation

After deployment:

AreaValidation
BackendGET /.status returns status: "ok"
AuthSign in with the configured provider
UIOpen app through AUTH_BASE_URL; do not bypass backend proxy
RepositoriesExisting repository list loads; new or reindexed repository succeeds
CodesearchSearch and file retrieval work for an indexed repository
GraphKnowledge graph page loads for an organization with indexed data
MCPMCP client connects using OAuth
ConnectorsGitHub webhook and Confluence setup/sync still work
ObservabilityLogs and traces continue to reach your configured sinks

Rollback

Rollback depends on whether the upgrade ran database migrations.

SituationRollback approach
No migrations ranRevert service images or source ref and restart services.
Forward-compatible migrations ranRevert services only if the previous version can tolerate the new schema.
Breaking migrations ranRestore Postgres from backup, restore graph data if needed, then redeploy the previous version.

Backups define rollback quality

A code rollback without a database restore is not always safe. Take a backup before running migrations and test restore in the environment style you use for production.

Upgrade notes by component

ComponentWatch for
BackendSchema migrations, auth behavior, MCP route compatibility, connector API changes
WorkerWorkflow compatibility, connector job changes, Forge provisioning changes
UIBuild-time public URL values, connector wizard behavior
CodesearchIndex format or clone/cache behavior
Graph databaseProvider configuration and graph projection compatibility
Model providerDefault model names, embedding dimensions, provider-specific auth