OpenClaw Maintenance Skill
OpenClaw is a self-hosted, open-source (MIT) gateway that routes AI agents across WhatsApp, Telegram, Discord, Slack, iMessage, Signal, and 15+ other channels simultaneously. It runs on macOS, Linux, or Windows.
Reference Files
| Reference |
Coverage |
| channels.md |
Per-channel setup (WhatsApp, Telegram, Discord, etc.) |
| channel_troubleshooting.md |
Per-channel failure signatures and walkthroughs |
| tools.md |
Tools inventory (profiles, groups, all built-in tools) |
| exec.md |
Exec tool: parameters, config, PATH, security, process tool |
| exec_approvals.md |
Exec approvals: allowlists, safe bins, approval flow |
| browser.md |
Browser plugin: profiles, CDP, Chrome MCP, snapshots, SSRF, Control API |
| web_tools.md |
Web tools: Brave, Perplexity, Gemini search providers |
| pdf_tool.md |
PDF tool: native/fallback modes, config, page filtering |
| elevated.md |
Elevated mode: /elevated directives, sandbox breakout |
| lobster.md |
Lobster: typed workflow runtime with approvals |
| llm_task.md |
LLM Task: JSON-only LLM step for structured output |
| openprose.md |
OpenProse: multi-agent program runtime |
| plugins.md |
Plugins: capability model, official list, config, hooks, SDK, authoring |
| skills.md |
Skills: locations, config, ClawHub, watcher, token impact |
| providers.md |
Model provider setup |
| multi_agent.md |
Multi-agent routing |
| nodes.md |
Nodes (iOS/Android/macOS/headless) |
| security.md |
Security hardening |
| secrets.md |
Secrets management (SecretRef, vault) |
| sandboxing.md |
Sandboxing (Docker isolation) |
| config_reference.md |
Full config field reference |
| gateway_ops.md |
Gateway operations |
| remote_access.md |
Remote access, SSH, Tailscale, web dashboard |
| sessions.md |
Session management, DM isolation, lifecycle, compaction |
| hooks.md |
Hooks: internal event hooks, HTTP webhooks, authoring, CLI |
| automation.md |
Cron jobs, webhooks, Gmail Pub/Sub, background tasks, standing orders |
| acp_agents.md |
ACP agents: spawn external AI runtimes (Codex, Claude, Gemini, 14+ harnesses) |
| install.md |
Installation, updating, rollback, migration, uninstall |
| web_ui.md |
Web surfaces: Dashboard, Control UI, WebChat |
| slash_commands.md |
Chat slash commands (/new, /model, /acp, etc.) |
| platforms.md |
Platform-specific guides (macOS, iOS, Android, Linux, Windows) |
| diffs_firecrawl.md |
Diffs plugin + Firecrawl anti-bot fallback |
| subagents.md |
Sub-agents: nested spawning, thread binding, announce, tool policy |
| memory.md |
Memory system, vector search, hybrid BM25, compaction, QMD backend |
| architecture.md |
Gateway architecture, wire protocol, pairing, invariants |
| agent_runtime.md |
Agent runtime, bootstrap files, agent loop, context engine, hooks, timeouts |
| streaming.md |
Streaming + chunking: block streaming, coalescing, preview modes |
| queue.md |
Command queue: modes (steer/followup/collect), concurrency, per-session |
| model_failover.md |
Model failover, OAuth, auth profiles, cooldowns, billing disables |
| clawhub.md |
ClawHub: public skill registry, CLI commands, publish/install |
| thinking.md |
Thinking levels, verbose directives, reasoning visibility |
| polls.md |
Polls: Telegram, WhatsApp, Discord, MS Teams |
| voice.md |
Talk Mode (voice interaction) + Voice Wake (wake words) |
| presence_discovery.md |
Presence system, discovery (Bonjour/Tailscale), transports |
| gateway_internals.md |
Network model, gateway lock, health checks, doctor, logging, background exec |
| heartbeat.md |
Heartbeat: config, delivery, visibility, HEARTBEAT.md, per-agent |
| bonjour.md |
Bonjour/mDNS: TXT keys, wide-area DNS-SD, debugging, failure modes |
| pairing.md |
Gateway pairing: node approval, CLI, API, auto-approval, storage |
| tui.md |
TUI: keyboard shortcuts, slash commands, pickers, local shell, delivery |
| media.md |
Media: camera capture, images, audio/voice notes, transcription |
| channel_routing.md |
Channel routing, session keys, agent selection, Mattermost, BlueBubbles |
Quick Reference
Key Paths
| Path |
Purpose |
~/.openclaw/openclaw.json |
Main config (JSON5) |
~/.openclaw/.env |
Global env fallback |
~/.openclaw/workspace |
Default agent workspace |
~/.openclaw/agents/<id>/ |
Per-agent state + sessions |
~/.openclaw/skills/ |
Managed/local skills |
~/.openclaw/agents/<id>/qmd/ |
QMD memory backend state |
~/.openclaw/agents/<id>/agent/auth-profiles.json |
Auth profiles + OAuth tokens |
OPENCLAW_CONFIG_PATH |
Override config location |
OPENCLAW_STATE_DIR |
Override state directory |
OPENCLAW_HOME |
Override home directory |
Essential Commands
openclaw status # Overall status
openclaw gateway status # Gateway daemon status
openclaw gateway status --deep # Deep scan including system services
openclaw doctor # Diagnose config/service issues
openclaw doctor --fix # Auto-fix safe issues
openclaw logs --follow # Tail gateway logs
openclaw channels status --probe # Channel health check
openclaw security audit # Security posture check
openclaw security audit --fix # Auto-fix security issues
openclaw update # Self-update
openclaw dashboard # Open Control UI in browser
openclaw tui # Terminal UI (interactive REPL)
openclaw agent # Direct agent interaction via CLI
openclaw health # Health check
openclaw usage # Usage tracking
openclaw config validate # Validate config file
openclaw config file # Print active config path
openclaw sessions cleanup # Session disk cleanup
openclaw agents bindings # Agent-channel bindings
openclaw agents bind # Bind agent to account
openclaw agents unbind # Unbind agent
openclaw update --dry-run # Preview update
openclaw system presence # View connected clients/nodes
openclaw system heartbeat last # Last heartbeat info
openclaw system heartbeat now # Trigger heartbeat immediately
openclaw memory search <query> # CLI memory search
openclaw docs <query> # Search OpenClaw docs
openclaw tasks list # List background/detached task runs
openclaw tasks show <id> # Show specific task details
openclaw tasks cancel <id> # Cancel a running task
openclaw tasks audit # Identify problematic task runs
openclaw agent --message "..." # Run single agent turn (scripted/testing)
openclaw nodes pending # List pending pairing requests
openclaw nodes approve <id> # Approve node pairing
openclaw nodes status # Show all paired nodes
openclaw health --json # Full health snapshot (JSON)
openclaw message send --media <p> # Send media message
Default Gateway
- Bind:
127.0.0.1:18789 (loopback)
- Dashboard:
http://127.0.0.1:18789/
- Protocol: WebSocket (JSON text frames)
Core Workflow
Diagnosing Issues
Always follow this command ladder:
openclaw status — quick overview
openclaw gateway status — daemon running? RPC probe ok?
openclaw logs --follow — watch for errors
openclaw doctor — config/service diagnostics
openclaw channels status --probe — per-channel health
Starting / Restarting Gateway
# Foreground with verbose logging
openclaw gateway --port 18789 --verbose
# Force-kill existing listener then start
openclaw gateway --force
# Service management (launchd on macOS, systemd on Linux)
openclaw gateway install
openclaw gateway start
openclaw gateway stop
openclaw gateway restart
Configuration
Edit config via any method:
# Interactive wizard
openclaw onboard # Full setup
openclaw configure # Config wizard
# CLI one-liners
openclaw config get <path> # Read value
openclaw config set <path> <value> # Set value (JSON5 or raw string)
openclaw config unset <path> # Remove value
# Direct edit
# Edit ~/.openclaw/openclaw.json (JSON5 format)
# Gateway hot-reloads on save (if gateway.reload.mode != "off")
Minimal config example:
{
agents: { defaults: { workspace: "~/.openclaw/workspace" } },
channels: { whatsapp: { allowFrom: ["+15555550123"] } },
}
Channel Setup
For detailed per-channel setup, see references/channels.md.
For per-channel troubleshooting (failure signatures, setup walkthroughs), see references/channel_troubleshooting.md.
For plugins adding new channels (Matrix, Nostr, MS Teams, etc.), see references/plugins.md.
Quick channel add:
# Interactive wizard
openclaw channels add
# Non-interactive
openclaw channels add --channel telegram --account default --name "My Bot" --token $BOT_TOKEN
openclaw channels login --channel whatsapp # QR pairing for WhatsApp
openclaw channels status --probe # Verify
Model Provider Setup
For detailed provider setup, see references/providers.md.
# Set default model
openclaw models set anthropic/claude-sonnet-4-5
# List available models
openclaw models list --all
# Check auth/token status
openclaw models status --probe
# Add auth interactively
openclaw models auth add
Config example:
{
agents: {
defaults: {
model: {
primary: "anthropic/claude-sonnet-4-5",
fallbacks: ["openai/gpt-5.2"],
},
},
},
}
Multi-Agent Routing
For detailed multi-agent config, see references/multi_agent.md.
openclaw agents add <id> # Create agent
openclaw agents list --bindings # Show agent-channel bindings
openclaw agents delete <id> # Remove agent
Nodes (iOS / Android / macOS / Headless)
For detailed node setup, see references/nodes.md.
openclaw nodes status # List connected nodes
openclaw nodes describe --node <id> # Node capabilities
openclaw devices list # Pending device approvals
openclaw devices approve <requestId> # Approve a device
openclaw node run --host <host> --port 18789 # Start headless node host
Security
For detailed security hardening, see references/security.md.
For secrets management (SecretRef, vault integration), see references/secrets.md.
For sandboxing (Docker isolation for tools), see references/sandboxing.md.
For full config field reference, see references/config_reference.md.
For remote access (SSH, Tailscale, VPN), see references/remote_access.md.
openclaw security audit # Check posture
openclaw security audit --deep # Live gateway probe
openclaw security audit --fix # Auto-fix safe issues
openclaw secrets reload # Re-resolve secret refs
openclaw secrets audit # Scan for plaintext leaks
Update / Uninstall
For detailed installation, updating, rollback, and migration guide, see references/install.md.
# Install (recommended)
curl -fsSL https://openclaw.ai/install.sh | bash
# Update
openclaw update # Self-update command
# Or: npm install -g openclaw@latest
openclaw doctor # Run after update to apply migrations
# Uninstall
openclaw uninstall
Tools Reference
For detailed per-tool documentation, see references/tools.md.
For specific tools, see:
- references/exec.md — Exec tool deep-dive
- references/exec_approvals.md — Exec approvals and allowlists
- references/browser.md — Browser automation deep-dive
- references/web_tools.md — Web search/fetch with multiple providers
- references/lobster.md — Lobster workflow runtime
- references/llm_task.md — LLM Task for structured JSON output
- references/openprose.md — OpenProse multi-agent programs
- references/plugins.md — Plugin system (install, author, distribute)
- references/skills.md — Skills system (load, config, ClawHub)
For ACP agents (Codex, Claude Code, Gemini CLI, etc.), see references/acp_agents.md.
For Diffs plugin and Firecrawl anti-bot fallback, see references/diffs_firecrawl.md.
For chat slash commands (/new, /model, /acp, etc.), see references/slash_commands.md.
For thinking levels (/think, /verbose, /reasoning), see references/thinking.md.
For polls (Telegram, WhatsApp, Discord, MS Teams), see references/polls.md.
For Talk Mode and Voice Wake, see references/voice.md.
For Gateway architecture and wire protocol, see references/architecture.md.
For agent runtime and loop details, see references/agent_runtime.md.
For command queue system, see references/queue.md.
For model failover and OAuth, see references/model_failover.md.
For ClawHub skill registry, see references/clawhub.md.
For presence and discovery, see references/presence_discovery.md.
For streaming and chunking, see references/streaming.md.
For Gateway internals (network model, lock, health, doctor, logging), see references/gateway_internals.md.
For heartbeat system, see references/heartbeat.md.
For Bonjour/mDNS discovery details, see references/bonjour.md.
For Gateway node pairing, see references/pairing.md.
For Terminal UI (TUI), see references/tui.md.
For media (camera, images, audio), see references/media.md.
For channel routing and session keys, see references/channel_routing.md.
Tool profiles: minimal, coding, messaging, full (default).
Tool groups (for allow/deny):
group:runtime — exec, bash, process
group:fs — read, write, edit, apply_patch
group:sessions — sessions_list/history/send/spawn, session_status
group:memory — memory_search, memory_get
group:web — web_search, web_fetch
group:ui — browser, canvas
group:automation — cron, gateway
group:messaging — message
group:nodes — nodes
group:openclaw — all built-in OpenClaw tools (excludes provider plugins)
Common Failure Signatures
| Error |
Cause |
Fix |
refusing to bind gateway ... without auth |
Non-loopback bind without token |
Set gateway.auth.token or gateway.auth.password |
another gateway instance is already listening / EADDRINUSE |
Port conflict |
openclaw gateway --force or change port |
Gateway start blocked: set gateway.mode=local |
Local mode not enabled |
Set gateway.mode="local" |
unauthorized / reconnect loop |
Token/password mismatch |
Check OPENCLAW_GATEWAY_TOKEN or config auth |
device identity required |
Missing device auth |
Ensure client completes connect.challenge flow |
| No replies from bot |
Pairing/allowlist/mention gating |
Check openclaw pairing list, DM policy, mention patterns |
Embedding provider authentication failed (401) |
.env has placeholder API key (e.g. your-jina-api-key-here) |
Replace with real API key in ~/.openclaw/.env, restart Gateway |
openclaw flows list / ClawFlow references |
ClawFlow is deprecated |
Use openclaw tasks list/show/cancel/audit instead |
config change requires gateway restart (plugins.*) |
Plugin config changes can't hot-reload |
Full openclaw gateway restart or launchctl kickstart -k |
Bootstrap failed: 5: Input/output error |
LaunchAgent plist in stale/stuck state |
openclaw gateway install then launchctl kickstart -k gui/$(id -u)/ai.openclaw.gateway |
Missing env var "X" referenced at config path: ... |
.env missing or variable not defined |
Add variable to ~/.openclaw/.env and restart Gateway |
Environment Variables
| Variable |
Purpose |
OPENCLAW_GATEWAY_TOKEN |
Gateway auth token |
OPENCLAW_GATEWAY_PASSWORD |
Gateway auth password |
OPENCLAW_GATEWAY_PORT |
Override gateway port |
OPENCLAW_CONFIG_PATH |
Override config file path |
OPENCLAW_STATE_DIR |
Override state directory |
OPENCLAW_HOME |
Override home directory |
OPENCLAW_LOAD_SHELL_ENV |
Import shell env (set to 1) |
OPENCLAW_VERBOSE |
Verbose logging |
OPENCLAW_LOG_FILE |
File logging path |
OPENCLAW_LOG_LEVEL |
Log level control |
OPENCLAW_SHELL |
Set by OpenClaw in exec/acp/tui runtimes |
BRAVE_API_KEY |
For web_search tool |
FIRECRAWL_API_KEY |
For Firecrawl anti-bot fallback |
ELEVENLABS_API_KEY |
For Talk Mode TTS |
ELEVENLABS_VOICE_ID |
Default voice for Talk Mode |
CLAWHUB_TOKEN |
ClawHub API token for CI/automation |
CLAWHUB_WORKDIR |
ClawHub working directory override |
OLLAMA_API_KEY |
For Ollama embeddings provider |
OPENCLAW_SKIP_CRON |
Disable cron scheduler (set to 1) |
OPENCLAW_HIDE_BANNER |
Suppress banner output |
OPENCLAW_SUPPRESS_NOTES |
Suppress informational notes |
1---
2name: openclaw
3description: Comprehensive guide for installing, configuring, operating, and troubleshooting OpenClaw — a self-hosted, multi-channel AI agent gateway. Use when the user asks about OpenClaw setup, configuration, channel management (WhatsApp/Telegram/Discord/Slack/iMessage/etc.), model provider setup, Gateway operations, multi-agent routing, security hardening, troubleshooting, or any maintenance task related to their local OpenClaw installation. Also use when encountering errors from `openclaw` CLI commands or the Gateway daemon.
4metadata:
5 source: https://skillmd.com/skills/aibot88/openclaw
6---
7
8# OpenClaw Maintenance Skill
9
10OpenClaw is a self-hosted, open-source (MIT) gateway that routes AI agents across WhatsApp, Telegram, Discord, Slack, iMessage, Signal, and 15+ other channels simultaneously. It runs on macOS, Linux, or Windows.
11
12## Reference Files
13
14| Reference | Coverage |
15|---|---|
16| [channels.md](references/channels.md) | Per-channel setup (WhatsApp, Telegram, Discord, etc.) |
17| [channel_troubleshooting.md](references/channel_troubleshooting.md) | Per-channel failure signatures and walkthroughs |
18| [tools.md](references/tools.md) | Tools inventory (profiles, groups, all built-in tools) |
19| [exec.md](references/exec.md) | Exec tool: parameters, config, PATH, security, process tool |
20| [exec_approvals.md](references/exec_approvals.md) | Exec approvals: allowlists, safe bins, approval flow |
21| [browser.md](references/browser.md) | Browser plugin: profiles, CDP, Chrome MCP, snapshots, SSRF, Control API |
22| [web_tools.md](references/web_tools.md) | Web tools: Brave, Perplexity, Gemini search providers |
23| [pdf_tool.md](references/pdf_tool.md) | PDF tool: native/fallback modes, config, page filtering |
24| [elevated.md](references/elevated.md) | Elevated mode: /elevated directives, sandbox breakout |
25| [lobster.md](references/lobster.md) | Lobster: typed workflow runtime with approvals |
26| [llm_task.md](references/llm_task.md) | LLM Task: JSON-only LLM step for structured output |
27| [openprose.md](references/openprose.md) | OpenProse: multi-agent program runtime |
28| [plugins.md](references/plugins.md) | Plugins: capability model, official list, config, hooks, SDK, authoring |
29| [skills.md](references/skills.md) | Skills: locations, config, ClawHub, watcher, token impact |
30| [providers.md](references/providers.md) | Model provider setup |
31| [multi_agent.md](references/multi_agent.md) | Multi-agent routing |
32| [nodes.md](references/nodes.md) | Nodes (iOS/Android/macOS/headless) |
33| [security.md](references/security.md) | Security hardening |
34| [secrets.md](references/secrets.md) | Secrets management (SecretRef, vault) |
35| [sandboxing.md](references/sandboxing.md) | Sandboxing (Docker isolation) |
36| [config_reference.md](references/config_reference.md) | Full config field reference |
37| [gateway_ops.md](references/gateway_ops.md) | Gateway operations |
38| [remote_access.md](references/remote_access.md) | Remote access, SSH, Tailscale, web dashboard |
39| [sessions.md](references/sessions.md) | Session management, DM isolation, lifecycle, compaction |
40| [hooks.md](references/hooks.md) | Hooks: internal event hooks, HTTP webhooks, authoring, CLI |
41| [automation.md](references/automation.md) | Cron jobs, webhooks, Gmail Pub/Sub, background tasks, standing orders |
42| [acp_agents.md](references/acp_agents.md) | ACP agents: spawn external AI runtimes (Codex, Claude, Gemini, 14+ harnesses) |
43| [install.md](references/install.md) | Installation, updating, rollback, migration, uninstall |
44| [web_ui.md](references/web_ui.md) | Web surfaces: Dashboard, Control UI, WebChat |
45| [slash_commands.md](references/slash_commands.md) | Chat slash commands (/new, /model, /acp, etc.) |
46| [platforms.md](references/platforms.md) | Platform-specific guides (macOS, iOS, Android, Linux, Windows) |
47| [diffs_firecrawl.md](references/diffs_firecrawl.md) | Diffs plugin + Firecrawl anti-bot fallback |
48| [subagents.md](references/subagents.md) | Sub-agents: nested spawning, thread binding, announce, tool policy |
49| [memory.md](references/memory.md) | Memory system, vector search, hybrid BM25, compaction, QMD backend |
50| [architecture.md](references/architecture.md) | Gateway architecture, wire protocol, pairing, invariants |
51| [agent_runtime.md](references/agent_runtime.md) | Agent runtime, bootstrap files, agent loop, context engine, hooks, timeouts |
52| [streaming.md](references/streaming.md) | Streaming + chunking: block streaming, coalescing, preview modes |
53| [queue.md](references/queue.md) | Command queue: modes (steer/followup/collect), concurrency, per-session |
54| [model_failover.md](references/model_failover.md) | Model failover, OAuth, auth profiles, cooldowns, billing disables |
55| [clawhub.md](references/clawhub.md) | ClawHub: public skill registry, CLI commands, publish/install |
56| [thinking.md](references/thinking.md) | Thinking levels, verbose directives, reasoning visibility |
57| [polls.md](references/polls.md) | Polls: Telegram, WhatsApp, Discord, MS Teams |
58| [voice.md](references/voice.md) | Talk Mode (voice interaction) + Voice Wake (wake words) |
59| [presence_discovery.md](references/presence_discovery.md) | Presence system, discovery (Bonjour/Tailscale), transports |
60| [gateway_internals.md](references/gateway_internals.md) | Network model, gateway lock, health checks, doctor, logging, background exec |
61| [heartbeat.md](references/heartbeat.md) | Heartbeat: config, delivery, visibility, HEARTBEAT.md, per-agent |
62| [bonjour.md](references/bonjour.md) | Bonjour/mDNS: TXT keys, wide-area DNS-SD, debugging, failure modes |
63| [pairing.md](references/pairing.md) | Gateway pairing: node approval, CLI, API, auto-approval, storage |
64| [tui.md](references/tui.md) | TUI: keyboard shortcuts, slash commands, pickers, local shell, delivery |
65| [media.md](references/media.md) | Media: camera capture, images, audio/voice notes, transcription |
66| [channel_routing.md](references/channel_routing.md) | Channel routing, session keys, agent selection, Mattermost, BlueBubbles |
67
68
69
70## Quick Reference
71
72### Key Paths
73
74| Path | Purpose |
75|---|---|
76| `~/.openclaw/openclaw.json` | Main config (JSON5) |
77| `~/.openclaw/.env` | Global env fallback |
78| `~/.openclaw/workspace` | Default agent workspace |
79| `~/.openclaw/agents/<id>/` | Per-agent state + sessions |
80| `~/.openclaw/skills/` | Managed/local skills |
81| `~/.openclaw/agents/<id>/qmd/` | QMD memory backend state |
82| `~/.openclaw/agents/<id>/agent/auth-profiles.json` | Auth profiles + OAuth tokens |
83| `OPENCLAW_CONFIG_PATH` | Override config location |
84| `OPENCLAW_STATE_DIR` | Override state directory |
85| `OPENCLAW_HOME` | Override home directory |
86
87### Essential Commands
88
89```
90openclaw status # Overall status
91openclaw gateway status # Gateway daemon status
92openclaw gateway status --deep # Deep scan including system services
93openclaw doctor # Diagnose config/service issues
94openclaw doctor --fix # Auto-fix safe issues
95openclaw logs --follow # Tail gateway logs
96openclaw channels status --probe # Channel health check
97openclaw security audit # Security posture check
98openclaw security audit --fix # Auto-fix security issues
99openclaw update # Self-update
100openclaw dashboard # Open Control UI in browser
101openclaw tui # Terminal UI (interactive REPL)
102openclaw agent # Direct agent interaction via CLI
103openclaw health # Health check
104openclaw usage # Usage tracking
105openclaw config validate # Validate config file
106openclaw config file # Print active config path
107openclaw sessions cleanup # Session disk cleanup
108openclaw agents bindings # Agent-channel bindings
109openclaw agents bind # Bind agent to account
110openclaw agents unbind # Unbind agent
111openclaw update --dry-run # Preview update
112openclaw system presence # View connected clients/nodes
113openclaw system heartbeat last # Last heartbeat info
114openclaw system heartbeat now # Trigger heartbeat immediately
115openclaw memory search <query> # CLI memory search
116openclaw docs <query> # Search OpenClaw docs
117openclaw tasks list # List background/detached task runs
118openclaw tasks show <id> # Show specific task details
119openclaw tasks cancel <id> # Cancel a running task
120openclaw tasks audit # Identify problematic task runs
121openclaw agent --message "..." # Run single agent turn (scripted/testing)
122openclaw nodes pending # List pending pairing requests
123openclaw nodes approve <id> # Approve node pairing
124openclaw nodes status # Show all paired nodes
125openclaw health --json # Full health snapshot (JSON)
126openclaw message send --media <p> # Send media message
127```
128
129### Default Gateway
130
131- Bind: `127.0.0.1:18789` (loopback)
132- Dashboard: `http://127.0.0.1:18789/`
133- Protocol: WebSocket (JSON text frames)
134
135## Core Workflow
136
137### Diagnosing Issues
138
139Always follow this command ladder:
140
1411. `openclaw status` — quick overview
1422. `openclaw gateway status` — daemon running? RPC probe ok?
1433. `openclaw logs --follow` — watch for errors
1444. `openclaw doctor` — config/service diagnostics
1455. `openclaw channels status --probe` — per-channel health
146
147### Starting / Restarting Gateway
148
149```bash
150# Foreground with verbose logging
151openclaw gateway --port 18789 --verbose
152
153# Force-kill existing listener then start
154openclaw gateway --force
155
156# Service management (launchd on macOS, systemd on Linux)
157openclaw gateway install
158openclaw gateway start
159openclaw gateway stop
160openclaw gateway restart
161```
162
163### Configuration
164
165Edit config via any method:
166
167```bash
168# Interactive wizard
169openclaw onboard # Full setup
170openclaw configure # Config wizard
171
172# CLI one-liners
173openclaw config get <path> # Read value
174openclaw config set <path> <value> # Set value (JSON5 or raw string)
175openclaw config unset <path> # Remove value
176
177# Direct edit
178# Edit ~/.openclaw/openclaw.json (JSON5 format)
179# Gateway hot-reloads on save (if gateway.reload.mode != "off")
180```
181
182Minimal config example:
183
184```json5
185{
186 agents: { defaults: { workspace: "~/.openclaw/workspace" } },
187 channels: { whatsapp: { allowFrom: ["+15555550123"] } },
188}
189```
190
191### Channel Setup
192
193For detailed per-channel setup, see [references/channels.md](references/channels.md).
194For per-channel troubleshooting (failure signatures, setup walkthroughs), see [references/channel_troubleshooting.md](references/channel_troubleshooting.md).
195For plugins adding new channels (Matrix, Nostr, MS Teams, etc.), see [references/plugins.md](references/plugins.md).
196
197Quick channel add:
198
199```bash
200# Interactive wizard
201openclaw channels add
202
203# Non-interactive
204openclaw channels add --channel telegram --account default --name "My Bot" --token $BOT_TOKEN
205openclaw channels login --channel whatsapp # QR pairing for WhatsApp
206openclaw channels status --probe # Verify
207```
208
209### Model Provider Setup
210
211For detailed provider setup, see [references/providers.md](references/providers.md).
212
213```bash
214# Set default model
215openclaw models set anthropic/claude-sonnet-4-5
216
217# List available models
218openclaw models list --all
219
220# Check auth/token status
221openclaw models status --probe
222
223# Add auth interactively
224openclaw models auth add
225```
226
227Config example:
228
229```json5
230{
231 agents: {
232 defaults: {
233 model: {
234 primary: "anthropic/claude-sonnet-4-5",
235 fallbacks: ["openai/gpt-5.2"],
236 },
237 },
238 },
239}
240```
241
242### Multi-Agent Routing
243
244For detailed multi-agent config, see [references/multi_agent.md](references/multi_agent.md).
245
246```bash
247openclaw agents add <id> # Create agent
248openclaw agents list --bindings # Show agent-channel bindings
249openclaw agents delete <id> # Remove agent
250```
251
252### Nodes (iOS / Android / macOS / Headless)
253
254For detailed node setup, see [references/nodes.md](references/nodes.md).
255
256```bash
257openclaw nodes status # List connected nodes
258openclaw nodes describe --node <id> # Node capabilities
259openclaw devices list # Pending device approvals
260openclaw devices approve <requestId> # Approve a device
261openclaw node run --host <host> --port 18789 # Start headless node host
262```
263
264### Security
265
266For detailed security hardening, see [references/security.md](references/security.md).
267For secrets management (SecretRef, vault integration), see [references/secrets.md](references/secrets.md).
268For sandboxing (Docker isolation for tools), see [references/sandboxing.md](references/sandboxing.md).
269For full config field reference, see [references/config_reference.md](references/config_reference.md).
270For remote access (SSH, Tailscale, VPN), see [references/remote_access.md](references/remote_access.md).
271
272```bash
273openclaw security audit # Check posture
274openclaw security audit --deep # Live gateway probe
275openclaw security audit --fix # Auto-fix safe issues
276openclaw secrets reload # Re-resolve secret refs
277openclaw secrets audit # Scan for plaintext leaks
278```
279
280### Update / Uninstall
281
282For detailed installation, updating, rollback, and migration guide, see [references/install.md](references/install.md).
283
284```bash
285# Install (recommended)
286curl -fsSL https://openclaw.ai/install.sh | bash
287
288# Update
289openclaw update # Self-update command
290# Or: npm install -g openclaw@latest
291openclaw doctor # Run after update to apply migrations
292
293# Uninstall
294openclaw uninstall
295```
296
297## Tools Reference
298
299For detailed per-tool documentation, see [references/tools.md](references/tools.md).
300
301For specific tools, see:
302- [references/exec.md](references/exec.md) — Exec tool deep-dive
303- [references/exec_approvals.md](references/exec_approvals.md) — Exec approvals and allowlists
304- [references/browser.md](references/browser.md) — Browser automation deep-dive
305- [references/web_tools.md](references/web_tools.md) — Web search/fetch with multiple providers
306- [references/lobster.md](references/lobster.md) — Lobster workflow runtime
307- [references/llm_task.md](references/llm_task.md) — LLM Task for structured JSON output
308- [references/openprose.md](references/openprose.md) — OpenProse multi-agent programs
309- [references/plugins.md](references/plugins.md) — Plugin system (install, author, distribute)
310- [references/skills.md](references/skills.md) — Skills system (load, config, ClawHub)
311
312For ACP agents (Codex, Claude Code, Gemini CLI, etc.), see [references/acp_agents.md](references/acp_agents.md).
313For Diffs plugin and Firecrawl anti-bot fallback, see [references/diffs_firecrawl.md](references/diffs_firecrawl.md).
314For chat slash commands (/new, /model, /acp, etc.), see [references/slash_commands.md](references/slash_commands.md).
315For thinking levels (/think, /verbose, /reasoning), see [references/thinking.md](references/thinking.md).
316For polls (Telegram, WhatsApp, Discord, MS Teams), see [references/polls.md](references/polls.md).
317For Talk Mode and Voice Wake, see [references/voice.md](references/voice.md).
318For Gateway architecture and wire protocol, see [references/architecture.md](references/architecture.md).
319For agent runtime and loop details, see [references/agent_runtime.md](references/agent_runtime.md).
320For command queue system, see [references/queue.md](references/queue.md).
321For model failover and OAuth, see [references/model_failover.md](references/model_failover.md).
322For ClawHub skill registry, see [references/clawhub.md](references/clawhub.md).
323For presence and discovery, see [references/presence_discovery.md](references/presence_discovery.md).
324For streaming and chunking, see [references/streaming.md](references/streaming.md).
325For Gateway internals (network model, lock, health, doctor, logging), see [references/gateway_internals.md](references/gateway_internals.md).
326For heartbeat system, see [references/heartbeat.md](references/heartbeat.md).
327For Bonjour/mDNS discovery details, see [references/bonjour.md](references/bonjour.md).
328For Gateway node pairing, see [references/pairing.md](references/pairing.md).
329For Terminal UI (TUI), see [references/tui.md](references/tui.md).
330For media (camera, images, audio), see [references/media.md](references/media.md).
331For channel routing and session keys, see [references/channel_routing.md](references/channel_routing.md).
332
333**Tool profiles**: `minimal`, `coding`, `messaging`, `full` (default).
334
335**Tool groups** (for allow/deny):
336- `group:runtime` — exec, bash, process
337- `group:fs` — read, write, edit, apply_patch
338- `group:sessions` — sessions_list/history/send/spawn, session_status
339- `group:memory` — memory_search, memory_get
340- `group:web` — web_search, web_fetch
341- `group:ui` — browser, canvas
342- `group:automation` — cron, gateway
343- `group:messaging` — message
344- `group:nodes` — nodes
345- `group:openclaw` — all built-in OpenClaw tools (excludes provider plugins)
346
347## Common Failure Signatures
348
349| Error | Cause | Fix |
350|---|---|---|
351| `refusing to bind gateway ... without auth` | Non-loopback bind without token | Set `gateway.auth.token` or `gateway.auth.password` |
352| `another gateway instance is already listening` / `EADDRINUSE` | Port conflict | `openclaw gateway --force` or change port |
353| `Gateway start blocked: set gateway.mode=local` | Local mode not enabled | Set `gateway.mode="local"` |
354| `unauthorized` / reconnect loop | Token/password mismatch | Check `OPENCLAW_GATEWAY_TOKEN` or config auth |
355| `device identity required` | Missing device auth | Ensure client completes connect.challenge flow |
356| No replies from bot | Pairing/allowlist/mention gating | Check `openclaw pairing list`, DM policy, mention patterns |
357| `Embedding provider authentication failed (401)` | `.env` has placeholder API key (e.g. `your-jina-api-key-here`) | Replace with real API key in `~/.openclaw/.env`, restart Gateway |
358| `openclaw flows list` / `ClawFlow` references | ClawFlow is deprecated | Use `openclaw tasks list/show/cancel/audit` instead |
359| `config change requires gateway restart (plugins.*)` | Plugin config changes can't hot-reload | Full `openclaw gateway restart` or `launchctl kickstart -k` |
360| `Bootstrap failed: 5: Input/output error` | LaunchAgent plist in stale/stuck state | `openclaw gateway install` then `launchctl kickstart -k gui/$(id -u)/ai.openclaw.gateway` |
361| `Missing env var "X" referenced at config path: ...` | `.env` missing or variable not defined | Add variable to `~/.openclaw/.env` and restart Gateway |
362
363## Environment Variables
364
365| Variable | Purpose |
366|---|---|
367| `OPENCLAW_GATEWAY_TOKEN` | Gateway auth token |
368| `OPENCLAW_GATEWAY_PASSWORD` | Gateway auth password |
369| `OPENCLAW_GATEWAY_PORT` | Override gateway port |
370| `OPENCLAW_CONFIG_PATH` | Override config file path |
371| `OPENCLAW_STATE_DIR` | Override state directory |
372| `OPENCLAW_HOME` | Override home directory |
373| `OPENCLAW_LOAD_SHELL_ENV` | Import shell env (set to `1`) |
374| `OPENCLAW_VERBOSE` | Verbose logging |
375| `OPENCLAW_LOG_FILE` | File logging path |
376| `OPENCLAW_LOG_LEVEL` | Log level control |
377| `OPENCLAW_SHELL` | Set by OpenClaw in exec/acp/tui runtimes |
378| `BRAVE_API_KEY` | For web_search tool |
379| `FIRECRAWL_API_KEY` | For Firecrawl anti-bot fallback |
380| `ELEVENLABS_API_KEY` | For Talk Mode TTS |
381| `ELEVENLABS_VOICE_ID` | Default voice for Talk Mode |
382| `CLAWHUB_TOKEN` | ClawHub API token for CI/automation |
383| `CLAWHUB_WORKDIR` | ClawHub working directory override |
384| `OLLAMA_API_KEY` | For Ollama embeddings provider |
385| `OPENCLAW_SKIP_CRON` | Disable cron scheduler (set to `1`) |
386| `OPENCLAW_HIDE_BANNER` | Suppress banner output |
387| `OPENCLAW_SUPPRESS_NOTES` | Suppress informational notes |
388