All Guides
AI & Machine Learning

The Complete OpenClaw Guide: Installation, Configuration, Skills, Canvas, and Self-Hosting

The definitive OpenClaw guide for 2026. Covers installation on Windows/Mac/Linux/Docker, environment variables (OPENCLAW_HOME, OPENCLAW_STATE_DIR, OPENCLAW_CONFIG_PATH), Canvas A2UI, 20+ native messaging channels, 13,700+ ClawHub skills, model providers, Gateway configuration, self-hosting on VPS, and troubleshooting — everything you need to master your self-hosted AI assistant.

60 min read
March 30, 2026
NerdLevelTech
6 related articles
The Complete OpenClaw Guide: Installation, Configuration, Skills, Canvas, and Self-Hosting

{/* Last updated: 2026-03-30 | OpenClaw v2026.3.28 | Node.js 22.14+ (24 recommended) | MIT License */}

OpenClaw is a free, open-source, self-hosted personal AI assistant with 335,000+ GitHub stars that runs on your own devices, connects to 20+ messaging platforms natively, and executes real tasks — shell commands, browser automation, file management, and scheduled workflows — using any LLM you choose, with 13,700+ community skills on ClawHub.

Version note: This guide covers OpenClaw v2026.3.28 (March 2026). The project surpassed React as GitHub's most-starred software project in 60 days and is under active development. Always check docs.openclaw.ai for the latest documentation.

What Is OpenClaw and Why It Matters

OpenClaw is a free, open-source, self-hosted personal AI assistant that runs on your own devices. Unlike cloud-based assistants like ChatGPT or Claude's web interface, OpenClaw keeps your data local and connects to the messaging platforms you already use — WhatsApp, Telegram, Slack, Discord, and more.

But OpenClaw isn't just a chatbot. It's an AI agent platform — it can execute real tasks on your computer:

  • Run shell commands and scripts
  • Read, write, and edit files on your filesystem
  • Control a browser (navigate, click, fill forms, screenshot)
  • Schedule cron jobs and respond to webhooks
  • Manage email, calendars, and workflows
  • Render interactive visual content via Canvas (A2UI)
  • Search the web with bundled Exa, Tavily, and Firecrawl (new in v2026.3.22)
  • Automate anything you can describe in natural language

Key Stats (March 2026)

Metric Value
GitHub Stars 335,000+ (surpassed React's 10-year record in 60 days)12
Contributors 1,100+
Forks 57,000+
ClawHub Skills 13,729+ community-built skills3
Messaging Channels 20+ native, additional via community plugins
License MIT — fully free and open-source
Latest Version v2026.3.28

Version History: Clawdbot to OpenClaw

OpenClaw holds what may be the fastest triple rebrand in open-source history:

Date Name Event
November 2025 Clawdbot Created by Peter Steinberger (founder of PSPDFKit). A pun on "Claude" with a lobster mascot
Late January 2026 Went viral — 60,000 GitHub stars in 72 hours
January 27, 2026 Moltbot Renamed after Anthropic's legal team flagged trademark similarity with "Claude"
January 29, 2026 OpenClaw Final name — "Moltbot" never stuck, and crypto scammers hijacked old accounts
February 14, 2026 Steinberger announced he would join OpenAI; project moving to an open-source foundation4
March 3, 2026 Surpassed React at 250,829 stars — most-starred software project on GitHub
March 23, 2026 v2026.3.22 Major release: 45+ new features, 13 breaking changes, 82 bug fixes, 20+ security patches5

Breaking Change Alert (v2026.3.22)

All CLAWDBOT_* and MOLTBOT_* prefixed environment variables are removed. If your .env file still uses these, your agent will fail to start. Replace them with OPENCLAW_* equivalents.


Architecture: How OpenClaw Works

OpenClaw uses a Gateway architecture — a local WebSocket-based control plane that coordinates everything:

┌──────────────────────────────────────────────────────┐
│                     Gateway                           │
│               ws://127.0.0.1:18789                    │
│                                                       │
│  ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌─────────┐ │
│  │ Sessions │ │ Channels │ │  Tools   │ │ Canvas  │ │
│  └──────────┘ └──────────┘ └──────────┘ └─────────┘ │
│  ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌─────────┐ │
│  │  Events  │ │  Cron    │ │  Skills  │ │ Browser │ │
│  └──────────┘ └──────────┘ └──────────┘ └─────────┘ │
└───────┬──────────┬───────────┬───────────┬───────────┘
        │          │           │           │
   ┌────▼────┐ ┌──▼────┐ ┌───▼──────┐ ┌──▼─────┐
   │WhatsApp │ │ Slack │ │ Discord  │ │WebChat │ ...20+ channels
   └─────────┘ └───────┘ └──────────┘ └────────┘
        │          │           │           │
   ┌────▼──────────▼───────────▼───────────▼────┐
   │          AI Model Provider                  │
   │  Claude / GPT-4o / Gemini / Ollama (local)  │
   └─────────────────────────────────────────────┘

Key Components

Component What It Does
Gateway The brain — manages sessions, routes messages, coordinates tools, serves Control UI
Channels Connectors to 20+ messaging platforms (native)
Agent Runtime The AI reasoning engine — talks to your chosen LLM
Tools Built-in capabilities: shell, filesystem, browser control, cron, webhooks
Skills SKILL.md files from ClawHub or custom-built that extend agent capabilities
Nodes Companion apps (macOS, iOS, Android) that provide device capabilities (camera, screen, location, notifications)
Canvas Agent-driven visual workspace for rendering interactive UI (A2UI protocol)

Tech Stack

  • Language: TypeScript
  • Runtime: Node.js 22.14+
  • Package Manager: pnpm (preferred) or npm. Bun is experimental — not recommended for WhatsApp/Telegram channels
  • Browser Automation: OpenClaw-managed Chrome/Chromium via CDP
  • Canvas: A2UI v0.8 protocol over WebKit/WebView
  • License: MIT — fully free and open-source

Installation and Setup

Prerequisites

  • Node.js 22.14 or newer (Node 24 recommended; verify: node --version)
  • macOS, Linux, or Windows (see Windows section below for details)

Quick Install

macOS / Linux:

curl -fsSL https://openclaw.ai/install.sh | bash

Windows (PowerShell — Run as Administrator):

iwr -useb https://openclaw.ai/install.ps1 | iex

Or via npm/pnpm:

npm install -g openclaw@latest
# or
pnpm add -g openclaw@latest

Onboarding

After installation, run the interactive setup wizard:

openclaw onboard --install-daemon

This walks you through:

  1. Model/Auth — choose a provider (Anthropic, OpenAI, etc.) and paste your API key
  2. Web Search — optionally configure a search provider (Perplexity, Brave, etc.)
  3. Workspace — set the location for agent files (default ~/.openclaw/workspace)
  4. Gateway — port, bind address, auth mode
  5. Channels — link your first messaging platform (WhatsApp, Telegram, etc.)
  6. Daemon — install as LaunchAgent (macOS) or systemd service (Linux)
  7. Health check — verifies the Gateway started successfully
  8. Skills — installs recommended skills and optional dependencies

Verify Installation

# Check gateway status
openclaw gateway status

# Open the Control UI in your browser
openclaw dashboard
# Opens http://127.0.0.1:18789/

# Check version
openclaw --version

Configuration

The main config lives at ~/.openclaw/openclaw.json:

{
  agents: {
    defaults: {
      model: {
        primary: "anthropic/claude-opus-4-6"  // Recommended for best results
      }
    }
  },
  gateway: {
    port: 18789
  }
}

Using local models (fully offline):

{
  agents: {
    defaults: {
      model: {
        primary: "ollama/llama3.1:70b"  // Complete privacy — no cloud API calls
      }
    }
  }
}

From Source (Development)

git clone https://github.com/openclaw/openclaw.git
cd openclaw
pnpm install
pnpm ui:build
pnpm build
pnpm openclaw onboard --install-daemon

# Dev mode with auto-reload:
pnpm gateway:watch

Windows Installation (PowerShell, WSL2, Docker)

Windows has three installation paths, each with different trade-offs:

Method 1: PowerShell One-Liner (Quickest)

# Run PowerShell as Administrator
iwr -useb https://openclaw.ai/install.ps1 | iex

Requirements:

  • Windows 10 Build 19041+ or Windows 11
  • Node.js 22.14+ installed (nodejs.org)
  • 4GB RAM minimum (8GB recommended)

What the script does:

  1. Checks for Node.js and npm
  2. Installs OpenClaw globally via npm
  3. Optionally registers a Windows Scheduled Task for auto-start

Security note: A command injection vulnerability in the Windows Scheduled Task auto-start mechanism was disclosed on March 19, 2026, affecting all versions before v2026.2.25. Always run openclaw --version and update if you're below v2026.2.25.

WSL2 provides a full Linux environment, avoiding Windows-specific issues:

# 1. Install WSL2 (if not already)
wsl --install

# 2. Open WSL terminal, then install OpenClaw the Linux way
curl -fsSL https://openclaw.ai/install.sh | bash

# 3. Run onboarding
openclaw onboard --install-daemon

This is the recommended approach for developers because:

  • Full Linux compatibility — no path translation issues
  • Better filesystem performance for Node.js workloads
  • Docker integration works seamlessly
  • Skills that use shell commands work exactly as documented

Method 3: Docker Desktop (Best Isolation)

# Pull and run the official Docker image
docker run -d `
  --name openclaw `
  -p 18789:18789 `
  -v ${env:USERPROFILE}\.openclaw:/root/.openclaw `
  ghcr.io/openclaw/openclaw:latest

# Or with Docker Compose (create docker-compose.yml)
# docker-compose.yml
services:
  openclaw:
    image: ghcr.io/openclaw/openclaw:latest
    ports:
      - "18789:18789"
    volumes:
      - ~/.openclaw:/root/.openclaw
    restart: unless-stopped

Windows Installation Comparison

Method Setup Time Dev Friendly Isolation Shell Compatibility
PowerShell 2 minutes Medium None PowerShell only
WSL2 10 minutes High Partial Full Linux
Docker 5 minutes Medium Full Full Linux (in container)

Environment Variables Reference

OpenClaw uses environment variables for configuration. Understanding these is critical for custom deployments, Docker setups, and multi-profile configurations.

Core Environment Variables

Variable Default Purpose
OPENCLAW_HOME $HOME Replaces the system home directory for all internal path resolution. Enables full filesystem isolation for headless service accounts
OPENCLAW_STATE_DIR ~/.openclaw Overrides the state directory where OpenClaw stores config, logs, memory, and skills
OPENCLAW_CONFIG_PATH ~/.openclaw/openclaw.json Points to a specific config file. Useful for running multiple configurations
OPENCLAW_CONTAINER unset When set, runs OpenClaw commands inside a running Docker/Podman container (new in v2026.3.22)

Loading Order (The "Never Override" Rule)

OpenClaw loads environment variables from multiple sources in a strict order. The first value found wins — later sources never override earlier ones:

1. Process environment (e.g., OPENCLAW_STATE_DIR=/custom openclaw gateway)
2. .env file in the current working directory
3. Global .env at ~/.openclaw/.env (i.e., $OPENCLAW_STATE_DIR/.env)
4. Config env block in ~/.openclaw/openclaw.json
5. Optional login-shell import

This means:

  • A variable set in your shell always takes precedence
  • A .env file in your project directory overrides the global config
  • The global .env overrides the JSON config

Precedence for OPENCLAW_HOME

OPENCLAW_HOME > $HOME > USERPROFILE > os.homedir()

OPENCLAW_HOME can be set to a tilde path (e.g., ~/svc), which gets expanded using $HOME before use.

Profile Isolation

Run multiple independent OpenClaw instances with --profile:

# Personal assistant
openclaw --profile personal gateway

# Work assistant (completely separate state)
openclaw --profile work gateway

Each profile gets its own isolated state directory, preventing cross-contamination between personal and work contexts.

Docker Environment Example

# docker-compose.yml with custom env vars
services:
  openclaw:
    image: ghcr.io/openclaw/openclaw:latest
    ports:
      - "18789:18789"
    environment:
      - OPENCLAW_STATE_DIR=/data/openclaw
      - OPENCLAW_HOME=/home/openclaw
      - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
    volumes:
      - openclaw-data:/data/openclaw
    restart: unless-stopped

volumes:
  openclaw-data:

Migrating from CLAWDBOT_/MOLTBOT_ Variables

As of v2026.3.22, all legacy prefixes are removed. Update your .env files:

# Old (will fail to start)
CLAWDBOT_STATE_DIR=/custom/path
MOLTBOT_HOME=/home/user

# New (required)
OPENCLAW_STATE_DIR=/custom/path
OPENCLAW_HOME=/home/user

AI Model Providers and Configuration

OpenClaw works with 20+ AI providers. You can use cloud APIs, local models, or mix both for different agents.

Provider Priority (Auto-Detection)

When multiple API keys are configured, OpenClaw selects a provider in this priority order:

Anthropic > OpenAI > OpenRouter > Gemini > OpenCode > GitHub Copilot >
xAI > Groq > Mistral > Cerebras > Venice > Moonshot > Kimi > MiniMax >
Synthetic > ZAI > AI Gateway > Xiaomi > Bedrock > Ollama
Use Case Model Why
General assistant Claude Opus 4.6 Best reasoning, tool use, and instruction following
Budget-friendly Claude Haiku 4.5 Fast, cheap, good for simple tasks
Code generation GPT-4o or Claude Sonnet 4.6 Strong coding with fast response
Full privacy Ollama (Llama 3.1 70B) Zero data leaves your device
Reasoning tasks OpenAI o1 Chain-of-thought for complex problems
Fast responses Gemini 2.5 Flash Low latency for interactive use

Per-Agent Model Configuration

Route different tasks to different models to optimize cost and quality:

{
  agents: {
    list: [
      { id: "personal", default: true, model: { primary: "anthropic/claude-opus-4-6" } },
      { id: "work", model: { primary: "anthropic/claude-sonnet-4-6" } },
      { id: "quick", model: { primary: "anthropic/claude-haiku-4-5" } },
      { id: "private", model: { primary: "ollama/llama3.1:70b" } }
    ]
  },
  bindings: [
    { agentId: "personal", match: { channel: "whatsapp" } },
    { agentId: "work", match: { channel: "slack" } },
    { agentId: "private", match: { channel: "matrix" } }
  ]
}

Local Models with Ollama

Ollama is automatically detected at http://127.0.0.1:11434 when you opt in with OLLAMA_API_KEY:

# Install Ollama (macOS/Linux)
curl -fsSL https://ollama.com/install.sh | sh

# Pull a model
ollama pull llama3.1:70b

# Set the env var to enable Ollama in OpenClaw
export OLLAMA_API_KEY=ollama

# Configure OpenClaw to use it
# In ~/.openclaw/openclaw.json:
# { agents: { defaults: { model: { primary: "ollama/llama3.1:70b" } } } }
# Or via CLI:
openclaw config set agents.defaults.model.primary ollama/llama3.1:70b

Custom Provider Proxies

Add OpenAI/Anthropic-compatible proxies via models.providers:

{
  models: {
    providers: {
      "my-proxy": {
        baseUrl: "https://my-llm-proxy.internal/v1",
        apiKey: "${MY_PROXY_API_KEY}",
        api: "openai-completions",
        models: [
          {
            id: "my-model",
            name: "My Custom Model",
            contextWindow: 32000,
            maxTokens: 32000
          }
        ]
      }
    }
  }
}

Note: The id field must match exactly what the provider's API expects. The api field specifies the compatibility mode ("openai-completions" or "anthropic-messages").


Connecting Messaging Channels (20+ Native)

OpenClaw includes 20+ native messaging channel plugins, with additional channels available via community plugins. Here are the most popular:

Channel SDK/Protocol Notes
WhatsApp Baileys Most popular channel. Uses WhatsApp Web protocol
Telegram grammY Bot API. Create a bot via @BotFather
Slack Bolt Workspace app integration
Discord discord.js Bot account in your servers
Google Chat Official API Workspace integration
Signal signal-cli Privacy-focused. Requires linked device
BlueBubbles BlueBubbles API iMessage on non-Apple hardware
iMessage Legacy bridge macOS only
Microsoft Teams Bot Framework Enterprise integration
Matrix matrix-js-sdk New official plugin (v2026.3.22) — bot conversations, mention gating, bot-to-bot chat, private networks
IRC IRC protocol Classic chat networks
Feishu Feishu API Popular in China (Lark)
LINE LINE API Popular in Japan/Southeast Asia
Mattermost Mattermost API Self-hosted Slack alternative
Nextcloud Talk NC Talk API Self-hosted communication
Nostr Nostr protocol Decentralized social
Synology Chat Synology API NAS-integrated chat
Twitch IRC (separate plugin) Streaming platform chat — not bundled with core
Zalo Zalo API Popular in Vietnam
WeChat WeChat API Popular in China
WebChat Built-in Browser-based fallback, always available

20+ channels are included natively; additional channels available via community plugins. Full list: run openclaw channels list or visit docs.openclaw.ai/channels.

Multi-Channel Setup

Connect multiple channels simultaneously, each routing to different agent configurations using the bindings system:

{
  agents: {
    list: [
      { id: "home", default: true, workspace: "~/.openclaw/workspace-home" },
      { id: "work", workspace: "~/.openclaw/workspace-work" },
      { id: "private", model: { primary: "ollama/llama3.1:70b" } }
    ]
  },
  channels: {
    whatsapp: { allowFrom: ["+15555550123"] },
    slack: {},
    matrix: {}
  },
  bindings: [
    { agentId: "home", match: { channel: "whatsapp" } },
    { agentId: "work", match: { channel: "slack" } },
    { agentId: "private", match: { channel: "matrix" } }
  ]
}

Skills and ClawHub: 13,700+ Community Skills

What Are Skills?

A skill is a folder containing a SKILL.md file — a markdown document that teaches the AI agent how to perform a specific task. No SDK, no compilation, no special runtime. Just YAML frontmatter plus markdown instructions. Skills live in ~/.openclaw/skills/ (managed) or <project>/skills/ (workspace-scoped).

ClawHub — The Skills Registry

ClawHub (clawhub.ai) is the community skills directory with 13,729+ skills (as of February 2026) across categories:

  • Productivity — Email management, calendar automation, note-taking
  • DevOps — Git operations, CI/CD, server monitoring, deployment
  • Finance — Expense tracking, trading automation, portfolio management
  • Content Creation — Social media repurposing, blog writing, image generation
  • Home Automation — IoT control, smart home routines, weather-based triggers
  • Communication — Auto-replies, message scheduling, translation
  • Development — Code review, documentation, debugging assistance
  • Data — Web scraping, data analysis, report generation
  • Canvas OS — Interactive dashboard apps, prototypes, data visualizations

Installing Skills

Install skills from ClawHub or manage them via the CLI:

# Install from ClawHub
clawhub install daily-standup

# List installed skills
openclaw skills list

# Remove a skill
openclaw skills remove daily-standup

# Update all installed skills
openclaw skills update --all

# Show available tools for the current agent (slash command in chat)
/tools

Writing a Markdown Skill

The simplest skill is just a Markdown file with instructions:

---
name: daily-standup
description: Generate a daily standup update from git commits
---

# Daily Standup Generator

Look at the git log for the last 24 hours in the current project directory.
Summarize what was accomplished, what's in progress, and any blockers.

Format the output as:

**Done:**
- [completed items]

**In Progress:**
- [current work]

**Blockers:**
- [any issues]

Advanced Skills: Plugins with TypeScript

For complex integrations beyond what markdown skills can do, OpenClaw supports plugins — TypeScript modules that register providers, tools, hooks, and channels via the OpenClawPluginApi:

// A plugin registers capabilities via the API
export function register(api: OpenClawPluginApi) {
  // Register a custom tool the agent can use
  api.registerTool({
    name: "price-checker",
    description: "Compare prices across shopping sites",
    // The agent invokes this tool via natural language
    // Browser automation is handled by OpenClaw's built-in browser tool
  });

  // Register hooks for system events
  api.registerHook("onMessage", async (message) => {
    // Custom logic on every incoming message
  });
}

Create a new skill manually:

# Create skill folder and SKILL.md
mkdir -p ~/.openclaw/skills/my-skill
cat > ~/.openclaw/skills/my-skill/SKILL.md << 'EOF'
---
name: my-skill
description: What this skill does
---
# Instructions for the agent
EOF

Most use cases are best served by markdown skills (SKILL.md files). Use TypeScript plugins only when you need custom tool registration, provider integration, or event hooks.


Canvas and A2UI: Agent-Driven Visual Workspace

Canvas is one of OpenClaw's most distinctive features — an agent-controlled visual workspace where the AI renders interactive UI components directly on your device via the A2UI protocol.

What Is Canvas?

Instead of text-only responses, Canvas lets the AI create:

  • Interactive dashboards with live data
  • Visual prototypes and demos
  • Charts and data visualizations
  • Custom internal tools with animations
  • Mini web applications that persist across sessions

A2UI Protocol (v0.8)

A2UI (Agent-to-User Interface) is the protocol that powers Canvas. It uses four message types:

Message Type Purpose
beginRendering Signals the start of a new visual surface
surfaceUpdate Sends declarative UI components to the canvas
dataModelUpdate Updates data without re-rendering the full surface
deleteSurface Removes a visual surface

Platform Support

Platform Implementation Notes
macOS Native WebKit (WKWebView) Borderless, resizable panel anchored near menu bar
iOS SwiftUI component Embedded Canvas view
Android WebView Standard Android WebView rendering
Web Browser tab Canvas opens in the Control UI

Canvas OS

Canvas OS provides an app-platform for building, storing, and running rich HTML/CSS/JS applications inside the Canvas window. Think of it as a mini app store for your AI assistant:

# Install a Canvas OS app
clawhub install canvas-os

# The agent can then build interactive apps:
# "Build me a project tracker dashboard with a Kanban board"
# → Renders a full interactive Kanban board in Canvas

A2UI in Practice: How Messages Look

A2UI uses declarative JSON components in JSONL (one JSON object per line), NOT raw HTML/CSS/JS. Here's what the message flow looks like:

// 1. Define the surface with components
{"surfaceUpdate":{"surfaceId":"main","components":[
  {"id":"root","component":{"Column":{"children":{"explicitList":["title","content"]}}}},
  {"id":"title","component":{"Text":{"text":{"literalString":"Project Metrics"},"usageHint":"h1"}}},
  {"id":"content","component":{"Text":{"text":{"literalString":"Open PRs: 7"},"usageHint":"body"}}}
]}}

// 2. Signal the renderer to display it
{"beginRendering":{"surfaceId":"main","root":"root"}}

// 3. Later, update data without full re-render
{"dataModelUpdate":{"surfaceId":"main","data":{"openPRs":12}}}

// 4. When done, clean up
{"deleteSurface":{"surfaceId":"main"}}

Components are typed (Column, Text, Row, Button, etc.) and rendered natively on each platform — macOS uses WebKit, iOS uses SwiftUI, Android uses WebView. The agent doesn't write HTML directly; it describes UI structure declaratively.

For richer HTML/CSS/JS content (dashboards, charts), use the Canvas OS skill which provides a full HTML rendering surface.

Live Reload

Canvas supports live reload — save a local canvas file and it updates instantly. This makes development fast when building custom Canvas skills.


Device Nodes: Camera, Screen, Location, and Notifications

Device Nodes are companion apps (macOS, iOS, Android) that connect to your Gateway and expose hardware capabilities the AI agent can use.

Available Device Capabilities

Capability Command Platforms What It Does
Camera snap camera.snap macOS, iOS, Android Take a photo and send it to the agent for analysis
Camera clip camera.clip macOS, iOS, Android Record a short video clip
Screen record screen.record macOS Capture screen activity for the agent to review
Location location.get iOS, Android Get current GPS coordinates
Notifications notify macOS, iOS, Android Push a notification to the device

Example: Visual Inventory Check

You (via WhatsApp): "Take a photo of my fridge and suggest recipes
with what's available"

OpenClaw:
→ Triggers camera.snap on your phone's Node
→ Receives the image
→ Analyzes contents via vision model (GPT-4o or Gemini)
→ Returns recipe suggestions based on detected ingredients

Node Architecture

Nodes connect to the Gateway via WebSocket and register their capabilities. The Gateway routes tool calls to the appropriate node:

Gateway (VPS or local)
    ├── macOS Node → shell, browser, screen, camera
    ├── iOS Node → camera, location, notifications
    └── Android Node → camera, location, notifications

This means your AI can take a photo on your phone, process it on a VPS with a powerful model, and send the result back to your WhatsApp — all in one request.


Gateway Reference: Ports, APIs, and Health Checks

The Gateway is OpenClaw's always-on control plane, binding to port 18789 by default.

Default Endpoints

Endpoint Purpose
http://127.0.0.1:18789/ Control UI (web dashboard) — binds to 127.0.0.1 by default for security
http://127.0.0.1:18789/health Health check endpoint
ws://127.0.0.1:18789 WebSocket control plane (CLI, macOS app, web UI connect here)

OpenAI-Compatible API (v2026.3.22)

The Gateway can expose OpenAI-compatible endpoints. These are disabled by default and must be enabled in config:

{
  gateway: {
    http: {
      endpoints: {
        chatCompletions: { enabled: true },
        responses: { enabled: true }
      }
    }
  }
}
Endpoint Purpose Default
/v1/models List available models Enabled
/v1/embeddings Generate embeddings Enabled
/v1/chat/completions Chat completions (with model override support) Disabled
/v1/responses OpenResponses-compatible Disabled

Once enabled, you can point tools like Cursor, Continue, or any OpenAI-compatible client at your local Gateway. All requests require a Bearer token matching your configured gateway token.

Gateway Management Commands

# Start in foreground (useful for debugging)
openclaw gateway --port 18789 --verbose

# Start in foreground in a container
openclaw gateway start --foreground

# Check status
openclaw gateway status

# Open dashboard
openclaw dashboard

# View logs
openclaw logs

Running in Foreground vs Daemon

Mode Command Use Case
Daemon openclaw onboard --install-daemon Production — auto-starts on boot, restarts on crash
Foreground openclaw gateway --verbose Development/debugging — see logs in real time
Container openclaw gateway start --foreground Docker — let the container runtime manage restarts

Docker and Self-Hosting on VPS

# docker-compose.yml
services:
  openclaw:
    image: ghcr.io/openclaw/openclaw:latest
    ports:
      - "18789:18789"
    environment:
      - OPENCLAW_STATE_DIR=/data/openclaw
      - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
    volumes:
      - openclaw-data:/data/openclaw
    restart: unless-stopped

  # Optional: Run Ollama alongside for local models
  ollama:
    image: ollama/ollama:latest
    ports:
      - "11434:11434"
    volumes:
      - ollama-data:/root/.ollama
    deploy:
      resources:
        reservations:
          devices:
            - capabilities: [gpu]

volumes:
  openclaw-data:
  ollama-data:

Note: No version field — it is obsolete in Docker Compose V2+.

Container Commands (v2026.3.22)

The new --container flag lets you run OpenClaw CLI commands inside a running container:

# Run a command inside the OpenClaw container
openclaw --container skills list
openclaw --container doctor
openclaw --container --version

# Or set the environment variable
export OPENCLAW_CONTAINER=true
clawhub install daily-standup

VPS Deployment

A VPS provides 24/7 uptime for the Gateway. Recommended specs:

  • CPU: 2+ vCPUs
  • RAM: 4GB minimum (8GB if running Ollama locally)
  • Storage: 20GB SSD
  • Providers: DigitalOcean ($12/mo), Hetzner ($4.50/mo), Linode ($12/mo)
# On your VPS (Ubuntu 22.04+)
curl -fsSL https://openclaw.ai/install.sh | bash
openclaw onboard --install-daemon

# Secure remote access with Tailscale
curl -fsSL https://tailscale.com/install.sh | sh
tailscale up
# Use OpenClaw's built-in Tailscale integration:
openclaw gateway --tailscale serve
# Now accessible securely within your tailnet
# For public access: openclaw gateway --tailscale funnel --auth password

NAS Support

OpenClaw runs on NAS devices via Docker:

  • Unraid: Community Docker template available (forums.unraid.net)
  • Synology: Deploy via Container Manager with the Docker Compose above

Practical Use Cases and Workflows

1. Email Inbox Management

Tell OpenClaw to process your inbox via WhatsApp:

You: "Check my email and clean up my inbox"

OpenClaw: I'll scan your inbox now...

Found 247 unread emails:
- 180 newsletters/promotions → Archived
- 12 spam → Reported and deleted
- 35 actionable emails → Here's a priority summary:

**Urgent (3):**
1. Client proposal deadline tomorrow
2. Server alert from monitoring
3. Tax document request

Want me to draft replies to any of these?

2. Content Repurposing

Give it a blog post and get platform-specific versions:

You: "Take my latest blog post and create versions for
Twitter, LinkedIn, and Instagram"

OpenClaw: Done! Here's what I prepared:

**Twitter thread (7 tweets):**
1/ AI agents are changing how we build software...

**LinkedIn post:**
[professional tone, longer format]

**Instagram caption:**
[casual tone with relevant hashtags]

Shall I post them or save as drafts?

3. DevOps Automation

Manage deployments from your phone:

You: "Deploy the staging branch to production"

OpenClaw: Running pre-deploy checks...
✓ Tests passing (142/142)
✓ No security vulnerabilities
✓ Build successful

Ready to deploy main → production.
This will affect 3 services. Proceed? (yes/no)

4. Browser Automation

You: "Compare prices for AirPods Pro on Amazon, Best Buy, and Walmart"

OpenClaw: Opening browsers and checking prices...

| Store | Price | In Stock | Shipping |
|-------|-------|----------|----------|
| Amazon | $199.99 | Yes | Free (Prime) |
| Best Buy | $189.99 | Yes | Free |
| Walmart | $194.00 | Yes | Free |

Best Buy has the lowest price at $189.99.
Want me to open the checkout page?

5. Scheduled Workflows (Cron)

You: "Every morning at 8am, check my calendar, summarize today's
meetings, check the weather, and send me a briefing on WhatsApp"

OpenClaw: Done! I've set up a daily cron job:
- Trigger: 8:00 AM daily
- Actions: Calendar check → Weather → Meeting prep → Send briefing
- Channel: WhatsApp

6. Private Document Assistant (Fully Offline with Ollama)

You: "Summarize the contract at ~/Documents/vendor-agreement.pdf
and flag any concerning clauses"

OpenClaw: [processes locally with Ollama — no cloud API calls]

Summary of Vendor Agreement:
- Term: 24 months, auto-renewal
- Payment: Net 30

⚠️ Concerning clauses:
1. Section 4.2: Non-compete extends 2 years post-termination
2. Section 7.1: Unlimited liability for data breaches (no cap)
3. Section 9.3: Vendor can change pricing with 30 days notice

Recommendation: Negotiate items 1 and 2 before signing.

7. Canvas Dashboard (Visual Output)

You: "Build me a real-time dashboard showing my GitHub repo stats"

OpenClaw: [Renders an interactive Canvas dashboard with]:
- Star count graph over time
- Open issues / PRs summary
- Top contributors chart
- Build status indicators
- All updating live via GitHub API

Security, Privacy, and Sandboxing

Privacy Model

OpenClaw is local-first by design:

Aspect How It Works
Data storage All data stays on your device
LLM calls Your API key, direct to the provider (or fully local with Ollama)
No cloud service No OpenClaw servers — the Gateway runs on your machine
No telemetry Open-source, auditable, MIT licensed

DM Pairing and Access Control

When someone messages your connected accounts, OpenClaw doesn't automatically respond to strangers:

  • Pairing mode (default): OpenClaw sends the unknown sender a 6-digit code (expires after 1 hour). You approve via openclaw pairing approve <channel> <CODE>
  • Allowlist: Only users in allowFrom get responses; everyone else is silently dropped
  • Disabled: Ignore all inbound DMs entirely

Sandboxing

For non-main sessions (group chats, shared channels), OpenClaw supports Docker sandboxing:

// Sandbox mode can be configured per-agent or as a default
// "non-main" = personal DM sessions run on host,
// group/channel sessions run in Docker containers

Sandbox modes: "non-main" (default recommended), "always" (all sessions sandboxed), "never" (no sandboxing).

Security Audit

Run the built-in security checker:

openclaw doctor

This scans for: exposed ports, missing authentication, overly permissive tool access, and insecure channel configurations.

Known Vulnerabilities (Patched)

  • CVE-2026-22176 (March 19, 2026): Command injection in Windows Scheduled Task auto-start. Affects all versions before v2026.2.25. Fix: Update to v2026.2.25 or later.

Advanced Configuration and Production Tips

Multi-Agent Routing

Run different agent personalities for different contexts. Each agent gets its own workspace with isolated skills and memory:

{
  agents: {
    list: [
      {
        id: "personal",
        default: true,
        model: { primary: "anthropic/claude-opus-4-6" },
        workspace: "~/.openclaw/workspace-personal"
      },
      {
        id: "work",
        model: { primary: "anthropic/claude-opus-4-6" },
        workspace: "~/.openclaw/workspace-work"
      },
      {
        id: "family",
        model: { primary: "ollama/llama3.1:8b" },
        workspace: "~/.openclaw/workspace-family"
      }
    ]
  },
  bindings: [
    { agentId: "personal", match: { channel: "whatsapp" } },
    { agentId: "work", match: { channel: "slack" } },
    { agentId: "family", match: { channel: "telegram" } }
  ]
}

Install different skills per workspace by switching into each workspace directory and running clawhub install.

Voice Wake and Talk Mode

On macOS, iOS, and Android, OpenClaw supports voice interaction via Talk Mode. Requires an ElevenLabs API key for text-to-speech:

  • Voice Wake: Wake word detection on macOS/iOS triggers listening
  • Talk Mode: Continuous voice conversation — listens (Whisper STT) → processes with AI → speaks response (ElevenLabs TTS)
  • Push-to-Talk: Hold a key/button to speak (macOS menu bar app)
  • Interrupt: If you start talking while the assistant is speaking, playback stops automatically

Bundled Web Search (v2026.3.22)

Exa, Tavily, and Firecrawl are now built into OpenClaw. Previously, web search required installing separate skills. Now enable search out of the box by configuring an API key for any of these providers.

Performance Tips

Tip Why
Use pnpm over npm Faster installs, better disk usage
Pin your Node.js version Avoids compatibility issues (use nvm)
Run Gateway as a daemon Auto-restarts on crash, starts on boot
Use Tailscale for remote access Zero-config, encrypted, no port forwarding
Limit tools for group sessions Reduces attack surface
Enable Docker sandboxing Isolates untrusted sessions
Use Haiku for simple queries 5-10x cheaper than Opus for basic tasks

Useful Commands

# Gateway management
openclaw gateway --port 18789 --verbose    # Start in foreground
openclaw gateway status                     # Check if running
openclaw dashboard                          # Open Control UI

# Container operations (v2026.3.22)
openclaw --container skill list             # Run in Docker container
OPENCLAW_CONTAINER=true openclaw doctor     # Audit container config

# Agent interaction
openclaw agent --message "Ship checklist" --thinking high

# Skills
clawhub install <skill-name>                # Install from ClawHub
openclaw skills list                        # List installed
openclaw skills remove <skill-name>         # Remove
# /tools in chat to see available tools

# Security
openclaw doctor                             # Audit configuration

# Diagnostics
openclaw logs                               # View recent logs
openclaw --version                            # Check version

OpenClaw vs ChatGPT, AutoGPT, and CrewAI

Feature OpenClaw ChatGPT/Claude Web AutoGPT CrewAI
Where it runs Your device (self-hosted) Cloud servers Your device Your device (Python)
Interface 20+ messaging apps Browser tab Terminal/web UI Python code
Execute commands Yes — shell, files, browser, cron No Yes (limited) Yes (via tools)
Messaging integration 20+ native + community plugins None None None
Skills ecosystem 13,700+ on ClawHub GPTs (cloud) Plugins (limited) Custom tools
Visual output Canvas (A2UI) Web UI only Terminal None
Local models Ollama, 20+ providers No Yes Yes
Setup time 2 minutes (one command) Sign up 15+ minutes Python knowledge needed
Cost Free + LLM API costs $20-200/month subscription Free + API costs Free + API costs
GitHub Stars 335,000+ N/A 170,000+ 25,000+

Key Philosophical Difference

  • ChatGPT/Claude: "What can I answer for you?" — Cloud chat interface for conversations
  • AutoGPT: "What can AI reason through?" — Autonomous task completion via reasoning loops
  • OpenClaw: "What do people actually need done?" — Practical agent in your messaging apps that takes real actions on your computer

OpenClaw's unique advantage is its messaging-first architecture. Instead of opening a separate app, you text your AI assistant in WhatsApp, Slack, or Discord — the same apps you already have open all day.


Troubleshooting Common Issues

Canvas "bridge: missing" Error

This occurs when the Canvas WebView can't connect to the Gateway:

# Check if the Gateway is running
openclaw gateway status

# If running, verify the port matches
# Canvas expects ws://127.0.0.1:18789 by default
openclaw gateway --port 18789 --verbose

# On iOS/Android, ensure the device node is connected to the same network

Gateway Health Shows Offline

# Check if the port is in use
lsof -i :18789  # macOS/Linux
netstat -ano | findstr :18789  # Windows

# Restart the gateway
openclaw gateway stop
openclaw gateway start

# Check logs for errors
openclaw logs

Environment Variables Not Loading

Remember the "never override" rule — the first value found wins:

# Debug: check what OpenClaw sees
openclaw gateway status  # Shows config paths and resolved env info

# Common mistake: setting vars in .env but also in shell
# Shell env always wins over .env files

CLAWDBOT_/MOLTBOT_ Variables No Longer Work

As of v2026.3.22, all legacy prefixes are removed:

# Search and replace in your .env
sed -i 's/CLAWDBOT_/OPENCLAW_/g' ~/.openclaw/.env
sed -i 's/MOLTBOT_/OPENCLAW_/g' ~/.openclaw/.env

Node.js Version Issues

OpenClaw requires Node.js 22.14+:

# Check your version
node --version

# If below v22, update via nvm
nvm install 24  # Recommended; minimum is 22.14
nvm use 24

# Or via the official installer
# https://nodejs.org

Skill Install Failures

# Check Node package manager availability
clawhub install <name> --verbose

# If using pnpm, ensure it's installed
npm install -g pnpm

# Clear skill cache and retry
rm -rf ~/.openclaw/skills/<skill-name>
clawhub install <skill-name>

Gateway Start --foreground Unknown Option

If you see "unknown option" for --foreground, you may be on an older version:

# Check version
openclaw --version

# Update to latest
openclaw update

What Does OpenClaw Actually Cost to Run?

OpenClaw itself is free (MIT license). Your costs come from LLM API usage and optional infrastructure.

Monthly Cost Estimates

Usage Level Model Messages/Day Estimated Monthly Cost
Light personal Claude Haiku 4.5 20-50 $5-$15
Active personal Claude Sonnet 4.6 50-100 $20-$60
Power user Claude Opus 4.6 100-200 $50-$150
Fully local (Ollama) Llama 3.1 70B Unlimited $0 (electricity only)
Team (5 users) Claude Sonnet 4.6 500+ $100-$300

Assumes ~2,000 input tokens and ~500 output tokens per message on average. Actual costs depend on message complexity, tool usage, and model choice.

Infrastructure Costs (Optional)

Setup Monthly Cost When You Need It
Run on your laptop $0 Personal use, always at your desk
VPS (Hetzner CX22) ~$4.50/month 24/7 uptime, remote access
VPS (DigitalOcean) ~$12/month More RAM for Ollama
VPS + GPU (for local models) ~$50-100/month Running 70B models locally on cloud

Cost Optimization Tips

  • Use Haiku ($1/$5 per M tokens) for simple queries, Opus ($5/$25) only for complex reasoning
  • Enable prompt caching — cache hits cost 10% of standard input price6
  • Use batch mode for non-urgent tasks (50% API discount)
  • Run Ollama locally for privacy-sensitive or high-volume workloads ($0 API cost)
  • Set per-agent model routing: cheap model for Telegram family chat, powerful model for work Slack

Cron Jobs and Webhook Configuration

Cron: Scheduled Automations

OpenClaw's cron system lets you schedule recurring tasks. Jobs are stored at ~/.openclaw/cron/jobs.json and managed via the CLI or by asking your agent directly.

Create a cron job via conversation:

You: "Every morning at 8am, check my calendar, get the weather,
summarize my emails, and send me a briefing on WhatsApp"

OpenClaw: Done! Created cron job "morning-briefing":
- Schedule: 0 8 * * * (daily at 8:00 AM)
- Actions: Calendar → Weather → Email summary → WhatsApp briefing

Cron configuration in openclaw.json:

{
  cron: {
    enabled: true,
    store: "~/.openclaw/cron/jobs.json",
    maxConcurrentRuns: 1,
    retry: {
      maxAttempts: 3,
      backoffMs: [60000, 120000, 300000],
      retryOn: ["rate_limit", "overloaded", "network", "server_error"]
    }
  }
}

Schedule types: Jobs support three schedule kinds:

  • cron — 5-field cron expression (e.g., "0 8 * * *") with optional tz for timezone
  • every — interval in milliseconds (e.g., 1800000 for every 30 minutes)
  • at — one-time execution at a specific timestamp

Webhooks: Event-Driven Automations

Cron jobs can deliver results via webhook. Configure per-job with delivery.mode = "webhook":

// Per-job webhook delivery
{
  delivery: {
    mode: "webhook",
    to: "https://your-server.com/openclaw-callback"
  }
}

You can also set a global webhook token in the cron config:

{
  cron: {
    webhook: "https://example.com/openclaw-events",
    webhookToken: "your-dedicated-webhook-token"
    // Sent as: Authorization: Bearer <webhookToken>
  }
}

Note: Jobs persist on disk at ~/.openclaw/cron/jobs.json. The gateway loads this file into memory and writes back on changes. Manual editing is only safe when the gateway is stopped.


OpenClaw CLI Cheat Sheet

Quick reference for the most commonly used commands. Bookmark this section.

Installation & Setup

# Install (macOS/Linux)
curl -fsSL https://openclaw.ai/install.sh | bash

# Install (Windows PowerShell as Admin)
iwr -useb https://openclaw.ai/install.ps1 | iex

# Install via npm
npm install -g openclaw@latest

# Interactive setup wizard
openclaw onboard --install-daemon

# Update to latest (auto-detects install type, runs doctor, restarts gateway)
openclaw update

Gateway Management

openclaw gateway status                  # Is it running?
openclaw gateway --port 18789 --verbose  # Start in foreground (debug)
openclaw gateway stop                    # Stop the gateway
openclaw dashboard                       # Open Control UI in browser
openclaw logs                            # View recent logs
openclaw --version                         # Check installed version

Skills

clawhub install <name>                   # Install from ClawHub
openclaw skills list                     # List installed skills
openclaw skills remove <name>            # Uninstall a skill
openclaw skills update --all             # Update all skills
# /tools                                # Show available tools (slash command in chat)

Agent Interaction

openclaw agent --message "Your prompt"   # Send a message
openclaw agent --message "Complex task" --thinking high  # Deep reasoning
openclaw message send --channel whatsapp --target +1234567890 --message "Hello"

Security & Diagnostics

openclaw doctor                          # Security audit
openclaw gateway status                  # Shows config paths and env info

Docker / Container

# Run in Docker
docker run -d --name openclaw -p 18789:18789 \
  -v ~/.openclaw:/root/.openclaw ghcr.io/openclaw/openclaw:latest

# Run commands inside container (v2026.3.22+)
openclaw --container skill list
openclaw --container doctor

Profile Management

openclaw --profile personal gateway      # Start with named profile
openclaw --profile work gateway          # Isolated state directory

Getting Started

Ready to set up your own AI assistant? Here's the path:

  1. Install OpenClaw: Run the one-liner install script for your platform
  2. Run onboarding: openclaw onboard --install-daemon walks you through everything
  3. Connect WhatsApp or Telegram: Start with one channel you use daily
  4. Try basic commands: Ask it to check your calendar, summarize a file, or search the web
  5. Install skills: Browse clawhub.ai and install skills for your workflows
  6. Set up automations: Create cron jobs for recurring tasks
  7. Try Canvas: Ask the agent to build you an interactive dashboard
  8. Add more channels: Connect Slack for work, Discord for communities
  9. Go advanced: Set up multi-agent routing, Docker sandboxing, or remote server deployment

OpenClaw turns your messaging apps into a command center. Instead of switching between a dozen browser tabs and tools, you type what you need in WhatsApp and your AI assistant handles the rest — on your hardware, with your data, under your control.


Footnotes

  1. OpenClaw official blog, "250,000 Stars: OpenClaw Surpasses React as GitHub's Most-Starred Software Project" (March 2026). Growth rate: 60,000 stars in 72 hours at launch; surpassed React on March 3, 2026.

  2. OpenClaw GitHub repository (github.com/openclaw/openclaw). Stars: 335,000+, Contributors: 1,100+, Forks: 57,000+ as of March 24, 2026.

  3. ClawHub skills registry (clawhub.ai). Count as of February 28, 2026: 13,729 community-built skills.

  4. Yahoo Finance / OpenClaw blog. Peter Steinberger announced joining OpenAI on February 14, 2026; project moving to open-source foundation.

  5. OpenClaw v2026.3.22 release notes. 45+ new features, 13 breaking changes, 82 bug fixes, 20+ security patches, 15 performance improvements.

  6. Anthropic Claude API Pricing (March 2026). Prompt cache hits cost 10% of standard input price. 5-minute cache: 1.25x write cost; 1-hour cache: 2x write cost.

Share this guide

Frequently Asked Questions

OpenClaw is a free, open-source, self-hosted personal AI assistant with 335,000+ GitHub stars — the fastest-growing open-source project in history. It runs on your own devices, connects to 20+ messaging platforms natively (WhatsApp, Telegram, Slack, Discord, and more), and can execute real tasks: shell commands, file management, browser automation, cron jobs, and workflows. It uses any LLM (Claude, GPT-4, Gemini, or local models via Ollama) and has 13,700+ community skills on ClawHub.

Related Articles

FREE WEEKLY NEWSLETTER

Stay on the Nerd Track

One email per week — courses, deep dives, tools, and AI experiments.

No spam. Unsubscribe anytime.