Skip to content

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:

text
docker compose up --detach --wait

Platform 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 .env cannot change them: DATABASE_URL, OPENSANDBOX_URL, NOTES_ROOT, WORKSPACE_ROOT, ATTACHMENTS_ROOT, CONNECTORS_ROOT (each under STATE_ROOT), TOOL_RESULT_MAX_BYTES (65536), HOST, PORT, and HARNESS_MCP_HOST (0.0.0.0 inside 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, and HARNESS_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).

VariableValue
STATE_ROOTAn 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_KEY32 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_PASSWORDThe database password. Generated
OPENSANDBOX_API_KEYThe key the server and the sandbox server share. Generated

Images ​

VariableDefaultRole
ORCHESTRATOR_IMAGEguilds-orchestrator:localThe orchestrator image the stack runs. docker compose up --build builds it from the checkout under this tag
SANDBOX_IMAGEagent-runtime:0.4The 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.

IntegrationFieldsSwitches onWithout it
Web searchTavily API keyThe Tavily connector on the platform's key, tavily_searchRuns leave the tool out. An organisation may connect a Tavily key of its own
System OneAn optional provider (typesafe, the only one accepted and the one read while blank; Platform keys refuses another on save), API key, and an optional modelRecipient and history selection in group chat, and the agent-optimized browserTag rules and the last 10 messages, and no agent-optimized browser
GitHub AppApp 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 repositoriesTools marks the connector Not set up, names the missing fields, and disables Connect
Google connectorsClient ID, client secret (Gmail and Drive)The Gmail and Drive connectorsAs for the GitHub App

Environment ​

These are read from .env at start. Platform keys shows them read-only.

IntegrationVariablesSwitches onWithout it
Error reportingSENTRY_DSN (Error reporting)Errors, traces, logs, and runtime metrics sent to Sentry (Maintain)Structured logs only
RegistryREGISTRY_URL, https://registry.guilds.run while unset. REGISTRY_PUBLIC_KEY, optional, to require a signed indexInstalling 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 codeCONNECTORS_CODE_TIER=1. The code lives under CONNECTORS_ROOT, which the Compose file setsRegistry 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 ​

VariableDefaultRole
ORCHESTRATOR_PORT8080The loopback port the operator app is published on
AUTH_MODEcompat-cookieHow 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_URLemptyThe address the box is reached at from elsewhere. The server answers requests for a loopback host or this one
TRUSTED_PROXY_SECRETThe secret the proxy sends in X-Guilds-Proxy-Secret. Required by trusted-header
TRUSTED_HEADER_EMAILX-Forwarded-EmailThe header the proxy sends the email in
OPERATOR_EMAILYour own email. Boot gives it to the box's first user. Required by trusted-header
ADAPTER_PROXY_URLemptyA 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).

VariableDefaultRole
HARNESS_MCP_PORT8090The port the listener listens on, and the Compose file publishes it on
HARNESS_MCP_HOST127.0.0.1The 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_PUBLISH127.0.0.1The 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_HOSThost.docker.internalThe 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_URLhttp://<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 ​

VariableDefaultRole
MAX_CONCURRENT_GENERATIONS0Generations running at once across the whole box. 0 is no ceiling. Each organisation's own cap applies under it
HARNESSES_OFFemptyCoding 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_MIB10240The 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_BYTES8192The 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 ​

VariableDefaultRole
MODELS_DEV_URLhttps://models.dev/api.jsonWhere 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 ​

VariableDefaultRole
SENTRY_DSNSwitches Sentry on
SENTRY_ENVIRONMENTdevelopmentThe environment tag on each event
SENTRY_TRACES_SAMPLE_RATE1.0The share of requests traced, 0 to 1
SENTRY_PROFILE_SESSION_SAMPLE_RATE1.0The chance, 0 to 1, that a process profiles its CPU while a sampled trace is open; drawn once at start
SENTRY_DEBUG1 prints the Sentry SDK's own debug output

Development ​

The shipped stack does not use these.

VariableDefaultRole
ALLOW_ZERO_MASTER_KEY1 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_ROOTthe orchestrator's src/promptsThe directory of agent templates, with the shared system.md. It must exist
MODEL_CONTRACT_MODELA {provider}/{model} id for the live model contract
MODEL_CONTRACT_API_KEYThe key the contract runs with
MODEL_CONTRACT_BASE_URLA 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).

Free software under the GNU Affero General Public License, version 3 only.