Self-hosting overview

What you operate when you run ctx| yourself.

Self-hosting docs are for operators. They cover the infrastructure, secrets, deployment choices, and maintenance work that fully managed ctx| normally handles for you. Product workflows stay in the primary docs; this section explains what must exist underneath those workflows.

Fully managed vs self-hosted

Fully managed ctx| manages hosting, connector credentials, install links, model provider defaults, and production operations. In a self-hosted deployment, your team owns those responsibilities.

Fully managed vs self-hosted responsibilities

Use this table to decide who owns each part of the system. Fully managed ctx| is the managed path. Self-hosting means you run the same product capabilities on your own infrastructure, with your own production controls.

AreaFully managedSelf-hosted
Application hostingManaged serviceYou run backend, UI, worker, and codesearch
Public originManagedYou configure DNS, TLS, proxying, and callback URLs
DatabaseManagedYou provide Postgres 17 and run/monitor migrations
Graph databaseManagedYou provide FalkorDB or another supported graph database
GitHub connectorManaged app flowYou provide or store GitHub App credentials per connection
Confluence connectorManaged Atlassian OAuth and Forge install linkYou configure Atlassian 3LO, Forge install/provisioning, and callbacks
Model providerHosted defaultsYou configure OpenRouter, Azure, Bedrock, or an OpenAI-compatible provider
SecretsManagedYou rotate and protect auth, connector, model, and encryption secrets
Logs and tracesManagedYou collect stdout logs or configure OpenTelemetry exporters
Backups and restoreManagedYou back up Postgres, graph data, and persistent service volumes
UpgradesManagedYou plan, test, migrate, and roll back deployments

Deployment tiers

This follows the same shape as mature self-hosting docs: start with a managed cloud option, keep Docker Compose positioned for evaluation or small deployments, and make production readiness a separate operational concern.

TierUse whenShape
Fully managedYou want the product operated for youManaged cloud
Local evaluationYou want to test with your own repositoriesDocker Compose deploy profile on one machine
Small teamYou need a persistent internal deploymentOne backend, one UI, one worker, one codesearch service, managed Postgres if available, FalkorDB or equivalent graph database
ProductionMultiple teams rely on agent contextPublic HTTPS origin, managed database backups, monitored workers, log/trace collection, secrets rotation, and tested upgrade/rollback process

Start small, operate deliberately

The reference Compose stack is useful for evaluation and small deployments. Production operators should externalize stateful services where appropriate, add backup/restore procedures, and monitor the worker, codesearch, Postgres, and graph database separately.

What runs

A self-hosted deployment includes:

ComponentRole
backendHono API, auth, REST routes, MCP endpoint, connector callbacks, UI proxy
uiTanStack Start web app, served through the backend public origin
workerOpenWorkflow jobs for ingestion, connectors, and provisioning work
codesearchZoekt-backed clone/index service used by repository search and ingestion
postgresApplication database, auth/session state, connections, repositories, workflow state
graph databaseClaims and relationships used by the knowledge graph and agent context
otel-collectorOptional collector for traces, logs, and metrics fan-out

Where to go next