Configuration Reference
Config file location, schema overview, and key sections
Config file location, schema overview, and key sections
OpenClaw reads a single JSON config file. This page summarizes file location, main sections, and common keys. For setup guidance, see the Configuration Guide. For secrets and env vars, see Secrets and Environment Variables.
~/.openclaw/openclaw.json~/.openclaw/workspace (or agents.defaults.workspace)~/.clawdbot/moltbot.json, ~/clawdOverride with OPENCLAW_CONFIG or CLAWDBOT_CONFIG env vars. Restart the Gateway after editing.
agent — Model (agent.model), provider, baseUrl, failover, thinking depthagents.defaults — Workspace path, sandbox mode, session behaviourchannels — Discord, Slack, Telegram, WhatsApp, etc.; DM policy, allowFromgateway — Port, bind, auth (token/password), Tailscaleskills — enabled list, per-skill settings (API keys)browser — Browser automation enable/disable, color{
"agent": {
"model": "anthropic/claude-opus-4-6",
"fallback": ["anthropic/claude-sonnet"]
},
"agents": {
"defaults": {
"workspace": "~/.openclaw/workspace",
"sandbox": { "mode": "non-main" }
}
},
"gateway": {
"port": 18789,
"bind": "127.0.0.1",
"auth": { "mode": "token" }
},
"skills": {
"enabled": ["caldav", "slack"],
"caldav": { "calendarUrl": "..." }
},
"channels": {
"discord": { "dm": { "allowFrom": [] } }
}
}
The complete schema is maintained in the OpenClaw source and documented at docs.openclaw.ai. Use openclaw doctor to validate your config and surface issues.