Configuration
title: Configuration description: Complete configuration guide for OpenClaw (openclaw.json). sidebar: label: Configuration order: 1
Section titled “title: Configuration description: Complete configuration guide for OpenClaw (openclaw.json). sidebar: label: Configuration order: 1”Configuration 🔧
Section titled “Configuration 🔧”OpenClaw is configured via a JSON5 file at ~/.openclaw/openclaw.json.
Minimal config (recommended starting point)
Section titled “Minimal config (recommended starting point)”{ // "agents" defines defaults for all agents agents: { defaults: { // Where the agent keeps its memory and skills workspace: "~/.openclaw/workspace" } }, // "channels" defines how the world talks to the gateway channels: { // Example: enable Telegram telegram: { enabled: true, botToken: "123:abc...", dmPolicy: "pairing" } }}Examples
Section titled “Examples”A simple setup enabling Telegram and a custom workspace.
{ // Global settings agents: { defaults: { workspace: "~/.openclaw/workspace" } }, // Channel config channels: { telegram: { enabled: true, botToken: "YOUR_TOKEN", dmPolicy: "pairing" } }}A more complete configuration with multiple channels and web tools.
{ gateway: { port: 18789 }, agents: { defaults: { workspace: "~/.openclaw/workspace", model: { primary: "anthropic/claude-3-5-sonnet" } } }, channels: { whatsapp: { enabled: true, dmPolicy: "allowlist", allowFrom: ["+15551234567"] }, telegram: { enabled: true, botToken: "YOUR_TOKEN", groups: { "*": { requireMention: true } } } }, tools: { web: { search: { enabled: true, provider: "brave" } } }}Management Commands
Section titled “Management Commands”You don’t always need to edit the file manually.
- Check Config:
openclaw doctor - Apply Changes:
openclaw config apply(restarts gateway) - Get Value:
openclaw config get channels.telegram.enabled - Set Value:
openclaw config set channels.telegram.enabled true
Strict Validation
Section titled “Strict Validation”The Gateway enforces a strict schema. If your config is invalid:
- The Gateway will refuse to start.
- Run
openclaw doctorto see errors. - Fix errors manually or use
openclaw doctor --fix.