On this page
On this page
Gateway
Configuration examples
Examples below are aligned with the current config schema. For the exhaustive reference and per-field notes, see Configuration.
Doctor migrates legacy agents.list arrays and default markers into keyed
agents.entries with explicit surface owners. The updater runs this migration
through its backup flow. After replacing the binary directly, run
openclaw doctor --fix before starting the Gateway.
Quick start
Absolute minimum
Save to ~/.openclaw/openclaw.json and you can DM the bot from that number.
Recommended starter
Expanded example (major options)
JSON5 lets you use comments and trailing commas. Regular JSON works too.
This example leaves agents.defaults.timeoutSeconds unset, so each model attempt uses the 48-hour default. Set a different per-attempt budget only when your workflow needs one. Configured fallbacks each receive a fresh budget; see Agent runtime.
Symlinked sibling skill repo
Use this when a built-in skill root contains a symlink into a sibling repo, for
example ~/.agents/skills/manager -> ~/path/to/skills.
extraDirsscans the sibling repo as an explicit skill root.allowSymlinkTargetslets symlinked skill folders resolve into that trusted real target root without allowing arbitrary symlink escapes.- Skill Workshop does not use these configured symlink targets. It writes only
inside the active agent's
<state-dir>/agents/<agentId>/agent/workshop-skills.
Common patterns
Shared skill baseline with one override
agents.defaults.skillsis the shared baseline.agents.entries.*.skillsreplaces that baseline for one agent.- Use
skills: []when an agent should see no skills.
Multi-platform setup
Trusted node network auto-approval
Keep device pairing manual unless you control the network path. For a dedicated lab or tailnet subnet, you can opt in to first-time node device auto-approval with exact CIDRs or IPs:
This remains off when unset. It only applies to fresh role: node pairing with
no requested scopes. Operator/browser clients and role, scope, metadata, or
public-key upgrades still require manual approval.
Secure DM mode (shared inbox / multi-user DMs)
If more than one person can DM your bot (multiple entries in allowFrom, pairing approvals for multiple people, or dmPolicy: "open"), enable secure DM mode so DMs from different senders don't share one context by default:
For Discord/Google Chat/IRC/Mattermost/Microsoft Teams/Slack, sender authorization is ID-first by default.
Only enable direct mutable name/email/nick matching with each channel's dangerouslyAllowNameMatching: true if you explicitly accept that risk.
Anthropic API key + MiniMax fallback
Work bot (restricted access)
Local models only
Tips
- If you set
dmPolicy: "open", the matchingallowFromlist must include"*". - Provider IDs differ (phone numbers, user IDs, channel IDs). Use the provider docs to confirm the format.
- Optional sections to add later:
web,browser,ui,discovery,plugins,talk,signal,imessage. - See Providers and Troubleshooting for deeper setup notes.