Skip to main content

Configuration Examples

Examples below are aligned with the current config schema. For the exhaustive reference and per-field notes, see Configuration.

Quick start

Absolute minimum

Save to ~/.openclaw/openclaw.json and you can DM the bot from that number.

Expanded example (major options)

JSON5 lets you use comments and trailing commas. Regular JSON works too.

Common patterns

Multi-platform setup

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/Slack/Google Chat/MS Teams/Mattermost/IRC, 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.

OAuth with API key failover

Anthropic setup-token + API key, MiniMax fallback

Anthropic setup-token usage outside Claude Code has been restricted for some users in the past. Treat this as user-choice risk and verify current Anthropic terms before depending on subscription auth.

Work bot (restricted access)

Local models only

Tips

  • If you set dmPolicy: "open", the matching allowFrom list 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, canvasHost, talk, signal, imessage.
  • See Providers and Troubleshooting for deeper setup notes.