Skip to content
Docs
GitHub

Docker Compose

Deploy the Everruns platform with Docker Compose: control plane, workers, UI, and PostgreSQL.

8 min readEdit on GitHub

Deploy the complete Everruns platform using Docker Compose. This guide sets up the control plane, workers, UI, and database in a single command.

On your own computer, everruns docker up does these steps for you. On a cluster, use the Helm chart.

  • Docker Engine 20.10+
  • Docker Compose v2.23.1+ (the file uses inline configs.content)
  • 4GB available RAM
Terminal window
# Create directory and download docker-compose file
mkdir everruns && cd everruns
curl -o docker-compose.yaml https://raw.githubusercontent.com/everruns/everruns/main/infra/docker-compose/docker-compose.yaml

Everruns encrypts LLM API keys at rest, signs login sessions, and authenticates workers to the control plane. Generate one value for each:

Terminal window
python3 -c "import os, base64; print('kek-v1:' + base64.b64encode(os.urandom(32)).decode())" # encryption key
openssl rand -hex 32 # JWT secret
openssl rand -hex 32 # worker token

Create a .env file next to docker-compose.yaml. The first five values are required: Compose refuses to start without AUTH_JWT_SECRET, and the server refuses to start without WORKER_GRPC_AUTH_TOKEN.

.env
SECRETS_ENCRYPTION_KEY=kek-v1:<your-generated-key>
AUTH_JWT_SECRET=<jwt-secret>
WORKER_GRPC_AUTH_TOKEN=<worker-token>
AUTH_ADMIN_EMAIL=admin@example.com
AUTH_ADMIN_PASSWORD=<choose-a-password>
# Optional: two extra workers and VictoriaMetrics (see Profiles below)
COMPOSE_PROFILES=scale,metrics
# Optional, single-tenant admin mode: encrypt these keys into the default org.
# The explicit seeding opt-in is required to skip UI credential configuration.
SEED_DEFAULT_PROVIDER_KEYS_FROM_ENV=true
DEFAULT_OPENAI_API_KEY=sk-...
DEFAULT_ANTHROPIC_API_KEY=sk-ant-...
DEFAULT_GEMINI_API_KEY=AIza...
DEFAULT_OPENROUTER_API_KEY=sk-or-...

The optional environment-key path stores keys encrypted in the default organization’s database. Production startup otherwise ignores DEFAULT_* keys for tenant execution. Enable seeding only for a single-tenant deployment with admin auth; built-in signup or OAuth self-provisioning prevents this opt-in from sharing host credentials. Leave it unset and use the UI for other deployments.

Terminal window
docker compose pull # Fetch latest images
docker compose up -d

The published compose file defaults to app entry point on 9300. If that port is busy, override before startup:

Terminal window
EXAMPLE_PROXY_PORT=10300 VICTORIAMETRICS_PORT=18428 docker compose up -d

This starts:

  • PostgreSQL database
  • Valkey (rate limiting) and NATS (event delivery and task notifications)
  • Control plane (server): HTTP API and worker gRPC
  • 1 worker, or 3 with the scale profile
  • Next.js UI
  • Caddy reverse proxy
  • VictoriaMetrics, scraping server metrics at http://localhost:8428/vmui (metrics profile)

Sign in to the UI with AUTH_ADMIN_EMAIL and AUTH_ADMIN_PASSWORD.

ServiceURL
Web UIhttp://localhost:9300
APIhttp://localhost:9300/api/…
OAuthhttp://localhost:9300/oauth/…
MCPhttp://localhost:9300/mcp
OAuth Metadatahttp://localhost:9300/.well-known/oauth-authorization-server
Health Checkhttp://localhost:9300/health

If you want multiple Everruns compose stacks on the same machine, set both a Compose project name and host-port overrides:

Terminal window
COMPOSE_PROJECT_NAME=everruns-demo-2 \
EXAMPLE_PROXY_PORT=10300 \
VICTORIAMETRICS_PORT=18428 \
docker compose up -d

This isolates Compose networks and volumes. With the metrics profile enabled, override both published ports: VictoriaMetrics also binds a host port. To restrict a local test to this machine, use EXAMPLE_PROXY_BIND=127.0.0.1, EXAMPLE_PROXY_PORT=10300, and VICTORIAMETRICS_PORT=127.0.0.1:18428.

The downloaded file follows main, while its application images default to the published latest tag. These can be different revisions. Use EVERRUNS_TAG=vX.Y.Z to select a published release; docker compose config --images shows the selected images. Run docker compose pull before recreating services after a tag change.

If you didn’t set LLM API keys (DEFAULT_OPENAI_API_KEY, DEFAULT_ANTHROPIC_API_KEY, DEFAULT_GEMINI_API_KEY, or DEFAULT_OPENROUTER_API_KEY) in your .env file, configure via UI:

  1. Open http://localhost:9300
  2. Open Models > Providers (also available from Settings)
  3. Click Connect provider, choose a provider such as OpenRouter, and enter an inference API key. Use an existing limited key, never an OpenRouter management key.
  4. Wait for the key verification result, then click Save Credentials
  5. Sync the provider’s models if needed, enable a model that supports chat and tools, and select it under Defaults. For OpenRouter, openai/gpt-6-luna is a suitable lightweight choice.

A fresh Chat shows No intelligence available until a usable model is configured. Provider credentials are encrypted using SECRETS_ENCRYPTION_KEY; keep that key stable while retaining the database volume.

  1. Go to Agents in the UI
  2. Click Create Agent
  3. Set a name and system prompt
  4. Select your configured LLM provider
  5. Save the agent

You can also create an agent through Chat. Ask, for example: “Create an agent named math-tutor with the system prompt You are a concise math tutor. Explain arithmetic in one sentence. Use my configured default model.” If Chat asks for confirmation before creating the reusable agent, confirm that specific creation in Chat. Open the returned agent link to verify it was saved. To run it, open Playground, choose the agent, leave Dry run unchecked, start a chat, and ask “What is 7 multiplied by 8?” A successful response should explain that the result is 56.

Repeatable real-provider E2E (repository checkout)

Section titled “Repeatable real-provider E2E (repository checkout)”

The opt-in test downloads the same Compose file, starts all ten services with the scale,metrics profiles in a unique project with loopback ports and disposable volumes, opts in to application startup encrypting an existing OpenRouter environment key into the disposable database, signs in through the UI, verifies the configured provider, creates an agent through Chat, and runs the persisted agent in Playground. It checks durable events and the saved answer, records the real browser journey, and removes its project and volumes on exit. It makes paid requests; use a limited inference key and a low-cost model. No simulated responses satisfy this test.

Terminal window
cd apps/ui
pnpm install --frozen-lockfile
pnpm exec playwright install chromium
cd ../..
# Supply OPENROUTER_API_KEY securely in the environment, without shell tracing.
# This opt-in permits encrypted credential storage in the disposable test stack.
EVERRUNS_E2E_ALLOW_PROVIDER_STORAGE=1 node scripts/e2e-compose-openrouter.mjs

The test prints its evidence directory, containing a WebM video, report.json, and commands.log. The raw inference key is supplied only to the server environment, never written to the test .env or entered through browser UI/API. Secret values are excluded from command output, and no trace, HAR, or browser authentication state is saved. To verify startup and UI login without a key, run node scripts/e2e-compose-openrouter.mjs --setup-only; this does not verify inference, agent creation, or agent execution. Set EVERRUNS_TAG to pin published images, or set COMPOSE_E2E_FILE to your local Compose file to test a configuration change. See node scripts/e2e-compose-openrouter.mjs --help for options.

The API requires a token. Create a personal access token under Settings > Personal Access Tokens in the UI (it starts with evr_pat_ and is shown once), or from the command line as described in Authentication.

Terminal window
export EVERRUNS_TOKEN=evr_pat_...
# Create a session (agent_id in request body)
curl -X POST http://localhost:9300/api/v1/sessions \
-H "Authorization: Bearer $EVERRUNS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"agent_id": "{agent_id}"}'
# Send a message
curl -X POST http://localhost:9300/api/v1/sessions/{session_id}/messages \
-H "Authorization: Bearer $EVERRUNS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"message": {"role": "user", "content": [{"type": "text", "text": "Hello!"}]}}'

Without profiles the stack is the lean set: PostgreSQL, Valkey, NATS, the server, one worker, the UI and Caddy. Two optional Compose profiles add the rest:

ProfileAdds
scaleworker-2 and worker-3
metricsVictoriaMetrics at http://localhost:8428/vmui
tailscaleA public *.ts.net address through Tailscale Funnel (TS_AUTHKEY)
cloudflareA Cloudflare named tunnel (CLOUDFLARE_TUNNEL_TOKEN); its hostname points at http://caddy:9300
cloudflare-quickA Cloudflare quick tunnel: a random address that changes on every restart
ngrokYour ngrok static domain (NGROK_AUTHTOKEN, PUBLIC_APP_URL)

With a tunnel, or your own reverse proxy, set PUBLIC_APP_URL in .env to the public HTTPS origin, such as https://agents.example.com: Slack Request URLs, OAuth callbacks and links use it. Never give a public address to an instance with AUTH_MODE=none. everruns docker up --tunnel sets all of this up for you.

Set them in .env as COMPOSE_PROFILES=scale,metrics (as above), or per command: docker compose --profile metrics up -d. Profiles need Docker Compose 2.20 or newer.

Add more workers by scaling the worker services (worker-2 and worker-3 need the scale profile):

Terminal window
# Scale to 5 workers
docker compose up -d --scale worker-1=1 --scale worker-2=1 --scale worker-3=3

Or modify docker-compose.yaml to add more worker services.

Terminal window
# All services
docker compose logs -f
# Specific service
docker compose logs -f server
docker compose logs -f worker-1

Set OTEL_EXPORTER_OTLP_ENDPOINT to export traces to any OTLP-compatible backend (Grafana Tempo, Datadog, etc.).

Terminal window
# Stop all services
docker compose down
# Stop and remove volumes (deletes data)
docker compose down -v
Terminal window
docker compose ps

server should report healthy. Its healthcheck runs everruns-server --health-check, which calls /health inside the container. Images released before that flag existed always show unhealthy even when the API works; check curl http://localhost:9300/health instead.

If services fail to connect to PostgreSQL:

Terminal window
# Check postgres health
docker compose ps postgres
# View postgres logs
docker compose logs postgres

Migrations are auto-applied when the server starts. If migrations fail:

Terminal window
# Check server logs for migration errors
docker compose logs server
# Restart the server to retry migrations
docker compose restart server

To inspect migration status, use the admin container.

Verify workers can reach the control plane:

Terminal window
# Check worker logs
docker compose logs worker-1

A worker that logs authentication errors has a different WORKER_GRPC_AUTH_TOKEN from the server. Both read it from the same .env, so recreate them after changing it: docker compose up -d --force-recreate.