Technical reference for the OpenClaw framework. Real-time synchronization with the official documentation engine.
Use this file to discover all available pages before exploring further.
Configuration
OpenClaw reads an optional JSON5 config from
text
~/.openclaw/openclaw.json
.
The active config path must be a regular file. Symlinked
text
openclaw.json
layouts are unsupported for OpenClaw-owned writes; an atomic write may replace
the path instead of preserving the symlink. If you keep config outside the
default state directory, point
text
OPENCLAW_CONFIG_PATH
directly at the real file.
If the file is missing, OpenClaw uses safe defaults. Common reasons to add a config:
Connect channels and control who can message the bot
Set models, tools, sandboxing, or automation (cron, hooks)
for exact field-level
docs before editing config. Use this page for task-oriented guidance and
Configuration reference for the broader
field map and defaults.
tip
**New to configuration?** Start with `openclaw onboard` for interactive setup, or check out the [Configuration Examples](/gateway/configuration-examples) guide for complete copy-paste configs.
```bash}
openclaw onboard # full onboarding flow
openclaw configure # config wizard
```
```bash}
openclaw config get agents.defaults.workspace
openclaw config set agents.defaults.heartbeat.every "2h"
openclaw config unset plugins.entries.brave.config.webSearch.apiKey
```
Open [http://127.0.0.1:18789](http://127.0.0.1:18789) and use the **Config** tab.
The Control UI renders a form from the live config schema, including field
`title` / `description` docs metadata plus plugin and channel schemas when
available, with a **Raw JSON** editor as an escape hatch. For drill-down
UIs and other tooling, the gateway also exposes `config.schema.lookup` to
fetch one path-scoped schema node plus immediate child summaries.
Edit `~/.openclaw/openclaw.json` directly. The Gateway watches the file and applies changes automatically (see [hot reload](#config-hot-reload)).
Strict validation
warning
OpenClaw only accepts configurations that fully match the schema. Unknown keys, malformed types, or invalid values cause the Gateway to **refuse to start**. The only root-level exception is `$schema` (string), so editors can attach JSON Schema metadata.
text
openclaw config schema
prints the canonical JSON Schema used by Control UI
and validation.
text
config.schema.lookup
fetches a single path-scoped node plus
child summaries for drill-down tooling. Field
text
title
/
text
description
docs metadata
carries through nested objects, wildcard (
text
*
), array-item (
text
[]
), and
text
anyOf
/
text
oneOf
/
text
allOf
branches. Runtime plugin and channel schemas merge in when the
manifest registry is loaded.
When validation fails:
The Gateway does not boot
Only diagnostic commands work (
text
openclaw doctor
,
text
openclaw logs
,
text
openclaw health
,
text
openclaw status
)
Run
text
openclaw doctor
to see exact issues
Run
text
openclaw doctor --fix
(or
text
--yes
) to apply repairs
The Gateway keeps a trusted last-known-good copy after each successful startup.
If
text
openclaw.json
later fails validation (or drops
text
gateway.mode
, shrinks
sharply, or has a stray log line prepended), OpenClaw preserves the broken file
as
text
.clobbered.*
, restores the last-known-good copy, and logs the recovery
reason. The next agent turn also receives a system-event warning so the main
agent does not blindly rewrite the restored config. Promotion to last-known-good
is skipped when a candidate contains redacted secret placeholders such as
text
***
.
When every validation issue is scoped to
text
plugins.entries.<id>...
, OpenClaw
does not perform whole-file recovery. It keeps the current config active and
surfaces the plugin-local failure so a plugin schema or host-version mismatch
cannot roll back unrelated user settings.
Common tasks
Config hot reload
The Gateway watches
text
~/.openclaw/openclaw.json
and applies changes automatically — no manual restart needed for most settings.
Direct file edits are treated as untrusted until they validate. The watcher waits
for editor temp-write/rename churn to settle, reads the final file, and rejects
invalid external edits by restoring the last-known-good config. OpenClaw-owned
config writes use the same schema gate before writing; destructive clobbers such
as dropping
text
gateway.mode
or shrinking the file by more than half are rejected
and saved as
text
.rejected.*
for inspection.
Plugin-local validation failures are the exception: if all issues are under
text
plugins.entries.<id>...
, reload keeps the current config and reports the plugin
issue instead of restoring
mode, restart-required changes are handled automatically.
Category
Fields
Restart needed?
Channels
text
channels.*
,
text
web
(WhatsApp) — all built-in and plugin channels
No
Agent & models
text
agent
,
text
agents
,
text
models
,
text
routing
No
Automation
text
hooks
,
text
cron
,
text
agent.heartbeat
No
Sessions & messages
text
session
,
text
messages
No
Tools & media
text
tools
,
text
browser
,
text
skills
,
text
mcp
,
text
audio
,
text
talk
No
UI & misc
text
ui
,
text
logging
,
text
identity
,
text
bindings
No
Gateway server
text
gateway.*
(port, bind, auth, tailscale, TLS, HTTP)
Yes
Infrastructure
text
discovery
,
text
canvasHost
,
text
plugins
Yes
note
`gateway.reload` and `gateway.remote` are exceptions — changing them does **not** trigger a restart.
Reload planning
When you edit a source file that is referenced through
text
$include
, OpenClaw plans
the reload from the source-authored layout, not the flattened in-memory view.
That keeps hot-reload decisions (hot-apply vs restart) predictable even when a
single top-level section lives in its own included file such as
text
plugins: { $include: "./plugins.json5" }
. Reload planning fails closed if the
source layout is ambiguous.
Config RPC (programmatic updates)
For tooling that writes config over the gateway API, prefer this flow:
text
config.schema.lookup
to inspect one subtree (shallow schema node + child
summaries)
text
config.get
to fetch the current snapshot plus
text
hash
text
config.patch
for partial updates (JSON merge patch: objects merge,
text
null
deletes, arrays replace)
text
config.apply
only when you intend to replace the entire config
text
update.run
for explicit self-update plus restart
text
update.status
to inspect the latest update restart sentinel and verify the running version after a restart
Agents should treat
text
config.schema.lookup
as the first stop for exact
field-level docs and constraints. Use Configuration reference
when they need the broader config map, defaults, or links to dedicated
subsystem references.
note
Control-plane writes (`config.apply`, `config.patch`, `update.run`) are
rate-limited to 3 requests per 60 seconds per `deviceId+clientIp`. Restart
requests coalesce and then enforce a 30-second cooldown between restart cycles.
`update.status` is read-only but admin-scoped because the restart sentinel can
include update step summaries and command output tails.