Loading...
Loading...
Deploy and configure OpenClaw AI assistant with multi-model support and messaging channel integrations
npx skill4agent add aradotso/hermes-skills openclaw-installer-deploymentSkill by ara.so — Hermes Skills collection.
# Automatic installation with environment detection
curl -fsSL https://raw.githubusercontent.com/miaoxworld/OpenClawInstaller/main/install.sh | bash# 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 macOS permissions issue, install OpenClaw first
npm install -g openclaw~/.openclaw/
├── openclaw.json # Core configuration (auto-managed)
├── env # Environment variables (API keys)
├── config-menu.sh # Interactive configuration script
├── backups/ # Config backups
└── logs/ # Log files~/.openclaw/env# Anthropic Claude
export ANTHROPIC_API_KEY=sk-ant-xxxxx
export ANTHROPIC_BASE_URL=https://custom-api.example.com # Optional
# OpenAI GPT
export OPENAI_API_KEY=sk-xxxxx
export OPENAI_BASE_URL=https://custom-api.example.com/v1 # Optional
# Google Gemini
export GEMINI_API_KEY=xxxxx
# OpenRouter
export OPENROUTER_API_KEY=sk-or-xxxxx
# Telegram
export TELEGRAM_BOT_TOKEN=123456:ABC-DEF...
export TELEGRAM_USER_ID=123456789
# Discord
export DISCORD_BOT_TOKEN=xxxxx
export DISCORD_CHANNEL_ID=123456789
# Feishu
export FEISHU_APP_ID=cli_xxxxx
export FEISHU_APP_SECRET=xxxxx# Run configuration menu
bash ~/.openclaw/config-menu.sh
# Or download and run directly
curl -fsSL https://raw.githubusercontent.com/miaoxworld/OpenClawInstaller/main/config-menu.sh | bash# Using configuration menu
# 1. Select Anthropic Claude
# 2. Enter custom API URL (leave empty for official API)
# 3. Enter API key
# 4. Select model (recommended: claude-sonnet-4-5-20250929)export ANTHROPIC_API_KEY=sk-ant-xxxxx
export ANTHROPIC_BASE_URL=https://your-oneapi-proxy.com # Optional~/.openclaw/openclaw.json{
"models": {
"providers": {
"anthropic-custom": {
"baseUrl": "https://your-oneapi-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
}
]
}
}
}
}v1/responses# Environment variables
export OPENAI_API_KEY=sk-xxxxx
export OPENAI_BASE_URL=https://your-api-proxy.com/v1# Install Ollama
curl -fsSL https://ollama.com/install.sh | sh
# Pull a model
ollama pull llama3
# Configure in menu: select Ollama, enter model name (llama3)# 1. Create bot with @BotFather on Telegram
# 2. Send /newbot and follow prompts
# 3. Copy Bot Token
# 4. Get User ID from @userinfobot
# 5. Configure via menu or set env vars:
export TELEGRAM_BOT_TOKEN=123456:ABC-DEF...
export TELEGRAM_USER_ID=123456789# 1. Create app at https://discord.com/developers/applications
# 2. Go to Bot → Reset Token (copy token)
# 3. Enable "Message Content Intent" (critical!)
# 4. Invite bot: OAuth2 → URL Generator
# - Scopes: bot
# - Permissions: View Channels, Send Messages, Read Message History
# 5. Get Channel ID: Enable Developer Mode → Right-click channel → Copy ID
export DISCORD_BOT_TOKEN=xxxxx
export DISCORD_CHANNEL_ID=123456789# 1. Create app at https://open.feishu.cn/
# 2. Add "Bot" capability
# 3. Add permissions: im:message, im:message:send_as_bot, im:chat:readonly
# 4. Publish app
# 5. Configure event subscription:
# - Use "Long Connection" (WebSocket)
# - Add event: im.message.receive_v1
# - No webhook URL needed
# 6. Add bot to group chat
export FEISHU_APP_ID=cli_xxxxx
export FEISHU_APP_SECRET=xxxxx# 1. Select WhatsApp in config menu
# 2. Scan QR code in terminal
# 3. Login succeeds, restart gateway
# Note: Only one WhatsApp Web session allowed# Start gateway (background daemon)
openclaw gateway start
# Stop gateway
openclaw gateway stop
# Restart gateway
openclaw gateway restart
# Check status
openclaw gateway status
# Run in foreground (debug mode)
source ~/.openclaw/env && openclaw gateway
# View logs
openclaw logs
# Tail logs in real-time
openclaw logs --follow# Open config file
openclaw config
# Run onboarding wizard
openclaw onboard
# Diagnose configuration issues
openclaw doctor
# Health check
openclaw health# Export conversation history
openclaw export --format json
# Clear memory
openclaw memory clear
# Backup data
openclaw backup# After installation, load environment and start service
source ~/.openclaw/env
openclaw gateway start
# Verify it's running
openclaw gateway status# Run config menu
bash ~/.openclaw/config-menu.sh
# Select: [2] AI Model Configuration
# Choose provider (e.g., Anthropic Claude)
# Enter custom API URL if using proxy (or leave empty)
# Enter API key
# Select model from list
# Restart gateway
openclaw gateway restart# Run config menu
bash ~/.openclaw/config-menu.sh
# Select: [3] Message Channel Configuration
# Choose channel (e.g., Telegram)
# Enter required credentials (token, user ID)
# Restart gateway
openclaw gateway restart# Using config menu
bash ~/.openclaw/config-menu.sh
# Select: [4] Quick Tests → [1] Test API Connection
# Or manually check health
openclaw health# Edit environment variables
nano ~/.openclaw/env
# Change API key and base URL
export ANTHROPIC_API_KEY=new-key
export ANTHROPIC_BASE_URL=https://new-proxy.com
# Update model in config (or use menu)
openclaw models set anthropic-custom claude-sonnet-4-5-20250929
# Restart
openclaw gateway restart# Check Node.js version (must be v22+)
node --version
# If Node.js version is old, install via nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
source ~/.bashrc # or ~/.zshrc
nvm install 22
nvm use 22
# Reinstall OpenClaw
npm install -g openclaw# Check if service is already running
openclaw gateway status
# Stop existing service
openclaw gateway stop
# Check for port conflicts (default: 3000)
lsof -i :3000
# Kill conflicting process if needed
kill -9 <PID>
# Run diagnostics
openclaw doctor
# Start in foreground to see errors
source ~/.openclaw/env
openclaw gateway# Verify environment variables are loaded
source ~/.openclaw/env
env | grep ANTHROPIC # or OPENAI, GEMINI, etc.
# Test API manually with curl
curl -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":1024,"messages":[{"role":"user","content":"Hi"}]}' \
${ANTHROPIC_BASE_URL:-https://api.anthropic.com}/v1/messages
# Check OpenClaw diagnostics
openclaw doctor# Telegram: Verify bot token and user ID
curl https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/getMe
# Discord: Check Message Content Intent is enabled
# (Must be set in Discord Developer Portal)
# Feishu: Ensure long connection event subscription is configured
# and OpenClaw gateway is running before saving Feishu config
# View logs for errors
openclaw logs --follow# Ensure terminal supports Unicode
# Try a different terminal emulator
# Check if WhatsApp is already logged in elsewhere
# (Only one Web session allowed)
# Restart gateway and try again
openclaw gateway restart# Anthropic: Ensure base URL doesn't include /v1
# Correct: https://api.example.com
# Incorrect: https://api.example.com/v1
# OpenAI: Must support v1/responses endpoint, not just v1/chat/completions
# Test with:
curl -H "Authorization: Bearer $OPENAI_API_KEY" \
${OPENAI_BASE_URL}/responses
# If 404, your proxy doesn't support Responses API# Backup current config
openclaw backup
# Remove config files
rm -rf ~/.openclaw/openclaw.json ~/.openclaw/env
# Re-run installer or onboarding
openclaw onboard
# Or use interactive menu
curl -fsSL https://raw.githubusercontent.com/miaoxworld/OpenClawInstaller/main/config-menu.sh | bash# Check memory usage
openclaw health
# Clear old memories
openclaw memory clear
# Restart gateway
openclaw gateway restart
# For macOS: Increase Node.js memory limit
export NODE_OPTIONS="--max-old-space-size=4096"
openclaw gateway start# 1. Install OpenClaw
curl -fsSL https://raw.githubusercontent.com/miaoxworld/OpenClawInstaller/main/install.sh | bash
# 2. Configure Anthropic Claude with custom API
bash ~/.openclaw/config-menu.sh
# → [2] AI Model Configuration
# → [1] Anthropic Claude
# → Enter custom API: https://my-oneapi.com
# → Enter API key: sk-ant-xxxxx
# → Select model: claude-sonnet-4-5-20250929
# 3. Configure Telegram
# (Get token from @BotFather, user ID from @userinfobot)
# → [3] Message Channel Configuration
# → [1] Telegram Bot
# → Enter bot token: 123456:ABC-DEF...
# → Enter user ID: 123456789
# 4. Start service
openclaw gateway start
# 5. Test by messaging your Telegram bot# Configure multiple channels for the same AI backend
source ~/.openclaw/env
# Set up Telegram
export TELEGRAM_BOT_TOKEN=xxxxx
export TELEGRAM_USER_ID=xxxxx
# Set up Discord
export DISCORD_BOT_TOKEN=xxxxx
export DISCORD_CHANNEL_ID=xxxxx
# Set up Feishu
export FEISHU_APP_ID=cli_xxxxx
export FEISHU_APP_SECRET=xxxxx
# Restart to apply all channels
openclaw gateway restart
# Now OpenClaw responds on all platforms with shared memory# Custom Skill: Weather Check
Trigger phrases:
- "what's the weather"
- "check weather"
Actions:
1. Call weather API
2. Format response
3. Send to user~/.openclaw/skills/config-menu.shsource ~/.openclaw/envv1/responsesopenclaw gateway start/stop/restart/statusopenclaw doctor