OpenClaw Deployment & Installer
Skill by ara.so — Hermes Skills collection.
OpenClawInstaller is a one-click deployment tool for OpenClaw (aka ClawdBot), a private AI assistant with persistent memory, proactive messaging, and multi-channel support. It supports Anthropic Claude, OpenAI GPT, Google Gemini, and local models via Ollama. Messaging integrations include Telegram, Discord, WhatsApp, Slack, WeChat, iMessage (macOS), and Feishu.
Installation
One-Click Install (Recommended)
curl -fsSL https://raw.githubusercontent.com/miaoxworld/OpenClawInstaller/main/install.sh | bash
This script:
- Detects system environment and installs dependencies
- Installs Node.js v22+ (if needed)
- Installs OpenClaw via npm
- Runs onboarding wizard for AI model and identity configuration
- Tests API connectivity
- Auto-starts the OpenClaw Gateway service
- Optionally opens configuration menu for channel setup
Manual Installation
# Clone repository
git clone https://github.com/miaoxworld/OpenClawInstaller.git
cd OpenClawInstaller
# Add execute permissions
chmod +x install.sh config-menu.sh
# Run installer
./install.sh
# If permission issues on macOS, install OpenClaw first
npm install -g openclaw
Desktop Manager (GUI Alternative)
For graphical interface, use OpenClaw Manager (Tauri 2.0 + React + Rust):
- Download: github.com/miaoxworld/openclaw-manager
- Cross-platform: macOS, Windows, Linux
- Features: real-time monitoring, visual config, service management
System Requirements
- OS: macOS 12+, Ubuntu 20.04+, Debian 11+, CentOS 8+
- Node.js: v22 or higher
- Memory: 2GB minimum, 4GB+ recommended
- Disk: 1GB minimum
Core Commands
Service Management
# Start service (background daemon)
openclaw gateway start
# Stop service
openclaw gateway stop
# Restart service
openclaw gateway restart
# Check service status
openclaw gateway status
# Run in foreground (debugging)
openclaw gateway
# View logs
openclaw logs
# Follow logs in real-time
openclaw logs --follow
Configuration Management
# Open configuration file
openclaw config
# Run onboarding wizard
openclaw onboard
# Diagnose configuration issues
openclaw doctor
# Health check
openclaw health
# Set configuration values
openclaw config set <key> <value>
# Set model
openclaw models set <provider> <model>
Data Management
# Export conversation history
openclaw export --format json
# Clear memory
openclaw memory clear
# Backup data
openclaw backup
Configuration Menu (Interactive)
# Run configuration menu from installation directory
bash ~/.openclaw/config-menu.sh
# Or download and run directly
curl -fsSL https://raw.githubusercontent.com/miaoxworld/OpenClawInstaller/main/config-menu.sh | bash
AI Model Configuration
Supported Providers
- Anthropic Claude: claude-sonnet-4-5, claude-opus-4-5, claude-haiku-4-5 (supports custom API base URL)
- OpenAI GPT: gpt-4o, gpt-4o-mini, gpt-4-turbo (supports custom API base URL with
v1/responsessupport) - Google Gemini: gemini-2.0-flash, gemini-1.5-pro, gemini-1.5-flash
- OpenRouter: Multi-model gateway (claude-sonnet-4, gpt-4o, gemini-pro-1.5)
- Groq: llama-3.3-70b-versatile, llama-3.1-8b-instant, mixtral-8x7b
- Mistral AI: mistral-large-latest, mistral-small-latest, codestral-latest
- Ollama: Local deployment (llama3, mistral, etc.)
Anthropic Claude Setup
# Environment variables (stored in ~/.openclaw/env)
export ANTHROPIC_API_KEY="your-api-key-here"
export ANTHROPIC_BASE_URL="https://custom-api-endpoint.com" # Optional
# Configure via CLI
openclaw models set anthropic claude-sonnet-4-5-20250929
OpenAI GPT Setup
⚠️ Important: Custom OpenAI API endpoints must support Responses API (v1/responses), not just Chat Completions (v1/chat/completions).
# Environment variables
export OPENAI_API_KEY="your-api-key-here"
export OPENAI_BASE_URL="https://custom-api-endpoint.com/v1" # Optional
# Configure via CLI
openclaw models set openai gpt-4o
Custom Provider Configuration
For custom API endpoints (e.g., OneAPI, NewAPI), the installer creates a custom provider in ~/.openclaw/openclaw.json:
{
"models": {
"providers": {
"anthropic-custom": {
"baseUrl": "https://your-api-proxy.com",
"apiKey": "${ANTHROPIC_API_KEY}",
"models": [
{
"id": "claude-sonnet-4-5-20250929",
"name": "claude-sonnet-4-5-20250929",
"api": "anthropic-messages",
"input": ["text"],
"contextWindow": 200000,
"maxTokens": 8192
}
]
}
}
}
}
Ollama (Local Model) Setup
# Install Ollama first: https://ollama.ai
ollama pull llama3
# Configure OpenClaw
openclaw models set ollama llama3
Messaging Channel Configuration
Telegram Bot
- Create bot with BotFather:
# In Telegram, message @BotFather
/newbot
# Follow prompts, get Bot Token
- Get your User ID:
# Message @userinfobot
# Copy your User ID
- Configure via menu or manually edit
~/.openclaw/openclaw.json:
{
"telegram": {
"token": "123456789:ABCdefGHIjklMNOpqrsTUVwxyz",
"userId": "987654321"
}
}
Discord Bot
- Create application at Discord Developer Portal
- Go to Bot section → Reset Token → Copy token
- Enable "Message Content Intent" (critical!)
- Invite bot via OAuth2 URL Generator (scopes:
bot, permissions: View Channels, Send Messages, Read Message History) - Get Channel ID: Enable Developer Mode → Right-click channel → Copy Channel ID
Configure:
{
"discord": {
"token": "your-bot-token",
"channelId": "1234567890123456789"
}
}
Feishu (Lark) Bot
No public server required — uses WebSocket long-connection mode.
- Create app at Feishu Open Platform
- Add "Bot" capability
- Get App ID and App Secret
- Add permissions:
im:message,im:message:send_as_bot,im:chat:readonly - Publish app
- Configure event subscription:
- Use long-connection mode (no webhook URL needed)
- Add event:
im.message.receive_v1 - ⚠️ OpenClaw service must be running to save settings
Configure:
{
"feishu": {
"appId": "cli_xxxxxxxxx",
"appSecret": "your-app-secret"
}
}
No Business API needed — uses personal account via QR code.
# Run configuration menu → WhatsApp option
# Scan QR code displayed in terminal
# Restart gateway after login
openclaw gateway restart
⚠️ Note: WhatsApp Web can only be active on one device. Configuring here will log out existing WhatsApp Web sessions.
Configuration Files
Directory Structure
~/.openclaw/
├── openclaw.json # Core configuration (models, channels, skills)
├── env # Environment variables (API keys, base URLs)
├── backups/ # Configuration backups
└── logs/ # Log files (managed by OpenClaw)
Environment Variables (~/.openclaw/env)
# Anthropic Claude
export ANTHROPIC_API_KEY="sk-ant-xxxxx"
export ANTHROPIC_BASE_URL="https://custom-endpoint.com" # Optional
# OpenAI GPT
export OPENAI_API_KEY="sk-xxxxx"
export OPENAI_BASE_URL="https://custom-endpoint.com/v1" # Optional
# Google Gemini
export GEMINI_API_KEY="your-gemini-key"
# OpenRouter
export OPENROUTER_API_KEY="sk-or-xxxxx"
# Groq
export GROQ_API_KEY="gsk_xxxxx"
# Mistral AI
export MISTRAL_API_KEY="your-mistral-key"
Core Configuration (~/.openclaw/openclaw.json)
{
"models": {
"default": "claude-sonnet-4-5-20250929",
"providers": {
"anthropic": {
"apiKey": "${ANTHROPIC_API_KEY}",
"models": ["claude-sonnet-4-5-20250929"]
}
}
},
"telegram": {
"token": "${TELEGRAM_BOT_TOKEN}",
"userId": "123456789"
},
"discord": {
"token": "${DISCORD_BOT_TOKEN}",
"channelId": "987654321"
},
"memory": {
"enabled": true,
"maxMessages": 1000
},
"skills": {
"enabled": true,
"directory": "~/.openclaw/skills"
}
}
Common Patterns
Testing API Connection
# After configuring AI model
openclaw doctor
# Test specific model
openclaw models test anthropic claude-sonnet-4-5-20250929
Adding Custom Skills
# Skills are Markdown files in ~/.openclaw/skills/
mkdir -p ~/.openclaw/skills
cat > ~/.openclaw/skills/weather.md << 'EOF'
# Weather Information
You can fetch weather information for any city.
## Usage
When user asks about weather:
1. Extract city name
2. Use curl to fetch from weather API
3. Format and present results
EOF
# Restart gateway to load skills
openclaw gateway restart
Monitoring Service Status
# Check if gateway is running
openclaw gateway status
# View recent logs
openclaw logs --tail 50
# Watch logs in real-time
openclaw logs --follow
# Health check with detailed output
openclaw health --verbose
Switching AI Models
# Change to different model
openclaw models set anthropic claude-opus-4-5
# Change to different provider
openclaw models set openai gpt-4o
# Verify current model
openclaw config get models.default
Backup and Restore
# Backup all configuration and data
openclaw backup --output ~/openclaw-backup-$(date +%Y%m%d).tar.gz
# Restore from backup
openclaw restore ~/openclaw-backup-20260517.tar.gz
# Export conversations only
openclaw export --format json --output ~/conversations.json
Troubleshooting
Service Won't Start
# Check for errors
openclaw doctor
# View detailed logs
openclaw logs --level debug
# Verify Node.js version
node --version # Should be v22+
# Check environment variables
source ~/.openclaw/env
echo $ANTHROPIC_API_KEY
API Key Not Working
# Test API key manually
curl https://api.anthropic.com/v1/messages \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{"model":"claude-sonnet-4-5-20250929","max_tokens":10,"messages":[{"role":"user","content":"Hi"}]}'
# For custom base URL
curl https://your-custom-endpoint.com/v1/messages \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{"model":"claude-sonnet-4-5-20250929","max_tokens":10,"messages":[{"role":"user","content":"Hi"}]}'
Telegram Bot Not Responding
# Verify bot token and user ID
cat ~/.openclaw/openclaw.json | grep -A 3 telegram
# Check logs for errors
openclaw logs | grep telegram
# Test bot manually
curl https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/getMe
Discord Bot Not Responding
- Verify Message Content Intent is enabled in Discord Developer Portal
- Check bot has permissions in target channel
- Verify channel ID is correct:
# Check configuration
openclaw config get discord.channelId
# View logs
openclaw logs | grep discord
Feishu Bot Not Receiving Messages
- Ensure OpenClaw gateway is running when saving event subscription settings
- Verify long-connection mode is selected (not webhook)
- Check permissions are granted and app is published
- View logs:
openclaw logs | grep feishu
WhatsApp Connection Lost
# Re-authenticate by reconfiguring
bash ~/.openclaw/config-menu.sh
# Select WhatsApp → Scan new QR code
# Restart gateway
openclaw gateway restart
Memory/Performance Issues
# Clear old memory
openclaw memory clear --before 2026-01-01
# Reduce context window in config
openclaw config set memory.maxMessages 500
# Monitor resource usage
openclaw health --verbose
Custom API Endpoint Not Working
For Anthropic:
# Verify baseUrl format (no /v1 suffix)
echo $ANTHROPIC_BASE_URL # Should be: https://api.example.com
# Test endpoint
curl $ANTHROPIC_BASE_URL/v1/messages -H "x-api-key: $ANTHROPIC_API_KEY" -H "anthropic-version: 2023-06-01" -d '{"model":"claude-sonnet-4-5-20250929","max_tokens":10,"messages":[{"role":"user","content":"test"}]}'
For OpenAI (must support v1/responses):
# Verify endpoint supports Responses API
curl $OPENAI_BASE_URL/responses \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-4o","input":[{"role":"user","content":"test"}],"max_tokens":10}'
# If 404, your endpoint doesn't support Responses API
Clean Reinstall
# Stop service
openclaw gateway stop
# Backup data
openclaw backup
# Uninstall
npm uninstall -g openclaw
rm -rf ~/.openclaw
# Reinstall
curl -fsSL https://raw.githubusercontent.com/miaoxworld/OpenClawInstaller/main/install.sh | bash
Advanced Configuration
Multiple AI Models (Fallback)
Edit ~/.openclaw/openclaw.json:
{
"models": {
"default": "claude-sonnet-4-5-20250929",
"fallback": ["gpt-4o", "gemini-2.0-flash"],
"providers": {
"anthropic": { "apiKey": "${ANTHROPIC_API_KEY}" },
"openai": { "apiKey": "${OPENAI_API_KEY}" },
"google": { "apiKey": "${GEMINI_API_KEY}" }
}
}
}
Scheduled Proactive Messages
# Create skill for morning briefing
cat > ~/.openclaw/skills/morning-briefing.md << 'EOF'
# Morning Briefing
Every day at 8 AM, send a summary of:
- Today's calendar events
- Weather forecast
- Important reminders
## Schedule
- Time: 08:00
- Timezone: UTC
EOF
openclaw gateway restart
Custom System Prompt
Edit ~/.openclaw/openclaw.json:
{
"system": {
"prompt": "You are a helpful AI assistant named OpenClaw. You have persistent memory across conversations and can proactively send messages. Be concise and friendly."
}
}
This skill covers the essential deployment, configuration, service management, and troubleshooting workflows for OpenClaw using the installer tools.