Booca Docs

Self-host quickstart

Start Booca with Docker Compose, log in, and connect your first computer.

Self-hosting Booca has two parts:

PartWhat it runsWhere it lives
Booca serviceWeb, API, and PostgreSQLOne machine with Docker installed
ComputerThe Booca daemon and AI coding toolsThe computer developers actually work on

They can be the same machine or separate ones. Self-hosting replaces only the server part.

This guide uses Docker Compose. For Kubernetes deployments, see the SELF_HOSTING.md in the repository.

Before you start

The machine running the Booca service needs:

  • Docker Engine or Docker Desktop, with docker compose working
  • Git, Make, curl, and OpenSSL
  • Ports 3000 and 8080 free on the machine

Confirm Docker and Compose are available first:

docker info
docker compose version

Booca uses Compose v2, invoked as docker compose. The legacy docker-compose v1 is not supported.

The computer also needs at least one AI coding tool installed and logged in, such as Claude Code, Codex, or Cursor. The Booca CLI is installed in step 5.

1. Start Booca

Use a reviewed Booca checkout from your operator. The company source is https://git.burnergames.net/system/booca.git; repository access may be required. From the repository root, create a new private .env from .env.example. Set strong independent JWT_SECRET / POSTGRES_PASSWORD, verified BOOCA_BACKEND_IMAGE / BOOCA_WEB_IMAGE, an immutable BOOCA_IMAGE_TAG, a unique COMPOSE_PROJECT_NAME, and the actual ports/origins.

For a new installation, make selfhost runs the guarded storage initializer and records external volume selections before pulling images. For existing data, first inventory and select the original BOOCA_PGDATA_VOLUME and BOOCA_UPLOADS_VOLUME and verify the existing data. Never create empty replacement volumes to bypass a storage error.

umask 077
test ! -e .env && cp .env.example .env
# Configure .env before starting; preserve existing files and secret values.
make selfhost

2. Confirm the services are ready

Check container status:

docker compose -f docker-compose.selfhost.yml ps

postgres should show healthy, and backend and frontend should be running. Then check the backend, the database, and migrations:

curl -fsS http://localhost:8080/readyz

The expected response is:

{"status":"ok","checks":{"db":"ok","migrations":"ok"}}

The backend container runs database migrations on every startup before serving; there is no manual migration command to run.

3. Choose how to access

Local access

Open http://localhost:3000 directly. You also won't need to pass any URLs when running booca setup self-host later.

Remote access

Docker Compose binds 3000 and 8080 to 127.0.0.1 only. Do not switch this to 0.0.0.0 to expose the ports to the public internet; use a reverse proxy with HTTPS instead.

The example below uses two domains:

  • app.example.com: the Booca web app
  • api.example.com: the API, health checks, and daemon connections

First set the public URLs in .env:

FRONTEND_ORIGIN=https://app.example.com
BOOCA_APP_URL=https://app.example.com
BOOCA_PUBLIC_URL=https://api.example.com

With this configuration all browser traffic stays on the app domain, so cookies never cross domains and COOKIE_DOMAIN is not needed. If the browser talks to the api domain directly instead, you must set it — see Environment variables.

Then set up DNS and proxy the local ports with Caddy:

app.example.com {
    # Hand browser WebSockets straight to the backend
    @ws path /ws /ws/*
    handle @ws {
        reverse_proxy 127.0.0.1:8080 {
            flush_interval -1
        }
    }

    # Everything else goes to the frontend, which forwards API and login requests
    handle {
        reverse_proxy 127.0.0.1:3000
    }
}

api.example.com {
    reverse_proxy 127.0.0.1:8080 {
        flush_interval -1
    }
}

If you would rather serve everything on a single origin (one domain, or one host with one port — common on small servers), route the daemon-critical paths to the backend explicitly and let the frontend handle the rest:

booca.example.com {
    # CLI reachability probe: `booca setup` GETs <server-url>/health and
    # needs a 200 — older web releases don't forward it, so route it directly
    handle /health {
        reverse_proxy 127.0.0.1:8080
    }

    # Browser realtime WebSocket — the web image cannot proxy WS upgrades
    handle /ws {
        reverse_proxy 127.0.0.1:8080 {
            flush_interval -1
        }
    }

    # Daemon long-connection WebSocket: daemons dial {server-url}/api/daemon/ws
    # (not /ws). Without this route the handshake fails and the daemon silently
    # falls back to polling
    handle /api/daemon/ws {
        reverse_proxy 127.0.0.1:8080 {
            flush_interval -1
        }
    }

    # Everything else goes to the frontend, which forwards API and login requests
    handle {
        reverse_proxy 127.0.0.1:3000
    }
}

With a single origin, point both URLs at it (FRONTEND_ORIGIN and BOOCA_APP_URL in .env, then --server-url and --app-url in booca setup self-host).

Caddy obtains TLS certificates and forwards WebSockets. After editing .env, recreate the containers with up -d so the new configuration takes effect:

docker compose -f docker-compose.selfhost.yml up -d
curl -fsS https://api.example.com/readyz
curl -fsS https://app.example.com/api/config | grep -o '"daemon_server_url":"[^"]*"'

The last command prints daemon_server_url, the URL daemons use to reach the API: BOOCA_DAEMON_SERVER_URL when set, then BOOCA_PUBLIC_URL, otherwise the app URL — BOOCA_APP_URL, falling back to FRONTEND_ORIGIN. When neither BOOCA_APP_URL nor FRONTEND_ORIGIN is set, the field is omitted from the response entirely (so the grep prints nothing), even if BOOCA_DAEMON_SERVER_URL or BOOCA_PUBLIC_URL is set. If it prints a localhost address, .env still carries local defaults: set FRONTEND_ORIGIN and BOOCA_APP_URL explicitly to the public URLs instead of relying on the ${FRONTEND_PORT} references copied from .env.example, then recreate the containers.

docker compose restart only restarts existing containers and does not re-read .env. After changing configuration, run docker compose -f docker-compose.selfhost.yml up -d to re-read .env.

4. Log in and create a workspace

Open http://localhost:3000 locally, or the https://app.example.com you just configured, and enter your email to request a verification code.

No email service is configured by default. After requesting a code, read it from the backend logs:

docker compose -f docker-compose.selfhost.yml logs backend \
  | grep "Verification code"

The logs contain a line like:

[DEV] Verification code for you@example.com: 123456

Enter the code and create your first workspace. Once Resend or SMTP is configured, codes are sent by email and members no longer need to read container logs — see Auth setup.

Self-hosted deployments default to APP_ENV=production, which disables fixed verification codes. Do not set BOOCA_DEV_VERIFICATION_CODE on a public instance.

5. Connect a computer

Run the commands below on the computer that runs your AI coding tools, which is not necessarily the server running Docker.

Tasks run with the full permissions of the user running the daemon — they can read and write everything that user can. Run the daemon as a dedicated Unix user, in a container, or in a VM rather than under your personal account. See the security model.

Install the Booca CLI first:

macOS / Linux

Run the scripts from a reviewed checkout with an operator-verified CLI feed. The company default URL does not prove that this build has been published. Set BOOCA_RELEASE_BASE_URL explicitly; the generation-based updater is a separate protocol (see the repository release runbook).

: "${BOOCA_RELEASE_BASE_URL:?Set the verified CLI feed URL}"
export BOOCA_RELEASE_BASE_URL
bash scripts/install.sh

Windows PowerShell

if (-not $env:BOOCA_RELEASE_BASE_URL) { throw "Set the verified CLI feed URL" }
& ./scripts/install.ps1

If the Booca service runs on this same computer:

booca setup self-host

If the Booca service runs on another machine, pass the two URLs you configured earlier:

booca setup self-host \
  --server-url https://api.example.com \
  --app-url https://app.example.com

The command first checks <server-url>/health, then opens a browser to complete login. After login it stores local credentials and starts the daemon. A Server not reachable error at this step means the probe could not get a 200 from /health: the proxy forwards everything to a web release that does not forward the path, the proxy does not route /health to the backend at all, or a lower-level failure (DNS, TLS, firewall, timeout, 5xx from the backend) — see Troubleshooting.

Confirm the connection:

booca daemon status

The output should show:

  • Daemon: running
  • Agents listing the AI coding tools installed on this machine
  • Workspaces greater than 0

6. Complete the first run

Back in Booca, once an online runtime appears in the runtime list, create an agent and assign it your first issue.

When the run shows as completed and the agent's reply appears in the timeline, the self-hosted service, the computer, and the AI coding tool are all connected. For detailed steps, see steps 3-5 of the quickstart.

Common admin commands

Run all of these from the booca repository directory:

# Check status
docker compose -f docker-compose.selfhost.yml ps

# Tail backend logs
docker compose -f docker-compose.selfhost.yml logs -f backend

# Apply .env changes
docker compose -f docker-compose.selfhost.yml up -d

# Stop the services, keeping the volumes
docker compose -f docker-compose.selfhost.yml down

Upgrade, backup and recovery

Pin a reviewed source commit and immutable image version; record the platform digests and current config before upgrading. latest alone cannot identify a rollback. git pull changes source assets, not the selected image version. For source builds, use make selfhost-build, which supplies the local image repositories required by the build override.

Freeze writes and back up PostgreSQL, roles, uploads/object storage and secret bytes in the same window. Use the actual database user/name, check command exit codes, validate the dump with pg_restore --list, record hashes and test restoration into independent volumes. Roles dumps contain sensitive hashes. Do not publish backups or print environment files.

umask 077
docker compose --env-file .env -f docker-compose.selfhost.yml stop frontend backend
docker compose --env-file .env -f docker-compose.selfhost.yml exec -T postgres \
  pg_dump -U booca -d booca -Fc > booca-backup.dump
docker compose --env-file .env -f docker-compose.selfhost.yml exec -T postgres \
  pg_dumpall -U booca --roles-only > booca-roles.sql

Only after backup/restore verification, select the reviewed new images and recreate with up -d; check /readyz, login, tasks, comments, attachments and encrypted credentials before reopening traffic. Backend startup runs migrations.

For compatible rollback, retain current storage and keys; verify data written after upgrading. An old snapshot would discard those writes. Restore the candidate and re-test after rehearsal. Recovery images must support current credentials and stored data. See SELF_HOSTING.md in the checkout.

Kubernetes

Use deploy/helm/booca with explicit image repositories and tag or digest, a verified context/namespace, retained PVCs and Secret. Chart appVersion does not select images. Record Chart package SHA-256 and image digests. helm rollback restores configuration, not database contents. Verify release selectors and ownership before changing resources; do not force takeover. Monitoring uses booca_* metrics; ensure Prometheus discovers the selected release's rules.

Compose storage is external: down preserves it, and down -v is not a reset procedure for these external volumes. Retirement requires a separate verified inventory and backup. Kubernetes namespace deletion can still destroy PVCs.

Common issues

SymptomCheck first
/readyz does not return okRun docker compose -f docker-compose.selfhost.yml logs backend postgres.
No verification code arrivesRequest a code, then search the backend logs for Verification code.
setup self-host reports the server is unreachableFrom the computer, request https://api.example.com/health to confirm DNS, TLS, and the reverse proxy are all reachable. A 404 means the proxy sends /health to an older web release that does not forward it — route it to the backend (Troubleshooting).
The daemon lists no AgentsConfirm the AI coding tools are on PATH and logged in, then run booca daemon restart.
Issues stay queuedRun booca daemon status to confirm the daemon is running and connected to the workspace.

For more scenarios, see Troubleshooting.

Next steps

  • Auth setup — configure email, Google login, and signup scope.
  • Environment variables — the full server configuration reference.
  • SELF_HOSTING.md — Kubernetes, upgrades, and manual deployment.
  • Desktop app — connect Desktop to a self-hosted service.