Skip to main content

Gateway configuration reference

WednesdayAI reads its configuration from ~/.openclaw/openclaw.json at startup. The file uses JSON5 syntax: standard JSON plus // comments and trailing commas. The config object is strict - unknown top-level keys cause the gateway to refuse to start. The only root-level exception is $schema (a string). If the file does not exist, the gateway starts with safe defaults. Run openclaw doctor to identify and remove unknown keys.

Editing configuration

Validation and repair

When validation fails, only openclaw doctor, openclaw logs, openclaw health, and openclaw status work until the config is fixed.

Hot reload

The gateway watches the config file and applies most changes without a restart: Hot-reload without restart: channels.*, agents.*, models, bindings, hooks, cron, session, messages, tools, browser, skills, audio, logging, ui. Requires restart: gateway.* (port, bind address, auth, TLS, tailscale), discovery, canvasHost, plugins.

Environment variables

The gateway reads env vars from the parent process, .env in the working directory, and ~/.openclaw/.env (neither file overrides existing env vars). Env var substitution in config values via ${VAR_NAME}:
  • Only uppercase names matched: [A-Z_][A-Z0-9_]*
  • Missing or empty vars throw an error at load time
  • Escape with $${VAR} for literal ${VAR} output
Inline env vars and shell import:

Split config with $include

Single file replaces the containing object; an array deep-merges in order (later wins). Sibling keys merge after includes. Nested includes are supported up to 10 levels deep; relative paths resolve against the including file.

Root keys at a glance

The strict root object accepts these keys (everything else is rejected). Each has its own section or is summarised below.

network - Global outbound SSRF policy

network.ssrfPolicy applies to all outbound HTTP requests made by the gateway — agent tool calls, webhook deliveries, plugin fetches, and so on. browser.ssrfPolicy is a parallel control scoped only to browser-driven fetches; both share the same shape.
network.ssrfPolicy supports two field aliases: allowPrivateNetwork (alias for dangerouslyAllowPrivateNetwork) and allowedHostnames (alias for hostnameAllowlist). Prefer the canonical names in new configs.
For browser-specific SSRF controls see browser.ssrfPolicy. The two policies are evaluated independently — a request that passes network.ssrfPolicy but originates from the browser is also checked against browser.ssrfPolicy.

nodeHost — Browser-proxy settings

nodeHost — object — Browser-proxy configuration for this node. Shape: { browserProxy?: { enabled?: boolean, allowProfiles?: string[] } }

gateway - Server settings

Additional restart-policy keys:
Non-loopback bind requires auth. The gateway refuses to start with bind: "lan", "tailnet", or "custom" if no token or password is set. See Gateway authentication.

Control UI (gateway.controlUi)

dangerouslyDisableDeviceAuth: true removes the device-pairing check from the control UI. Only use this in a fully trusted, isolated environment — enabling it on a network-exposed gateway allows unauthenticated access to the admin interface.

HTTP endpoints

Both OpenAI-compatible endpoints are disabled by default and grant full operator access when enabled. See the API reference for request/response details.

agents - Agent and model configuration

Model refs use provider/model format. agents.defaults.model.primary is set by openclaw models set; the image model by openclaw models set-image.

Model shorthand aliases

The following shorthands can be used anywhere a model ref is expected and resolve to their current default: Aliases resolve at runtime; the underlying model ID may change with gateway updates. Use the full provider/model ref if you need to pin to a specific version.

agents.defaults.subagents — Subagent limits

Values outside the validated ranges (1–5 for maxSpawnDepth, 1–20 for maxChildrenPerAgent) cause the gateway to reject the config on startup.

models - Provider/model catalogue

models.bedrockDiscovery — Automatic Bedrock model discovery

models.providers.* — Provider and model config

Each provider entry under models.providers follows this shape:

tools - Agent tool policy

Set either allow or alsoAllow in a scope, not both. alsoAllow extends the profile; allow replaces it.

approvals - Exec-approval forwarding


commands - Slash-command gating

Additional commands keys:

messages - Message behaviour


channels - Messaging platform connections

Built-in channels: whatsapp, telegram, discord, slack, signal, imessage, bluebubbles, googlechat, msteams, irc. Additional channels (Matrix, Zalo, Mattermost, Nostr, and others) are provided by extensions and configured under the same channels object.

Common DM policy values

WhatsApp

Login: openclaw channels login --channel whatsapp [--account work]

Telegram

Discord

Slack

Signal

iMessage and BlueBubbles


session - Session scope and reset

Additional session keys:

cron - Scheduled jobs

Additional cron keys:

hooks - Incoming webhooks and lifecycle hooks

Treat all webhook payload content as untrusted. Keep unsafe-content bypass flags disabled unless debugging.
See the Hooks catalogue for bundled internal hooks. Additional hooks keys:

hooks.gmail — Gmail push notification integration

Receives Gmail push notifications via Google Cloud Pub/Sub and routes them as hook events.

plugins - Extensions

Most plugin changes require a gateway restart. Additional plugins keys:

skills - Skill loading

Additional skills keys:

memory - Memory backend


secrets - SecretRef resolution

Sensitive values throughout the config (gateway.auth.token, channels.*.botToken, talk.apiKey, and so on) accept a SecretRef instead of a plaintext string. Run openclaw secrets reload after changing providers.

auth - Provider auth profiles

Auth profile mode is one of api_key, oauth, or token. Managed via openclaw models auth .... Additional auth keys:

talk and audio - Voice


browser - Browser control

Additional browser SSRF policy keys:
browser.ssrfPolicy supports two field aliases: allowPrivateNetwork (alias for dangerouslyAllowPrivateNetwork) and allowedHostnames (alias for hostnameAllowlist). Prefer the canonical names in new configs.

Additional browser keys


acp - Agent Client Protocol bridge

Additional ACP streaming keys:

update - Update policy


discovery and canvasHost


web - WhatsApp Web client

Controls the WhatsApp Web client’s connection behaviour and reconnection strategy. This is the WhatsApp channel transport - not to be confused with tools.web, which configures the agent’s web search/fetch tools.

broadcast - Broadcast fan-out

Each agent id listed must exist in agents.list.

logging - Log levels and output

OPENCLAW_LOG_LEVEL=debug overrides both level and consoleLevel.

diagnostics - OpenTelemetry export and session capture

diagnostics.otel keys

diagnostics.otel.langfuse sub-keys:

Top-level diagnostics keys

modelPayloadLog.enabled: true writes usage summaries to disk. To capture unredacted payloads, also set rawPayloads: true or captureContent: true. Never enable raw payload capture in production — logs will contain user messages and model responses in plaintext.

ui, cli, meta, wizard


bindings - Multi-agent routing


Config RPC (programmatic updates)

Rate-limited to 3 requests per 60 seconds per deviceId+clientIp. Pass baseHash from config.get to prevent conflicting writes. Full replace:
Partial update (JSON merge patch - null deletes a key, objects merge recursively, arrays replace):