Skip to main content
Docker Compose is the shortest complete self-hosted path. The checked-in stack runs the control plane and PostgreSQL, publishing the API on 127.0.0.1:8081. It does not include a browser console. Visiting / returns 404.

Prerequisites

You need Git, Docker Compose, curl, OpenSSL, port 8081, and outbound HTTPS access to Anthropic or OpenRouter. Have a provider API key and a Tool-calling model identifier ready. The credential prompt below uses Bash. The repository does not publish qualified minimum hardware requirements. Use a patched Docker Engine 28.0.0 or newer for the localhost-port isolation fixes. During initial signup, keep the backend private from other hosts, untrusted containers, and public proxies. A fresh or reset database allows its first caller to claim the administrator account.

1. Prepare the deployment

Choose a provider and its exact Tool-calling model. From the release checkout, save the provider credential in .secrets/model-key and run preparation as your normal user. This Bash example reads the key without echoing it or putting it in shell history.
Preparation creates the PostgreSQL password and its matching DSN and generates an independent encryption key. It keeps the credentials under .secrets/bundled and writes the Compose settings to .secrets/compose.env. Repeating preparation with the same project reuses the credentials. The control plane reads the mounted encryption key at its standard location without a key environment setting.

2. Start OpenCluster privately

The control-plane API is published at 127.0.0.1:8081. Keep this listener and any frontend proxy inaccessible to untrusted callers until the first Admin exists. For the API-only procedure below, use the default OC_PUBLIC_URL=http://localhost:8081. Apply the database schema, then start the control plane:
PostgreSQL should be healthy and the control plane running. The backend does not ship a browser console. If a container exits, inspect its Compose logs.

3. Create the first User and Organization

With a compatible, privately served frontend, open /setup. This page belongs to the frontend, not to the control-plane API. The first setup request needs:
  • Organization name: The name of the team or company, 1–256 UTF-8 bytes.
  • Email: The first Admin’s sign-in address.
  • Display name (optional): How the User appears in OpenCluster, up to 256 UTF-8 bytes. If omitted, the email is used.
  • Password: Currently, 12–1,024 UTF-8 bytes. Use a long, unique password or passphrase. Byte counts may differ from character counts.
The first successful request creates one Organization and its Admin User. It also issues a session cookie to the browser. The initialization endpoint is unavailable after an Organization or User exists. Do not expose an empty database to untrusted callers, even if the frontend has not displayed the setup page. Set OC_PUBLIC_URL to the frontend’s browser-facing origin when using its same-origin API proxy. An API-only deployment may initialize directly through the private control-plane listener:
Keep passwords private and avoid putting real credentials in shell history. An API-only request returns 201 and sets a session cookie. Subsequent bootstrap attempts return 409. Sign in again when switching from localhost to your final public hostname. An Admin can add local Users after setup through POST /api/v1/local-users with an email, optional display name, initial password, and role (admin, editor, or viewer). This creates accounts directly, not email invitations. Give the initial credentials to each User through a secure channel and have them change their password after sign-in.

4. Public deployment

Do not expose an empty database to the internet or other untrusted workloads. Once the Admin is created, configure OC_PUBLIC_URL for the final HTTPS browser origin, recreate the backend with the same Compose file, and enable a trusted reverse proxy. Keep the host API port loopback-bound and preserve Origin and cookie attributes. If the database is lost or replaced, restore its backup privately before exposing the application again. An empty database reopens first-user signup. A localhost cookie does not transfer to a different public hostname, so sign in again at the final origin.

Persistence and shutdown

PostgreSQL stores durable product state in the named postgres_data volume. A normal restart or this shutdown command retains it:
Back up PostgreSQL and .secrets/bundled separately. Restore the original encryption key with the corresponding database backup before starting the service. Every replica must read the same key. A missing key requires recovery from backup to reopen stored Integration credentials. Protect the backup files with the same access controls as the originals. Restore the original postgres-password, postgres-dsn, and encryption-key files together under .secrets/bundled before running preparation. If the original files are managed elsewhere, keep their existing paths with OPENCLUSTER_POSTGRES_PASSWORD_FILE, OPENCLUSTER_DATABASE_DSN_FILE, and OPENCLUSTER_ENCRYPTION_KEY_FILE. Run Compose directly with those settings.

Upgrades

Keep the same Compose project, PostgreSQL volume, and deployment credentials. Back up the database and encryption key separately. Stop the control plane, apply the matching release’s migrations once, then start the new release with the same credentials. Run one migration command at a time per database. Applied migrations are skipped on repeat runs. The migration command rejects unsupported schema histories and does not reset existing data. Do not run mixed application versions against the same database. For an external PostgreSQL deployment, see Helm.

Failure states

  • If PostgreSQL stays unhealthy, verify that the password file and DSN agree and that the DSN uses host postgres.
  • If the control plane exits, inspect docker compose --env-file .secrets/compose.env -f deploy/compose/compose.yaml logs control-plane for a missing file, invalid key length, or provider configuration error.
  • If /healthz works but /readyz fails, inspect PostgreSQL connectivity and service logs before accepting traffic.
  • If the API is unreachable, confirm that port 8081 is free and the control-plane service is running.

Next step

Choose a source with Connect your tools, then ask a question or investigate an Incident. Use Configuration for supported settings and Troubleshooting when a verification step fails.