OpenClaw is a self-hosted gateway that connects your chat apps to AI coding agents. Here's how to get it running.
Prerequisites
Step 1: Install OpenClaw
npm install -g openclaw
Step 2: Configure
openclaw configure
This wizard walks you through setting your API key, choosing a model, and basic channel setup. Config is stored at `~/.openclaw/openclaw.json`.
Step 3: Start the Gateway
openclaw gateway start
The gateway bridges your chat apps to the AI agent. Default port: 18789.
Step 4: Open the Dashboard
Visit **http://127.0.0.1:18789/** to see the Control UI with session monitoring, logs, and channel management.
Step 5: Connect a Channel
openclaw channels
Follow prompts for Telegram (bot token from @BotFather), WhatsApp (QR code scan), Discord, or iMessage.
Step 6: Chat!
Message your bot from any connected channel. You now have a personal AI assistant accessible from your phone.
Running as a Service
For always-on operation:
systemctl --user enable --now openclaw