Skip to content

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”

OpenClaw is configured via a JSON5 file at ~/.openclaw/openclaw.json.

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"
}
}
}

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"
}
}
}

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

The Gateway enforces a strict schema. If your config is invalid:

  1. The Gateway will refuse to start.
  2. Run openclaw doctor to see errors.
  3. Fix errors manually or use openclaw doctor --fix.