OpenClaw: A Self-Hosted Multi-Channel Personal AI Assistant
Learn how to set up OpenClaw, a self-hosted AI gateway that connects WhatsApp, Telegram, Discord, Slack, and 20+ other channels to your personal AI assistant. Full control, no cloud lock-in.
OpenClaw: A Self-Hosted Multi-Channel Personal AI Assistant
Introduction
Imagine having an AI assistant you can reach from anywhereβWhatsApp, Telegram, Discord, even iMessageβwithout depending on expensive cloud services or sacrificing data privacy. OpenClaw is the solution.
OpenClaw is a self-hosted gateway that bridges your favorite chat apps with an AI assistant. You run one Gateway process on your own machine (laptop, VPS, or Raspberry Pi), and it becomes the bridge between messaging apps and an always-available AI assistant.
π¦ EXFOLIATE! EXFOLIATE! β The space lobster motto
Why is OpenClaw different?
- Self-hosted: Runs on your hardware, your rules apply
- Multi-channel: One Gateway serves WhatsApp, Telegram, Discord, Slack, Signal, and 20+ other channels simultaneously
- Agent-native: Built for AI agents with tool use, sessions, memory, and multi-agent routing
- Open source: MIT licensed, community-driven
- No vendor lock-in: Choose any model and provider you want
Interesting fact: OpenClaw supports more channels than most commercial AI assistantsβand you have full control over all of it.
Prerequisites
Before you begin, make sure you have:
- Node.js 22+ (Node 24 recommended)
- API key from your preferred provider (OpenAI, Anthropic, or others)
- Terminal/CLI access
- 5 minutes for basic setup
Supported Platforms
- Desktop OS: macOS, Linux, Windows (via WSL2)
- Mobile: iOS app, Android app (companion nodes)
- Server: VPS, Raspberry Pi, or any machine that can run Node
Core Concepts
OpenClaw Architecture
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β MESSAGING CHANNELS β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€ β WhatsApp β Telegram β Discord β Slack β Signal β iMessage β β Google Chat β IRC β Matrix β Teams β LINE β Mattermost β ... β ββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββ β βΌ βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β OPENCLAW GATEWAY β β (Control Plane) β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€ β β’ Session Management β’ Channel Routing β β β’ Multi-Agent Support β’ Message Streaming β β β’ Tool Orchestration β’ Presence & Typing β β β’ Security & Auth β’ Cron & Automation β ββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββ β ββββββββββββββββββββΌβββββββββββββββββββ β β β βΌ βΌ βΌ βββββββββββββββββ βββββββββββββββββ βββββββββββββββββ β PI AGENT β β CLI / Web β β MOBILE APPS β β (AI Runtime) β β Control UI β β iOS / Androidβ βββββββββββββββββ βββββββββββββββββ βββββββββββββββββ
Main Components
1. Gateway A single control plane for all operations. Handles session management, channel connections, routing, and tool orchestration.
2. Pi Agent An AI runtime that processes messages and runs tools. Supports streaming responses for long output.
3. Channels Connectors to various messaging platforms. Each channel has its own configuration but is coordinated by the Gateway.
4. Skills "Instructions" that teach the agent how to use tools. AgentSkills-compatible format.
5. Nodes Companion apps for iOS and Android. Add camera, voice, canvas, and device command capabilities.
Session Model
- Main Session: Direct messages collapse into one session per user
- Group Sessions: Isolated per group with mention-based activation
- Multi-Agent: Route different channels/accounts to isolated agents with separate workspaces
Step-by-Step: OpenClaw Installation
Method 1: Quick Install (Recommended)
macOS/Linux:
curl -fsSL https://openclaw.ai/install.sh | bash
Windows (PowerShell):
iwr -useb https://openclaw.ai/install.ps1 | iex
Method 2: NPM Global Install
npm install -g openclaw@latest
Or with pnpm/bun:
pnpm add -g openclaw@latest # or bun add -g openclaw@latest
Method 3: From Source
For development or custom builds:
git clone https://github.com/openclaw/openclaw.git cd openclaw pnpm install pnpm build pnpm openclaw onboard --install-daemon
Step-by-Step: Onboarding & Setup
1. Run the Onboarding Wizard
openclaw onboard --install-daemon
This wizard will:
- Set up auth configuration
- Configure gateway settings
- Optional: set up channels
- Install gateway as a system service (launchd/systemd)
2. Verify Gateway Status
openclaw gateway status
If the service is running, the output will show status and port.
3. Open Control UI
openclaw dashboard
Or directly open your browser at http://127.0.0.1:18789/
4. Test with the Agent
openclaw agent --message "Hello, introduce yourself!"
Step-by-Step: Connect Channels
# Log in and scan QR code openclaw channels login whatsapp # Pairing for DM security openclaw pairing approve +1234567890
Additional configuration (optional):
{ channels: { whatsapp: { allowFrom: ["+1234567890", "+1987654321"], groups: { "*": { requireMention: true } } } } }
Telegram
- Create a bot via @BotFather on Telegram
- Copy the bot token
- Configure it in OpenClaw:
openclaw config set channels.telegram.botToken YOUR_BOT_TOKEN
Or in the config file:
{ channels: { telegram: { botToken: "YOUR_BOT_TOKEN_HERE" } } }
Discord
- Create a bot in the Discord Developer Portal
- Enable Message Content Intent
- Invite the bot to your server
- Configure:
{ channels: { discord: { botToken: "YOUR_DISCORD_BOT_TOKEN", dmPolicy: "pairing" // or "open" for public } } }
Slack
- Create a Slack App
- Enable Socket Mode
- Add OAuth scopes:
app_mentions:read,chat:write,channels:history - Install to workspace
- Configure:
{ channels: { slack: { appToken: "xapp-...", botToken: "xoxb-...", dmPolicy: "pairing" } } }
Step-by-Step: Multi-Agent Routing
One of OpenClawβs powerful features is the ability to route different channels to isolated agents.
Scenario: Personal + Work Agents
{ agents: { personal: { workspace: "~/.openclaw/workspace-personal", channels: ["telegram", "whatsapp"] }, work: { workspace: "~/.openclaw/workspace-work", channels: ["slack", "discord"], model: "claude-sonnet-4" } } }
Result:
- Telegram/WhatsApp messages β Personal agent with personal context
- Slack/Discord messages β Work agent with work context
- Each has separate memory, skills, and config
Deep Dive: Skills System
What Are Skills?
Skills are "instructions" that teach the agent how to use tools. AgentSkills-compatible format with YAML frontmatter.
Skill Structure
skills/ βββ my-awesome-skill/ βββ SKILL.md # Main instruction file βββ references/ # Optional reference docs βββ scripts/ # Optional helper scripts
SKILL.md Format
--- name: weather-checker description: Check weather for any location metadata: { "openclaw": { "emoji": "π€οΈ", "requires": { "env": ["OPENWEATHER_API_KEY"] } } } --- # Weather Checker Skill When the user asks about weather: 1. Use the `web_fetch` tool to call OpenWeather API 2. Parse the response for temperature, humidity, and conditions 3. Present the information in a friendly format Example API call: https://api.openweathermap.org/data/2.5/weather?q={city}&appid={api_key}
Skill Locations & Precedence
- Bundled skills: Shipped with OpenClaw install
- Managed skills:
~/.openclaw/skills - Workspace skills:
<workspace>/skills(highest precedence)
ClawHub - Skills Registry
Browse and install skills from clawhub.com:
# Install skill clawhub install weather-forecaster # Update all skills clawhub update --all
Deep Dive: Security & Pairing
DM Pairing (Default)
For channels with DM support, OpenClaw uses a pairing system:
- Unknown sender sends a message
- Bot replies with a pairing code
- Owner approves:
openclaw pairing approve <sender> - Sender is added to allowlist
Configuration Options
{ channels: { telegram: { dmPolicy: "pairing", // "pairing" | "open" allowFrom: ["*"] // "*" = allow all (only if dmPolicy="open") } } }
Security Checklist
# Run security audit openclaw doctor # Check DM policies openclaw config check dm-policies
Best Practices:
- Keep
dmPolicy: "pairing"for personal use - Use
requireMention: truefor groups - Regularly review pairing allowlist
- Never expose Gateway to the public internet without auth
Deep Dive: Mobile Nodes
iOS Node
Features:
- Voice Wake: "Hey Claw" wake word activation
- Talk Mode: Continuous voice conversation
- Canvas: Agent-controlled visual workspace
- Camera: Snap photos and screen recording
- Location: Share location with the agent
Setup:
- Install OpenClaw app from the App Store
- Scan the QR code from Gateway or enter setup code manually
- Grant necessary permissions
Android Node
Features:
- Connect Tab: Setup code pairing
- Chat Sessions: Direct chat with the agent
- Voice Tab: Voice conversation
- Canvas: Visual workspace
- Device Commands: Notifications, SMS, contacts, calendar, photos
Setup:
- Install OpenClaw app from Play Store
- Open Connect tab
- Enter setup code or scan QR
Advanced: Voice & Talk Mode
Voice Wake (macOS/iOS)
Configure wake word detection:
{ nodes: { voicewake: { enabled: true, keyword: "hey claw", sensitivity: 0.5 } } }
Talk Mode
Continuous voice conversation without wake word on every turn:
# Via CLI openclaw talk --mode continuous # Via config
{ nodes: { talk: { enabled: true, ttsProvider: "elevenlabs", // or "system" sttProvider: "whisper" } } }
Advanced: Canvas & A2UI
Canvas is an agent-driven visual workspace. The agent can push UI elements that you control.
How It Works
- Agent calls
canvas.present()with UI definition - Canvas renders in macOS/iOS/Android app
- User interacts with UI
- Events are sent back to agent
Example: Dashboard UI
The agent can create a dashboard like:
canvas.present({ type: "dashboard", widgets: [ { type: "weather", location: "Surabaya" }, { type: "tasks", filter: "today" }, { type: "calendar", days: 7 } ] })
Advanced: Cron & Automation
Cron Jobs
Schedule automated tasks:
{ cron: { jobs: [ { id: "morning-briefing", schedule: "0 7 * * *", action: "agent", message: "Give me a morning briefing with weather and calendar" }, { id: "backup-check", schedule: "0 2 * * 0", // Sunday 2 AM action: "exec", command: "/scripts/check-backups.sh" } ] } }
Webhooks
Receive external events:
{ webhooks: { entries: [ { path: "/github", secret: "your-webhook-secret", handler: "skills/github-webhook" } ] } }
Advanced: Remote Access
Tailscale Integration
Secure remote access via Tailscale:
{ gateway: { tailscale: { mode: "serve" // "off" | "serve" | "funnel" } } }
- serve: Tailnet-only access
- funnel: Public HTTPS (requires password auth)
SSH Tunnel
Alternative remote access:
# Create tunnel ssh -R 18789:127.0.0.1:18789 user@your-server # Or use autossh for persistent tunnel autossh -M 0 -f -T -N -R 18789:127.0.0.1:18789 user@your-server
Advanced: Docker Deployment
FROM node:24-alpine WORKDIR /app # Install OpenClaw RUN npm install -g openclaw@latest # Create config directory RUN mkdir -p /root/.openclaw # Copy config COPY openclaw.json /root/.openclaw/ # Expose port EXPOSE 18789 # Run gateway CMD ["openclaw", "gateway", "--port", "18789"]
docker-compose.yml:
version: '3.8' services: openclaw: build: . ports: - "18789:18789" volumes: - ./openclaw.json:/root/.openclaw/openclaw.json - openclaw-data:/root/.openclaw restart: unless-stopped volumes: openclaw-data:
Best Practices
1. Use Strong Models
For best quality and lower prompt-injection risk, use the strongest model available.
2. Configure Proper Pairing
Do not open DM policy to the public unless it is truly required. The pairing system exists for security reasons.
3. Use Workspace Isolation
For different use cases (personal vs work), use separate workspaces with isolated agents.
4. Monitor Token Usage
Use the /status command or Control UI to monitor usage and costs.
5. Regular Updates
openclaw update --channel stable openclaw doctor # Check health
6. Backup Configuration
# Backup config directory tar -czf openclaw-backup.tar.gz ~/.openclaw/ # Restore tar -xzf openclaw-backup.tar.gz -C ~/
Common Mistakes
β Mistake 1: Exposing Gateway Without Auth
# DON'T DO THIS openclaw gateway --bind 0.0.0.0
Solution: Use Tailscale or SSH tunnel for remote access.
β Mistake 2: Opening DM Policy to Public
{ channels: { telegram: { dmPolicy: "open", allowFrom: ["*"] // DANGEROUS for public bots without filtering } } }
Solution: Use dmPolicy: "pairing" or implement custom filtering logic.
β Mistake 3: Not Running Doctor
Solution: Run openclaw doctor regularly to catch issues early.
β Mistake 4: Ignoring Skill Security
Solution: Read skill code before enabling it. Treat third-party skills as untrusted code.
Troubleshooting
Gateway Won't Start
# Check logs openclaw gateway --verbose # Check port conflict lsof -i :18789 # Reset config openclaw config reset
Channel Connection Issues
# Re-login openclaw channels login whatsapp # Check channel status openclaw channels status
Agent Not Responding
# Check agent logs openclaw agent --message "test" --verbose # Verify model config openclaw config check models
Memory Issues
# Check session size openclaw sessions list --verbose # Prune old sessions openclaw sessions prune --older-than 7d
Summary & Next Steps
Key Takeaways
- OpenClaw = Self-hosted Gateway - Full control, no cloud dependency
- Multi-Channel - 20+ messaging platforms from one Gateway
- Agent-Native - Built for AI with tools, memory, and sessions
- Secure by Default - Pairing system, allowlists, and sandbox options
- Extensible - Skills system to add capabilities
Supported Channels (20+)
WhatsApp, Telegram, Discord, Slack, Signal, iMessage, BlueBubbles, IRC, Microsoft Teams, Matrix, Feishu, LINE, Mattermost, Nextcloud Talk, Nostr, Synology Chat, Tlon, Twitch, Zalo, Zalo Personal, WebChat
Next Steps
- Install OpenClaw and run the onboarding wizard
- Connect your favorite channel (WhatsApp, Telegram, etc.)
- Explore the Control UI for chat, config, and sessions
- Install skills from ClawHub
- Set up mobile nodes for smartphone access
- Join the community on Discord
References
- Website: https://openclaw.ai
- Documentation: https://docs.openclaw.ai
- GitHub: https://github.com/openclaw/openclaw
- ClawHub (Skills): https://clawhub.com
- Discord Community: https://discord.gg/clawd
- License: MIT
OpenClaw is built by the community, for the community. EXFOLIATE! π¦