OpenClaw
Complete reference for OpenClaw — the self-hosted AI agent platform for personal assistants across messaging channels
Installation & Setup
Installing OpenClaw and running the onboarding wizard
Install OpenClaw and complete first-time setup
# Install (recommended)
curl -fsSL https://openclaw.ai/install.sh | bash
# Install (Homebrew)
brew install openclaw
# Install (npm)
npm install -g openclaw
# Verify setup
openclaw doctorGateway Management
Start, stop, and manage the always-on Gateway daemon
Install, start, stop, and restart the gateway daemon.
# Install the gateway daemon
openclaw gateway install
# Start / stop / restart
openclaw gateway start
openclaw gateway stop
openclaw gateway restart
# Check gateway status
openclaw gateway statusCheck system status, channel health, and provider usage.
# Quick status overview
openclaw status
# Full status (all components)
openclaw status --all
# Live channel probes (WhatsApp, Telegram, Discord, etc.)
openclaw status --deep
# Provider usage (quota remaining)
openclaw status --usageView and tail gateway and agent logs.
# View recent logs
openclaw logs
# Tail logs in real time
openclaw logs --follow
# Limit to last N lines
openclaw logs --limit 100
# JSON output (for piping to jq)
openclaw logs --jsonUpdate OpenClaw, manage backups, and store credentials.
# Update to latest version
openclaw update
# Create a backup
openclaw backup
# Manage secrets (API keys, tokens)
openclaw secrets
# Open the web dashboard
openclaw dashboardConfiguration
Configure subsystems, channels, models, and security.
Run onboard, configure subsystems, and connect channels.
# First-time setup (interactive wizard)
openclaw onboard
# Initialize config + workspace
openclaw setup
openclaw setup --workspace ~/my-agent
openclaw setup --wizard
# Re-run the full configuration wizard
openclaw configure
# Configure a specific section
openclaw configure --section model # Model provider + API keys
openclaw configure --section channels # Messaging channels
openclaw configure --section web # Web UI / Canvas settings
openclaw configure --section security # Auth, tokens, trust
# Set individual values via CLI
openclaw config set channels.telegram.enabled true
openclaw config set channels.telegram.botToken "YOUR_BOT_TOKEN"
openclaw config set agents.defaults.model "sonnet"Agents & Models
Configure AI models and agent behavior
Set up models, system prompts, and multi-agent routing
# Configure model interactively
openclaw configure --section model
# Set model via CLI
openclaw config set agents.defaults.model "sonnet"
openclaw config set agents.defaults.model "openai/gpt-4o"
openclaw config set agents.defaults.model "ollama/qwen2.5:14b"
# Set system instructions
openclaw config set agents.defaults.instructions "You are a helpful assistant."Workspace Files
Core files that define the agent's personality, identity, and behavior.
The key files in ~/.openclaw/workspace/ and what each one does.
# ~/.openclaw/workspace/
# SOUL.md — Agent personality and tone
# AGENTS.md — Operating instructions and rules
# USER.md — Who you are (name, preferences, context)
# MEMORY.md — Persistent memory across sessions
# BOOTSTRAP.md — Startup routine (runs at session start)
# HEARTBEAT.md — Periodic background tasks
# TOOLS.md — Notes about available tools
# IDENTITY.md — Identity-specific configuration
# Initialize workspace from defaults
cp docs/reference/templates/AGENTS.md ~/.openclaw/workspace/
cp docs/reference/templates/SOUL.md ~/.openclaw/workspace/
cp docs/reference/templates/TOOLS.md ~/.openclaw/workspace/Slash Commands
In-chat commands for controlling sessions, models, and agent behavior.
Control sessions, switch models, and manage context.
/new Start a new session
/new gpt-4o New session with specific model
/compact Compact the session context
/stop Abort the current run
/model Show current model
/model sonnet Switch model
/models List available providers/models
/context Show how context is assembled
/context detail Per-file size breakdown
/status Show runtime status
/help Show help summarySkills
Extend your agent with installable skills from ClawHub
Search, install, and configure skills from ClawHub
# Search for skills
openclaw skills search "image generation"
# Install a skill
openclaw skills install image-lab
# Install specific version
openclaw skills install image-lab --version 2.1.0
# List installed skills
openclaw skills list
# Update all skills
openclaw skills update --all
# Check skill health
openclaw skills checkCron & Automation
Schedule recurring jobs and reminders
Create cron jobs, one-shot reminders, and recurring tasks
# One-shot reminder (absolute time)
openclaw cron add \
--name "Standup" \
--at "2026-04-05T09:00:00Z" \
--session main \
--system-event "Reminder: daily standup" \
--wake now --delete-after-run
# Relative-time reminder
openclaw cron add \
--name "Check build" \
--at "20m" \
--session main \
--system-event "Check CI build status"
# Recurring job
openclaw cron add \
--name "Morning brief" \
--cron "0 7 * * *" \
--tz "America/New_York" \
--message "Summarize overnight updates"Hooks & Standing Orders
Event-driven automation and persistent agent instructions.
Scripts that run in response to gateway and agent events.
# List available hooks
openclaw hooks list
# Enable a bundled hook
openclaw hooks enable session-memory
openclaw hooks enable command-logger
# Disable a hook
openclaw hooks disable command-logger
# Check hook status
openclaw hooks check
# Hook info
openclaw hooks info session-memoryWeb Search & Browser
Configure web search providers and browser automation.
Set up web search providers and let the agent browse pages.
# Set web search provider via CLI
openclaw config set tools.web.search.provider "brave"
openclaw config set tools.web.search.enabled true
# Providers: brave, duckduckgo, tavily, perplexity,
# exa, searxng (self-hosted)
# The agent uses web search automatically when needed
# You can also ask: "search the web for..."Sub-agents
Spawn, steer, and manage child agents for parallel work.
Spawn child agents, steer them, and configure multi-agent routing.
# In chat — the agent spawns sub-agents automatically for complex tasks
# You can also manage them with slash commands:
/subagents list List running sub-agents
/subagents spawn Spawn a new sub-agent
/steer <id> "focus on X" Redirect a running sub-agent
/kill <id> Kill a specific sub-agent
/kill all Kill all sub-agents
/agents List thread-bound agentsMCP Servers & Plugins
Integrate external tools via Model Context Protocol
Add MCP tool servers to extend agent capabilities
// Add an MCP server in openclaw.json
{
mcp: {
servers: {
github: {
command: "npx",
args: ["-y", "@modelcontextprotocol/server-github"],
env: {
GITHUB_PERSONAL_ACCESS_TOKEN: {
source: "env",
provider: "default",
id: "MCP_GITHUB_PAT"
}
}
}
}
}
}Security & Access
Authentication, trust boundaries, and remote access
Secure your Gateway with auth, allowlists, and remote access
# Set loopback binding (local only)
openclaw config set gateway.bind loopback
# Enable token auth
openclaw config set gateway.auth.mode token
# Generate a secure gateway token
openclaw doctor --generate-gateway-token
# Set gateway mode
openclaw config set gateway.mode "local"Canvas & Web UI
Control dashboard and live canvas interface
Use the web dashboard and canvas for rich interactions
# Open the dashboard
openclaw dashboard
# Default local URL
# http://localhost:18789
# Connect to remote gateway
# http://localhost:18789#token=your-token
# Slash commands in conversations
/skill image-lab Generate a landscape
/context detail
/btw What's the weather like?Memory & Context
Persistent memory and context management
Configure persistent memory and embedding-based search
# Enable memory search
openclaw config set memory.search.enabled true
# Use Ollama for local embeddings
openclaw config set memory.search.provider "ollama"
# Check context usage (in conversation)
/context detailDeployment
Deploy OpenClaw to cloud platforms
Deploy OpenClaw Gateway to Docker, Render, or cloud VMs
# Docker
docker run -d --name openclaw \
-v openclaw-data:/data \
-p 18789:18789 \
-e OPENCLAW_GATEWAY_TOKEN="your-token" \
ghcr.io/openclaw/openclaw:latest
# Docker Compose
# See detailed tab for full compose fileDevice Pairing & Scopes
Manage paired devices, approve pairing requests, and handle scope upgrades.
List, approve, and clear paired devices.
# List paired and pending devices
openclaw devices list
# Approve a pending device by request ID
openclaw devices approve <request-id>
# Clear all pairing state (nuclear reset)
openclaw devices clear --yes
# Restart gateway after pairing changes
openclaw gateway restartSession Cache
Manage cached sessions to apply model changes and fix stuck conversations.
Clear cached sessions after model changes or when conversations get stuck.
# Clear cached sessions (required after model changes)
openclaw gateway stop
rm -rf ~/.openclaw/agents/main/sessions/*
openclaw gateway startLinux Install Fixes
Fix common issues when installing OpenClaw on Linux and Ubuntu.
Fix PATH, gateway mode, and systemd issues on Linux installs.
# Fix PATH for npm global installs (Ubuntu)
echo 'export PATH="$HOME/.npm-global/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
# Set required gateway mode for self-hosted installs
openclaw config set gateway.mode "local"
# Enable systemd lingering (keeps gateway alive after logout)
sudo loginctl enable-linger $USERTroubleshooting
Diagnose and fix common OpenClaw issues.
Run diagnostics, check logs, and resolve known issues.
# Run diagnostics
openclaw doctor
# Check gateway logs
journalctl --user -u openclaw-gateway -n 50 --no-pager
# Full reset (keeps CLI installed)
openclaw gateway stop
openclaw uninstall
rm -rf ~/.openclaw