Docker Compose
Deploy the Everruns platform with Docker Compose: control plane, workers, UI, and PostgreSQL.
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.
Prerequisites
Section titled “Prerequisites”- Docker Engine 20.10+
- Docker Compose v2.23.1+ (the file uses inline
configs.content) - 4GB available RAM
Quick Start
Section titled “Quick Start”1. Download Docker Compose File
Section titled “1. Download Docker Compose File”# Create directory and download docker-compose filemkdir everruns && cd everrunscurl -o docker-compose.yaml https://raw.githubusercontent.com/everruns/everruns/main/infra/docker-compose/docker-compose.yaml2. Generate Secrets
Section titled “2. Generate Secrets”Everruns encrypts LLM API keys at rest, signs login sessions, and authenticates workers to the control plane. Generate one value for each:
python3 -c "import os, base64; print('kek-v1:' + base64.b64encode(os.urandom(32)).decode())" # encryption keyopenssl rand -hex 32 # JWT secretopenssl rand -hex 32 # worker token3. Create Environment File
Section titled “3. Create Environment File”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.
SECRETS_ENCRYPTION_KEY=kek-v1:<your-generated-key>AUTH_JWT_SECRET=<jwt-secret>WORKER_GRPC_AUTH_TOKEN=<worker-token>AUTH_ADMIN_EMAIL=admin@example.comAUTH_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=trueDEFAULT_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.
4. Start Services
Section titled “4. Start Services”docker compose pull # Fetch latest imagesdocker compose up -dThe published compose file defaults to app entry point on 9300. If that port is busy, override before startup:
EXAMPLE_PROXY_PORT=10300 VICTORIAMETRICS_PORT=18428 docker compose up -dThis 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
scaleprofile - Next.js UI
- Caddy reverse proxy
- VictoriaMetrics, scraping server metrics at http://localhost:8428/vmui (
metricsprofile)
Sign in to the UI with AUTH_ADMIN_EMAIL and AUTH_ADMIN_PASSWORD.
5. Access the Platform
Section titled “5. Access the Platform”| Service | URL |
|---|---|
| Web UI | http://localhost:9300 |
| API | http://localhost:9300/api/… |
| OAuth | http://localhost:9300/oauth/… |
| MCP | http://localhost:9300/mcp |
| OAuth Metadata | http://localhost:9300/.well-known/oauth-authorization-server |
| Health Check | http://localhost:9300/health |
Configuration
Section titled “Configuration”Run Multiple Copies
Section titled “Run Multiple Copies”If you want multiple Everruns compose stacks on the same machine, set both a Compose project name and host-port overrides:
COMPOSE_PROJECT_NAME=everruns-demo-2 \EXAMPLE_PROXY_PORT=10300 \VICTORIAMETRICS_PORT=18428 \docker compose up -dThis 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.
Configure LLM Provider
Section titled “Configure LLM Provider”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:
- Open http://localhost:9300
- Open Models > Providers (also available from Settings)
- 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.
- Wait for the key verification result, then click Save Credentials
- 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-lunais 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.
Create Your First Agent
Section titled “Create Your First Agent”- Go to Agents in the UI
- Click Create Agent
- Set a name and system prompt
- Select your configured LLM provider
- 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.
cd apps/uipnpm install --frozen-lockfilepnpm exec playwright install chromiumcd ../..
# 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.mjsThe 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.
Start a Session
Section titled “Start a Session”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.
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 messagecurl -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!"}]}}'Profiles
Section titled “Profiles”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:
| Profile | Adds |
|---|---|
scale | worker-2 and worker-3 |
metrics | VictoriaMetrics at http://localhost:8428/vmui |
tailscale | A public *.ts.net address through Tailscale Funnel (TS_AUTHKEY) |
cloudflare | A Cloudflare named tunnel (CLOUDFLARE_TUNNEL_TOKEN); its hostname points at http://caddy:9300 |
cloudflare-quick | A Cloudflare quick tunnel: a random address that changes on every restart |
ngrok | Your 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.
Scaling Workers
Section titled “Scaling Workers”Add more workers by scaling the worker services (worker-2 and worker-3
need the scale profile):
# Scale to 5 workersdocker compose up -d --scale worker-1=1 --scale worker-2=1 --scale worker-3=3Or modify docker-compose.yaml to add more worker services.
Monitoring
Section titled “Monitoring”View Logs
Section titled “View Logs”# All servicesdocker compose logs -f
# Specific servicedocker compose logs -f serverdocker compose logs -f worker-1Distributed Tracing
Section titled “Distributed Tracing”Set OTEL_EXPORTER_OTLP_ENDPOINT to export traces to any OTLP-compatible backend (Grafana Tempo, Datadog, etc.).
Stopping Services
Section titled “Stopping Services”# Stop all servicesdocker compose down
# Stop and remove volumes (deletes data)docker compose down -vTroubleshooting
Section titled “Troubleshooting”Check Service Health
Section titled “Check Service Health”docker compose psserver 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.
Database Connection Issues
Section titled “Database Connection Issues”If services fail to connect to PostgreSQL:
# Check postgres healthdocker compose ps postgres
# View postgres logsdocker compose logs postgresMigration Failures
Section titled “Migration Failures”Migrations are auto-applied when the server starts. If migrations fail:
# Check server logs for migration errorsdocker compose logs server
# Restart the server to retry migrationsdocker compose restart serverTo inspect migration status, use the admin container.
Worker Not Processing
Section titled “Worker Not Processing”Verify workers can reach the control plane:
# Check worker logsdocker compose logs worker-1A 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.
Next Steps
Section titled “Next Steps”- API Reference - Full API documentation
- Capabilities - Extend agent functionality
- Environment Variables - Advanced configuration