Configure
.env in the checkout configures the stack. A first box needs nothing more than what ./setup.sh writes there.
docker compose up reads .env at start. After a change to .env, restart the stack:
docker compose up --detach --waitPlatform keys are the exception. A platform admin enters them in the operator app, and they take effect at once.
How a value reaches the server
The Compose file passes .env to the orchestrator with env_file. Every variable on this page reaches it that way, except those the Compose file names itself:
- The Compose file sets these, and
.envcannot change them:DATABASE_URL,OPENSANDBOX_URL,NOTES_ROOT,WORKSPACE_ROOT,ATTACHMENTS_ROOT,CONNECTORS_ROOT(each underSTATE_ROOT),TOOL_RESULT_MAX_BYTES(65536),HOST,PORT, andHARNESS_MCP_HOST(0.0.0.0inside the container). - The Compose file reads these from the shell first, then from
.env:STATE_ROOT,SECRETS_MASTER_KEY,POSTGRES_PASSWORD,OPENSANDBOX_API_KEY,ORCHESTRATOR_PORT,ORCHESTRATOR_IMAGE,SANDBOX_IMAGE,AUTH_MODE,SENTRY_ENVIRONMENT,HARNESS_MCP_PORT,HARNESS_MCP_PUBLISH,HARNESS_MCP_SANDBOX_HOST, andHARNESS_MCP_URL. A value exported in the shell wins over.env.
A variable exported in the shell and not named in the Compose file does not reach the container.
Required
./setup.sh writes these four values. It keeps them on later runs (Maintain).
| Variable | Value |
|---|---|
STATE_ROOT | An absolute path on this host. The stack keeps its state under it. A relative path is refused, because the sandbox server mounts each machine's directory by this path. The path is on a Unix filesystem: PostgreSQL and the machines need ownership, permissions, and links under it. ./setup.sh tries them from a container and refuses a path where one fails |
SECRETS_MASTER_KEY | 32 random bytes, as hex, base64, or base64url (./setup.sh writes hex). It encrypts every stored credential: connector logins, model keys, platform keys, and secrets. .env holds its only copy. A lost key loses them all. The server refuses to start without it, and refuses the all-zero key unless ALLOW_ZERO_MASTER_KEY=1 (Development) |
POSTGRES_PASSWORD | The database password. Generated |
OPENSANDBOX_API_KEY | The key the server and the sandbox server share. Generated |
Images
| Variable | Default | Role |
|---|---|---|
ORCHESTRATOR_IMAGE | guilds-orchestrator:local | The orchestrator image the stack runs. docker compose up --build builds it from the checkout under this tag |
SANDBOX_IMAGE | agent-runtime:0.4 | The image every machine runs. ./setup.sh builds agent-runtime:0.4 from runtime/ |
The OpenSandbox server runs guilds-opensandbox-server:473ff611, which ./setup.sh builds from the pinned commit.
Integrations
An integration is an optional capability of the box as a whole. The box holds its credential for everyone on it. A model key, a connector login, or a secret is different: each belongs to one organisation.
Admin, Platform keys lists each integration with its state and which fields are set. It never shows a value. Platform keys explains how an integration is on, off, or incomplete.
Platform keys
A platform admin enters these under Admin, Platform keys. They are stored encrypted under SECRETS_MASTER_KEY. They take effect at once. .env carries none of them.
| Integration | Fields | Switches on | Without it |
|---|---|---|---|
| Web search | Tavily API key | The Tavily connector on the platform's key, tavily_search | Runs leave the tool out. An organisation may connect a Tavily key of its own |
| System One | An optional provider (typesafe, the only one accepted and the one read while blank; Platform keys refuses another on save), API key, and an optional model | Recipient and history selection in group chat, and the agent-optimized browser | Tag rules and the last 10 messages, and no agent-optimized browser |
| GitHub App | App ID, App slug, private key (PEM), client ID, client secret. Create the GitHub App fills them from GitHub (GitHub) | The GitHub connector and a guild's repositories | Tools marks the connector Not set up, names the missing fields, and disables Connect |
| Google connectors | Client ID, client secret (Gmail and Drive) | The Gmail and Drive connectors | As for the GitHub App |
Environment
These are read from .env at start. Platform keys shows them read-only.
| Integration | Variables | Switches on | Without it |
|---|---|---|---|
| Error reporting | SENTRY_DSN (Error reporting) | Errors, traces, logs, and runtime metrics sent to Sentry (Maintain) | Structured logs only |
| Registry | REGISTRY_URL, https://registry.guilds.run while unset. REGISTRY_PUBLIC_KEY, optional, to require a signed index | Installing connectors and recipes from a registry (Connector registry) | Set empty, the box is offline. Nothing installs, and recipe apply names a missing connector unknown |
| Connector code | CONNECTORS_CODE_TIER=1. The code lives under CONNECTORS_ROOT, which the Compose file sets | Registry connectors that carry adapter code, from an index REGISTRY_PUBLIC_KEY verifies (Code tier) | A code install is refused, and code already on disk is not loaded |
No integration serves a model provider. Each organisation connects its own keys under Settings, Model keys (Model keys).
Reaching the box
| Variable | Default | Role |
|---|---|---|
ORCHESTRATOR_PORT | 8080 | The loopback port the operator app is published on |
AUTH_MODE | compat-cookie | How a request becomes a user. With compat-cookie, whoever reaches the port is the operator. With trusted-header, an authenticating proxy in front sends each person's email |
PUBLIC_BASE_URL | empty | The address the box is reached at from elsewhere. The server answers requests for a loopback host or this one |
TRUSTED_PROXY_SECRET | The secret the proxy sends in X-Guilds-Proxy-Secret. Required by trusted-header | |
TRUSTED_HEADER_EMAIL | X-Forwarded-Email | The header the proxy sends the email in |
OPERATOR_EMAIL | Your own email. Boot gives it to the box's first user. Required by trusted-header | |
ADAPTER_PROXY_URL | empty | A forward proxy for the HTTP calls of connector adapters, remote MCP servers, and the GitHub App. Empty, they go direct |
Reaching the MCP server from a sandbox
A subscription agent's harness calls its Guilds tools on the orchestrator's MCP server, a listener of its own apart from the operator app (Deployment).
| Variable | Default | Role |
|---|---|---|
HARNESS_MCP_PORT | 8090 | The port the listener listens on, and the Compose file publishes it on |
HARNESS_MCP_HOST | 127.0.0.1 | The address the listener binds. The Compose file sets 0.0.0.0 inside the container, and HARNESS_MCP_PUBLISH bounds who reaches it |
HARNESS_MCP_PUBLISH | 127.0.0.1 | The host address the Compose file publishes the port on. ./setup.sh writes it for the Docker engine it finds: 127.0.0.1 on Docker Desktop, the default bridge's gateway (172.17.0.1 unless the daemon sets another) on a Linux engine |
HARNESS_MCP_SANDBOX_HOST | host.docker.internal | The host a sandbox reaches the published port by. ./setup.sh writes host.docker.internal on Docker Desktop and the bridge's gateway on a Linux engine |
HARNESS_MCP_URL | http://<HARNESS_MCP_SANDBOX_HOST>:<HARNESS_MCP_PORT> | The URL a sandbox is given, without a trailing slash; each agent's path, /mcp/<agent id>, follows it. An http or https URL with no credentials, query, or fragment, or the box does not start. Set it where a sandbox reaches the listener another way, such as through a network of the deployment's own. Outside Compose its default is http://host.docker.internal:<HARNESS_MCP_PORT> |
./setup.sh writes HARNESS_MCP_PUBLISH and HARNESS_MCP_SANDBOX_HOST each while .env has none. While .env has neither, the Compose file publishes the port on loopback, which a sandbox reaches on Docker Desktop and not on a Linux engine, and ./setup.sh writes both.
Connectors that sign in with OAuth return to <PUBLIC_BASE_URL>/api/mcp/oauth/callback. While PUBLIC_BASE_URL is empty, they return to the loopback address the box is reached at, http://localhost:8080/api/mcp/oauth/callback on the local stack. Remote access covers the two ways to reach the box from another computer, and where that callback is registered.
Limits
| Variable | Default | Role |
|---|---|---|
MAX_CONCURRENT_GENERATIONS | 0 | Generations running at once across the whole box. 0 is no ceiling. Each organisation's own cap applies under it |
HARNESSES_OFF | empty | Coding harnesses the box turns off, separated by commas or spaces: claude-code, codex, cursor, antigravity. They stay in the runtime image, but Settings does not offer them, the API refuses them as a new pick, and a run of an agent still on one fails at start. An unknown name stops the box from starting (Harnesses) |
WORKSPACE_MAX_MIB | 10240 | The host-wide cap on one agent's home, in MiB. An agent's own max_workspace_mib takes effect only below it (Agent home) |
CODE_RESULT_MAX_BYTES | 8192 | The cap on what the code helper returns from the agent's machine, in bytes. A value under 1024 falls back to the default |
Agents' CPU, memory, and disk are bounded by their organisation's machines, not by .env. Owners and admins create and size them under Settings, Machines (Machines).
Model catalog
| Variable | Default | Role |
|---|---|---|
MODELS_DEV_URL | https://models.dev/api.json | Where the model catalog is fetched from, on the first read and again once an hour. Set empty, the box stays on the catalog snapshot it ships with (Orchestrator) |
Error reporting
| Variable | Default | Role |
|---|---|---|
SENTRY_DSN | Switches Sentry on | |
SENTRY_ENVIRONMENT | development | The environment tag on each event |
SENTRY_TRACES_SAMPLE_RATE | 1.0 | The share of requests traced, 0 to 1 |
SENTRY_PROFILE_SESSION_SAMPLE_RATE | 1.0 | The chance, 0 to 1, that a process profiles its CPU while a sampled trace is open; drawn once at start |
SENTRY_DEBUG | 1 prints the Sentry SDK's own debug output |
Development
The shipped stack does not use these.
| Variable | Default | Role |
|---|---|---|
ALLOW_ZERO_MASTER_KEY | 1 lets the server start on the all-zero SECRETS_MASTER_KEY. The development stack sets it, and the Makefile gives that stack the all-zero key | |
TEMPLATES_ROOT | the orchestrator's src/prompts | The directory of agent templates, with the shared system.md. It must exist |
MODEL_CONTRACT_MODEL | A {provider}/{model} id for the live model contract | |
MODEL_CONTRACT_API_KEY | The key the contract runs with | |
MODEL_CONTRACT_BASE_URL | A local endpoint's URL |
make contract-model reads the three MODEL_CONTRACT_ values from .env, and stops while the model or the key is empty (Development).