Skip to content

Getting Started with OpenClaw

Welcome to OpenClaw! This guide will help you get your multi-platform AI gateway running in minutes.

Before you begin, make sure you have:

  • Node.js 22+ - Required runtime
  • npm or pnpm - Package manager
  • One or more messaging platforms - WhatsApp, Telegram, Discord, or iMessage (macOS)
Section titled “Method 1: Global npm Install (Recommended)”

The easiest way to install OpenClaw globally on your system:

Terminal window
# Install OpenClaw globally
npm install -g openclaw@latest
# Or using pnpm
pnpm add -g openclaw@latest

For developers or custom builds:

Terminal window
# Clone the repository
git clone https://github.com/openclaw/openclaw.git
cd openclaw
# Install dependencies
pnpm install
# Build the project
pnpm build
# Build UI components
pnpm ui:build

The onboarding wizard configures OpenClaw for your environment:

Terminal window
# Run onboarding and install as a service
openclaw onboard --install-daemon

The wizard will:

  • Create configuration files
  • Set up the system service (launchd/systemd)
  • Generate security tokens
  • Configure default settings

The Gateway is the core component that manages all connections:

Terminal window
# Start the Gateway (if not running as a service)
openclaw gateway --port 18789

If installed as a service, the Gateway starts automatically.

Terminal window
# Login to WhatsApp Web (shows QR code)
openclaw channels login whatsapp
# Scan the QR code with WhatsApp on your phone
Terminal window
# Create a bot at https://t.me/BotFather
# Get your bot token and add it to config:
openclaw config set channels.telegram.botToken YOUR_BOT_TOKEN
Terminal window
# Create a Discord application at https://discord.com/developers/applications
# Get your bot token and add it to config:
openclaw config set channels.discord.botToken YOUR_BOT_TOKEN
Terminal window
# iMessage works with the local imsg CLI
# No additional setup required
Terminal window
# Check if Gateway is running
openclaw gateway status
# View active connections
openclaw gateway connections

Access the web dashboard at: http://127.0.0.1:18789/

From the dashboard you can:

  • Monitor active channels
  • Configure settings
  • View message logs
  • Manage agent connections
Terminal window
# Send a test message (replace with actual phone number)
openclaw message send --target +15555550123 --message "Hello from OpenClaw!"

OpenClaw configuration is stored at ~/.openclaw/openclaw.json.

{
channels: {
whatsapp: {
allowFrom: ["+15555550123"], // Allowed phone numbers
groups: { "*": { requireMention: true } } // Group chat settings
},
telegram: {
botToken: "YOUR_BOT_TOKEN"
}
},
messages: {
groupChat: {
mentionPatterns: ["@openclaw"] // Trigger patterns
}
}
}

OpenClaw uses the Pi agent by default in RPC mode:

{
agents: {
default: {
type: "pi",
rpc: {
host: "127.0.0.1",
port: 8080
}
}
}
}

Gateway won’t start

Terminal window
# Check logs
openclaw gateway logs
# Verify configuration
openclaw config validate

WhatsApp connection fails

  • Ensure WhatsApp Web is not active elsewhere
  • Check network connectivity
  • Try re-scanning QR code

Permission errors

  • Make sure user has sufficient permissions
  • Consider running in Docker for isolation

Congratulations! You now have OpenClaw running and ready to bridge your messaging platforms to AI agents. 🦞