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 tool: profiles, CDP, relay, 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: official list, config, manifest, CLI, 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 |
| acp_agents.md |
ACP agents: spawn external AI runtimes (Codex, Claude, etc.) |
| 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 |
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_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
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.
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 |
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 |
1---2name: openclaw3description: 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/micsapp/openclaw6---78# OpenClaw Maintenance Skill910OpenClaw 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.1112## Reference Files1314| 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 tool: profiles, CDP, relay, 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: official list, config, manifest, CLI, 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 |42| [acp_agents.md](references/acp_agents.md) | ACP agents: spawn external AI runtimes (Codex, Claude, etc.) |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 |5051## Quick Reference5253### Key Paths5455| Path | Purpose |56|---|---|57| `~/.openclaw/openclaw.json` | Main config (JSON5) |58| `~/.openclaw/.env` | Global env fallback |59| `~/.openclaw/workspace` | Default agent workspace |60| `~/.openclaw/agents/<id>/` | Per-agent state + sessions |61| `OPENCLAW_CONFIG_PATH` | Override config location |62| `OPENCLAW_STATE_DIR` | Override state directory |63| `OPENCLAW_HOME` | Override home directory |6465### Essential Commands6667```68openclaw status # Overall status69openclaw gateway status # Gateway daemon status70openclaw gateway status --deep # Deep scan including system services71openclaw doctor # Diagnose config/service issues72openclaw doctor --fix # Auto-fix safe issues73openclaw logs --follow # Tail gateway logs74openclaw channels status --probe # Channel health check75openclaw security audit # Security posture check76openclaw security audit --fix # Auto-fix security issues77openclaw update # Self-update78openclaw dashboard # Open Control UI in browser79openclaw tui # Terminal UI (interactive REPL)80openclaw agent # Direct agent interaction via CLI81openclaw health # Health check82openclaw usage # Usage tracking83openclaw config validate # Validate config file84openclaw config file # Print active config path85openclaw sessions cleanup # Session disk cleanup86openclaw agents bindings # Agent-channel bindings87openclaw agents bind # Bind agent to account88openclaw agents unbind # Unbind agent89openclaw update --dry-run # Preview update90```9192### Default Gateway9394- Bind: `127.0.0.1:18789` (loopback)95- Dashboard: `http://127.0.0.1:18789/`96- Protocol: WebSocket (JSON text frames)9798## Core Workflow99100### Diagnosing Issues101102Always follow this command ladder:1031041. `openclaw status` — quick overview1052. `openclaw gateway status` — daemon running? RPC probe ok?1063. `openclaw logs --follow` — watch for errors1074. `openclaw doctor` — config/service diagnostics1085. `openclaw channels status --probe` — per-channel health109110### Starting / Restarting Gateway111112```bash113# Foreground with verbose logging114openclaw gateway --port 18789 --verbose115116# Force-kill existing listener then start117openclaw gateway --force118119# Service management (launchd on macOS, systemd on Linux)120openclaw gateway install121openclaw gateway start122openclaw gateway stop123openclaw gateway restart124```125126### Configuration127128Edit config via any method:129130```bash131# Interactive wizard132openclaw onboard # Full setup133openclaw configure # Config wizard134135# CLI one-liners136openclaw config get <path> # Read value137openclaw config set <path> <value> # Set value (JSON5 or raw string)138openclaw config unset <path> # Remove value139140# Direct edit141# Edit ~/.openclaw/openclaw.json (JSON5 format)142# Gateway hot-reloads on save (if gateway.reload.mode != "off")143```144145Minimal config example:146147```json5148{149 agents: { defaults: { workspace: "~/.openclaw/workspace" } },150 channels: { whatsapp: { allowFrom: ["+15555550123"] } },151}152```153154### Channel Setup155156For detailed per-channel setup, see [references/channels.md](references/channels.md).157For per-channel troubleshooting (failure signatures, setup walkthroughs), see [references/channel_troubleshooting.md](references/channel_troubleshooting.md).158For plugins adding new channels (Matrix, Nostr, MS Teams, etc.), see [references/plugins.md](references/plugins.md).159160Quick channel add:161162```bash163# Interactive wizard164openclaw channels add165166# Non-interactive167openclaw channels add --channel telegram --account default --name "My Bot" --token $BOT_TOKEN168openclaw channels login --channel whatsapp # QR pairing for WhatsApp169openclaw channels status --probe # Verify170```171172### Model Provider Setup173174For detailed provider setup, see [references/providers.md](references/providers.md).175176```bash177# Set default model178openclaw models set anthropic/claude-sonnet-4-5179180# List available models181openclaw models list --all182183# Check auth/token status184openclaw models status --probe185186# Add auth interactively187openclaw models auth add188```189190Config example:191192```json5193{194 agents: {195 defaults: {196 model: {197 primary: "anthropic/claude-sonnet-4-5",198 fallbacks: ["openai/gpt-5.2"],199 },200 },201 },202}203```204205### Multi-Agent Routing206207For detailed multi-agent config, see [references/multi_agent.md](references/multi_agent.md).208209```bash210openclaw agents add <id> # Create agent211openclaw agents list --bindings # Show agent-channel bindings212openclaw agents delete <id> # Remove agent213```214215### Nodes (iOS / Android / macOS / Headless)216217For detailed node setup, see [references/nodes.md](references/nodes.md).218219```bash220openclaw nodes status # List connected nodes221openclaw nodes describe --node <id> # Node capabilities222openclaw devices list # Pending device approvals223openclaw devices approve <requestId> # Approve a device224openclaw node run --host <host> --port 18789 # Start headless node host225```226227### Security228229For detailed security hardening, see [references/security.md](references/security.md).230For secrets management (SecretRef, vault integration), see [references/secrets.md](references/secrets.md).231For sandboxing (Docker isolation for tools), see [references/sandboxing.md](references/sandboxing.md).232For full config field reference, see [references/config_reference.md](references/config_reference.md).233For remote access (SSH, Tailscale, VPN), see [references/remote_access.md](references/remote_access.md).234235```bash236openclaw security audit # Check posture237openclaw security audit --deep # Live gateway probe238openclaw security audit --fix # Auto-fix safe issues239openclaw secrets reload # Re-resolve secret refs240openclaw secrets audit # Scan for plaintext leaks241```242243### Update / Uninstall244245For detailed installation, updating, rollback, and migration guide, see [references/install.md](references/install.md).246247```bash248# Install (recommended)249curl -fsSL https://openclaw.ai/install.sh | bash250251# Update252openclaw update # Self-update command253# Or: npm install -g openclaw@latest254openclaw doctor # Run after update to apply migrations255256# Uninstall257openclaw uninstall258```259260## Tools Reference261262For detailed per-tool documentation, see [references/tools.md](references/tools.md).263264For specific tools, see:265- [references/exec.md](references/exec.md) — Exec tool deep-dive266- [references/exec_approvals.md](references/exec_approvals.md) — Exec approvals and allowlists267- [references/browser.md](references/browser.md) — Browser automation deep-dive268- [references/web_tools.md](references/web_tools.md) — Web search/fetch with multiple providers269- [references/lobster.md](references/lobster.md) — Lobster workflow runtime270- [references/llm_task.md](references/llm_task.md) — LLM Task for structured JSON output271- [references/openprose.md](references/openprose.md) — OpenProse multi-agent programs272- [references/plugins.md](references/plugins.md) — Plugin system (install, author, distribute)273- [references/skills.md](references/skills.md) — Skills system (load, config, ClawHub)274275For ACP agents (Codex, Claude Code, Gemini CLI, etc.), see [references/acp_agents.md](references/acp_agents.md).276For Diffs plugin and Firecrawl anti-bot fallback, see [references/diffs_firecrawl.md](references/diffs_firecrawl.md).277For chat slash commands (/new, /model, /acp, etc.), see [references/slash_commands.md](references/slash_commands.md).278279**Tool profiles**: `minimal`, `coding`, `messaging`, `full` (default).280281**Tool groups** (for allow/deny):282- `group:runtime` — exec, bash, process283- `group:fs` — read, write, edit, apply_patch284- `group:sessions` — sessions_list/history/send/spawn, session_status285- `group:memory` — memory_search, memory_get286- `group:web` — web_search, web_fetch287- `group:ui` — browser, canvas288- `group:automation` — cron, gateway289- `group:messaging` — message290- `group:nodes` — nodes291- `group:openclaw` — all built-in OpenClaw tools (excludes provider plugins)292293## Common Failure Signatures294295| Error | Cause | Fix |296|---|---|---|297| `refusing to bind gateway ... without auth` | Non-loopback bind without token | Set `gateway.auth.token` or `gateway.auth.password` |298| `another gateway instance is already listening` / `EADDRINUSE` | Port conflict | `openclaw gateway --force` or change port |299| `Gateway start blocked: set gateway.mode=local` | Local mode not enabled | Set `gateway.mode="local"` |300| `unauthorized` / reconnect loop | Token/password mismatch | Check `OPENCLAW_GATEWAY_TOKEN` or config auth |301| `device identity required` | Missing device auth | Ensure client completes connect.challenge flow |302| No replies from bot | Pairing/allowlist/mention gating | Check `openclaw pairing list`, DM policy, mention patterns |303304## Environment Variables305306| Variable | Purpose |307|---|---|308| `OPENCLAW_GATEWAY_TOKEN` | Gateway auth token |309| `OPENCLAW_GATEWAY_PASSWORD` | Gateway auth password |310| `OPENCLAW_GATEWAY_PORT` | Override gateway port |311| `OPENCLAW_CONFIG_PATH` | Override config file path |312| `OPENCLAW_STATE_DIR` | Override state directory |313| `OPENCLAW_HOME` | Override home directory |314| `OPENCLAW_LOAD_SHELL_ENV` | Import shell env (set to `1`) |315| `OPENCLAW_VERBOSE` | Verbose logging |316| `OPENCLAW_LOG_FILE` | File logging path |317| `OPENCLAW_LOG_LEVEL` | Log level control |318| `OPENCLAW_SHELL` | Set by OpenClaw in exec/acp/tui runtimes |319| `BRAVE_API_KEY` | For web_search tool |320| `FIRECRAWL_API_KEY` | For Firecrawl anti-bot fallback |