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
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
Split config with $include
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:
Control UI (gateway.controlUi)
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
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
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
openclaw channels login --channel whatsapp [--account work]
Telegram
Discord
Slack
Signal
iMessage and BlueBubbles
session - Session scope and reset
cron - Scheduled jobs
hooks - Incoming webhooks and lifecycle hooks
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
skills - Skill loading
memory - Memory backend
secrets - SecretRef resolution
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
api_key, oauth, or token. Managed via openclaw models auth ....
Additional auth keys:
talk and audio - Voice
browser - Browser control
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
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
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
ui, cli, meta, wizard
bindings - Multi-agent routing
Config RPC (programmatic updates)
Rate-limited to 3 requests per 60 seconds perdeviceId+clientIp. Pass baseHash from config.get to prevent conflicting writes.
Full replace:
null deletes a key, objects merge recursively, arrays replace):