openclaw-installer-deployment

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

OpenClaw Installer & Deployment

OpenClaw 安装与部署

Skill by ara.so — Hermes Skills collection.
OpenClaw is a private AI assistant deployment tool supporting multiple AI models (Claude, GPT, Gemini, etc.) and messaging platforms (Telegram, Discord, WhatsApp, Slack, WeChat, iMessage, Feishu). This skill covers installation, configuration, service management, and troubleshooting.
ara.so 提供的技能 — Hermes Skills 合集。
OpenClaw 是一款私有AI助手部署工具,支持多种AI模型(Claude、GPT、Gemini等)和消息平台(Telegram、Discord、WhatsApp、Slack、微信、iMessage、飞书)。本技能涵盖安装、配置、服务管理及故障排查全流程。

What OpenClaw Does

OpenClaw 核心功能

  • Multi-Model AI: Supports Anthropic Claude, OpenAI GPT, Google Gemini, OpenRouter, Groq, Mistral AI, and Ollama
  • Multi-Channel: Integrates with Telegram, Discord, WhatsApp, Slack, WeChat, iMessage (macOS), and Feishu
  • Persistent Memory: Cross-conversation, cross-platform long-term memory
  • Proactive Features: Scheduled reminders, morning briefings, alerts
  • Custom Skills: Define capabilities via Markdown files
  • Remote Control: Execute system commands, file operations, web browsing
  • 多模型AI支持:兼容Anthropic Claude、OpenAI GPT、Google Gemini、OpenRouter、Groq、Mistral AI及Ollama
  • 多渠道集成:对接Telegram、Discord、WhatsApp、Slack、微信、iMessage(macOS)和飞书
  • 持久化记忆:跨对话、跨平台的长期记忆能力
  • 主动功能:定时提醒、晨间简报、告警通知
  • 自定义技能:通过Markdown文件定义专属能力
  • 远程控制:执行系统命令、文件操作、网页浏览

Installation

安装步骤

One-Line Install (Recommended)

一键安装(推荐)

bash
undefined
bash
undefined

Automatic installation with environment detection

自动环境检测安装


The installer automatically:
1. Detects OS and installs dependencies (Node.js v22+)
2. Installs OpenClaw globally via npm
3. Guides core configuration (AI model, identity)
4. Tests API connections
5. Auto-starts OpenClaw gateway service
6. Optional: Opens configuration menu for channels

安装脚本会自动完成以下操作:
1. 检测操作系统并安装依赖(Node.js v22+)
2. 通过npm全局安装OpenClaw
3. 引导核心配置(AI模型、身份信息)
4. 测试API连接
5. 自动启动OpenClaw网关服务
6. 可选:打开渠道配置菜单

Manual Installation

手动安装

bash
undefined
bash
undefined

Clone repository

克隆仓库

Add execute permissions

添加执行权限

chmod +x install.sh config-menu.sh
chmod +x install.sh config-menu.sh

Run installer

运行安装脚本

./install.sh
./install.sh

If macOS permissions issue, install OpenClaw first

若macOS出现权限问题,先手动安装OpenClaw

npm install -g openclaw
undefined
npm install -g openclaw
undefined

Desktop Manager (Alternative)

桌面管理器(替代方案)

For GUI-based management, use OpenClaw Manager (Tauri 2.0 + React + TypeScript + Rust):
如需GUI可视化管理,可使用OpenClaw Manager(基于Tauri 2.0 + React + TypeScript + Rust):

System Requirements

系统要求

  • OS: macOS 12+ / Ubuntu 20.04+ / Debian 11+ / CentOS 8+
  • Node.js: v22 or higher
  • Memory: Minimum 2GB, recommended 4GB+
  • Disk: Minimum 1GB
  • 操作系统:macOS 12+ / Ubuntu 20.04+ / Debian 11+ / CentOS 8+
  • Node.js:v22或更高版本
  • 内存:最低2GB,推荐4GB+
  • 磁盘:最低1GB

Configuration

配置指南

Directory Structure

目录结构

~/.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/
├── openclaw.json        # 核心配置文件(自动管理)
├── env                  # 环境变量(存储API密钥)
├── config-menu.sh       # 交互式配置脚本
├── backups/             # 配置备份目录
└── logs/                # 日志文件目录

Environment Variables (
~/.openclaw/env
)

环境变量配置(
~/.openclaw/env

bash
undefined
bash
undefined

Anthropic Claude

Anthropic Claude

export ANTHROPIC_API_KEY=sk-ant-xxxxx export ANTHROPIC_BASE_URL=https://custom-api.example.com # Optional
export ANTHROPIC_API_KEY=sk-ant-xxxxx export ANTHROPIC_BASE_URL=https://custom-api.example.com # 可选配置

OpenAI GPT

OpenAI GPT

export OPENAI_API_KEY=sk-xxxxx export OPENAI_BASE_URL=https://custom-api.example.com/v1 # Optional
export OPENAI_API_KEY=sk-xxxxx export OPENAI_BASE_URL=https://custom-api.example.com/v1 # 可选配置

Google Gemini

Google Gemini

export GEMINI_API_KEY=xxxxx
export GEMINI_API_KEY=xxxxx

OpenRouter

OpenRouter

export OPENROUTER_API_KEY=sk-or-xxxxx
export OPENROUTER_API_KEY=sk-or-xxxxx

Telegram

Telegram

export TELEGRAM_BOT_TOKEN=123456:ABC-DEF... export TELEGRAM_USER_ID=123456789
export TELEGRAM_BOT_TOKEN=123456:ABC-DEF... export TELEGRAM_USER_ID=123456789

Discord

Discord

export DISCORD_BOT_TOKEN=xxxxx export DISCORD_CHANNEL_ID=123456789
export DISCORD_BOT_TOKEN=xxxxx export DISCORD_CHANNEL_ID=123456789

Feishu

飞书

export FEISHU_APP_ID=cli_xxxxx export FEISHU_APP_SECRET=xxxxx
undefined
export FEISHU_APP_ID=cli_xxxxx export FEISHU_APP_SECRET=xxxxx
undefined

Interactive Configuration Menu

交互式配置菜单

bash
undefined
bash
undefined

Run configuration menu

启动配置菜单

bash ~/.openclaw/config-menu.sh
bash ~/.openclaw/config-menu.sh

Or download and run directly

或直接下载并运行


Menu options:
1. **User Identity**: Name, timezone, language preferences
2. **AI Model**: Configure provider (Anthropic, OpenAI, Gemini, etc.)
3. **Message Channels**: Telegram, Discord, WhatsApp, Feishu, etc.
4. **Quick Tests**: API connectivity, channel verification
5. **Advanced**: Backup/restore, view config, diagnostics

菜单选项:
1. **用户身份配置**:姓名、时区、语言偏好
2. **AI模型配置**:选择提供商(Anthropic、OpenAI、Gemini等)
3. **消息渠道配置**:Telegram、Discord、WhatsApp、飞书等
4. **快速测试**:API连通性、渠道验证
5. **高级选项**:备份/恢复、查看配置、诊断检测

AI Model Configuration

AI模型配置

Anthropic Claude (with Custom API Support)

Anthropic Claude(支持自定义API)

bash
undefined
bash
undefined

Using configuration menu

使用配置菜单

1. Select Anthropic Claude

1. 选择Anthropic Claude

2. Enter custom API URL (leave empty for official API)

2. 输入自定义API地址(留空使用官方API)

3. Enter API key

3. 输入API密钥

4. Select model (recommended: claude-sonnet-4-5-20250929)

4. 选择模型(推荐:claude-sonnet-4-5-20250929)


Environment setup:
```bash
export ANTHROPIC_API_KEY=sk-ant-xxxxx
export ANTHROPIC_BASE_URL=https://your-oneapi-proxy.com  # Optional
Config file (
~/.openclaw/openclaw.json
):
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
          }
        ]
      }
    }
  }
}

环境变量设置:
```bash
export ANTHROPIC_API_KEY=sk-ant-xxxxx
export ANTHROPIC_BASE_URL=https://your-oneapi-proxy.com  # 可选配置
配置文件(
~/.openclaw/openclaw.json
):
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
          }
        ]
      }
    }
  }
}

OpenAI GPT (with Custom API Support)

OpenAI GPT(支持自定义API)

Important: Custom API must support OpenAI Responses API (
v1/responses
), not just Chat Completions API.
bash
undefined
重要提示:自定义API必须支持OpenAI Responses API(
v1/responses
),而非仅支持Chat Completions API。
bash
undefined

Environment variables

环境变量设置

export OPENAI_API_KEY=sk-xxxxx export OPENAI_BASE_URL=https://your-api-proxy.com/v1
undefined
export OPENAI_API_KEY=sk-xxxxx export OPENAI_BASE_URL=https://your-api-proxy.com/v1
undefined

Ollama (Local Deployment)

Ollama(本地部署)

bash
undefined
bash
undefined

Install Ollama

安装Ollama

Pull a model

拉取模型

ollama pull llama3
ollama pull llama3

Configure in menu: select Ollama, enter model name (llama3)

在配置菜单中选择Ollama,输入模型名称(llama3)

undefined
undefined

Channel Configuration

消息渠道配置

Telegram Bot

Telegram机器人

bash
undefined
bash
undefined

1. Create bot with @BotFather on Telegram

1. 在Telegram中通过@BotFather创建机器人

2. Send /newbot and follow prompts

2. 发送/newbot并按照提示操作

3. Copy Bot Token

3. 复制机器人Token

4. Get User ID from @userinfobot

4. 通过@userinfobot获取用户ID

5. Configure via menu or set env vars:

5. 通过菜单配置或设置环境变量:

export TELEGRAM_BOT_TOKEN=123456:ABC-DEF... export TELEGRAM_USER_ID=123456789
undefined
export TELEGRAM_BOT_TOKEN=123456:ABC-DEF... export TELEGRAM_USER_ID=123456789
undefined

Discord Bot

Discord机器人

bash
undefined
bash
undefined

2. Go to Bot → Reset Token (copy token)

2. 进入Bot页面 → Reset Token(复制Token)

3. Enable "Message Content Intent" (critical!)

3. 启用"Message Content Intent"(关键配置!)

4. Invite bot: OAuth2 → URL Generator

4. 邀请机器人:OAuth2 → URL生成器

- Scopes: bot

- 权限范围:bot

- Permissions: View Channels, Send Messages, Read Message History

- 权限:查看频道、发送消息、读取消息历史

5. Get Channel ID: Enable Developer Mode → Right-click channel → Copy ID

5. 获取频道ID:启用开发者模式 → 右键频道 → 复制ID

export DISCORD_BOT_TOKEN=xxxxx export DISCORD_CHANNEL_ID=123456789
undefined
export DISCORD_BOT_TOKEN=xxxxx export DISCORD_CHANNEL_ID=123456789
undefined

Feishu (Lark) Bot

飞书机器人

bash
undefined
bash
undefined

2. Add "Bot" capability

2. 添加"机器人"能力

3. Add permissions: im:message, im:message:send_as_bot, im:chat:readonly

3. 添加权限:im:message, im:message:send_as_bot, im:chat:readonly

4. Publish app

4. 发布应用

5. Configure event subscription:

5. 配置事件订阅:

- Use "Long Connection" (WebSocket)

- 使用"长连接"(WebSocket)模式

- Add event: im.message.receive_v1

- 添加事件:im.message.receive_v1

- No webhook URL needed

- 无需配置Webhook地址

6. Add bot to group chat

6. 将机器人添加到群组聊天

export FEISHU_APP_ID=cli_xxxxx export FEISHU_APP_SECRET=xxxxx

Full guide: [docs/feishu-setup.md](https://github.com/miaoxworld/OpenClawInstaller/blob/main/docs/feishu-setup.md)
export FEISHU_APP_ID=cli_xxxxx export FEISHU_APP_SECRET=xxxxx

完整指南:[docs/feishu-setup.md](https://github.com/miaoxworld/OpenClawInstaller/blob/main/docs/feishu-setup.md)

WhatsApp (QR Code Login)

WhatsApp(扫码登录)

bash
undefined
bash
undefined

1. Select WhatsApp in config menu

1. 在配置菜单中选择WhatsApp

2. Scan QR code in terminal

2. 在终端中扫描二维码

3. Login succeeds, restart gateway

3. 登录成功后重启网关

Note: Only one WhatsApp Web session allowed

注意:每个WhatsApp账号仅允许一个Web会话

undefined
undefined

Service Management

服务管理

Core Commands

核心命令

bash
undefined
bash
undefined

Start gateway (background daemon)

启动网关(后台守护进程)

openclaw gateway start
openclaw gateway start

Stop gateway

停止网关

openclaw gateway stop
openclaw gateway stop

Restart gateway

重启网关

openclaw gateway restart
openclaw gateway restart

Check status

查看状态

openclaw gateway status
openclaw gateway status

Run in foreground (debug mode)

前台运行(调试模式)

source ~/.openclaw/env && openclaw gateway
source ~/.openclaw/env && openclaw gateway

View logs

查看日志

openclaw logs
openclaw logs

Tail logs in real-time

实时查看日志

openclaw logs --follow
undefined
openclaw logs --follow
undefined

Configuration Commands

配置命令

bash
undefined
bash
undefined

Open config file

打开配置文件

openclaw config
openclaw config

Run onboarding wizard

运行初始化向导

openclaw onboard
openclaw onboard

Diagnose configuration issues

诊断配置问题

openclaw doctor
openclaw doctor

Health check

健康检查

openclaw health
undefined
openclaw health
undefined

Data Management

数据管理

bash
undefined
bash
undefined

Export conversation history

导出对话历史

openclaw export --format json
openclaw export --format json

Clear memory

清除记忆

openclaw memory clear
openclaw memory clear

Backup data

备份数据

openclaw backup
undefined
openclaw backup
undefined

Common Patterns

常用操作流程

Post-Install Startup

安装后启动

bash
undefined
bash
undefined

After installation, load environment and start service

安装完成后,加载环境变量并启动服务

source ~/.openclaw/env openclaw gateway start
source ~/.openclaw/env openclaw gateway start

Verify it's running

验证服务运行状态

openclaw gateway status
undefined
openclaw gateway status
undefined

Adding a New AI Model

添加新AI模型

bash
undefined
bash
undefined

Run config menu

启动配置菜单

bash ~/.openclaw/config-menu.sh
bash ~/.openclaw/config-menu.sh

Select: [2] AI Model Configuration

选择:[2] AI模型配置

Choose provider (e.g., Anthropic Claude)

选择提供商(如Anthropic Claude)

Enter custom API URL if using proxy (or leave empty)

输入自定义API地址(使用代理时填写,否则留空)

Enter API key

输入API密钥

Select model from list

从列表中选择模型

Restart gateway

重启网关

openclaw gateway restart
undefined
openclaw gateway restart
undefined

Adding a New Channel

添加新消息渠道

bash
undefined
bash
undefined

Run config menu

启动配置菜单

bash ~/.openclaw/config-menu.sh
bash ~/.openclaw/config-menu.sh

Select: [3] Message Channel Configuration

选择:[3] 消息渠道配置

Choose channel (e.g., Telegram)

选择渠道(如Telegram)

Enter required credentials (token, user ID)

输入所需凭证(Token、用户ID)

Restart gateway

重启网关

openclaw gateway restart
undefined
openclaw gateway restart
undefined

Testing API Connection

测试API连接

bash
undefined
bash
undefined

Using config menu

使用配置菜单

bash ~/.openclaw/config-menu.sh
bash ~/.openclaw/config-menu.sh

Select: [4] Quick Tests → [1] Test API Connection

选择:[4] 快速测试 → [1] 测试API连接

Or manually check health

或手动执行健康检查

openclaw health
undefined
openclaw health
undefined

Switching AI Models

切换AI模型

bash
undefined
bash
undefined

Edit environment variables

编辑环境变量

nano ~/.openclaw/env
nano ~/.openclaw/env

Change API key and base URL

修改API密钥和基础地址

export ANTHROPIC_API_KEY=new-key export ANTHROPIC_BASE_URL=https://new-proxy.com
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
openclaw models set anthropic-custom claude-sonnet-4-5-20250929

Restart

重启服务

openclaw gateway restart
undefined
openclaw gateway restart
undefined

Troubleshooting

故障排查

Installation Issues

安装问题

bash
undefined
bash
undefined

Check Node.js version (must be v22+)

检查Node.js版本(必须为v22+)

node --version
node --version

If Node.js version is old, install via nvm

若Node.js版本过低,通过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
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash source ~/.bashrc # 或 ~/.zshrc nvm install 22 nvm use 22

Reinstall OpenClaw

重新安装OpenClaw

npm install -g openclaw
undefined
npm install -g openclaw
undefined

Gateway Won't Start

网关无法启动

bash
undefined
bash
undefined

Check if service is already running

检查服务是否已运行

openclaw gateway status
openclaw gateway status

Stop existing service

停止现有服务

openclaw gateway stop
openclaw gateway stop

Check for port conflicts (default: 3000)

检查端口冲突(默认端口:3000)

lsof -i :3000
lsof -i :3000

Kill conflicting process if needed

若有冲突,终止对应进程

kill -9 <PID>
kill -9 <PID>

Run diagnostics

执行诊断检测

openclaw doctor
openclaw doctor

Start in foreground to see errors

前台运行以查看错误信息

source ~/.openclaw/env openclaw gateway
undefined
source ~/.openclaw/env openclaw gateway
undefined

API Connection Failures

API连接失败

bash
undefined
bash
undefined

Verify environment variables are loaded

验证环境变量是否加载

source ~/.openclaw/env env | grep ANTHROPIC # or OPENAI, GEMINI, etc.
source ~/.openclaw/env env | grep ANTHROPIC # 或 OPENAI、GEMINI等

Test API manually with curl

使用curl手动测试API

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
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诊断结果

openclaw doctor
undefined
openclaw doctor
undefined

Channel Not Responding

消息渠道无响应

bash
undefined
bash
undefined

Telegram: Verify bot token and user ID

Telegram:验证机器人Token和用户ID

Discord: Check Message Content Intent is enabled

Discord:确认已启用Message Content Intent

(Must be set in Discord Developer Portal)

(必须在Discord开发者平台设置)

Feishu: Ensure long connection event subscription is configured

飞书:确保已配置长连接事件订阅

and OpenClaw gateway is running before saving Feishu config

且在保存飞书配置前已启动OpenClaw网关

View logs for errors

查看日志中的错误信息

openclaw logs --follow
undefined
openclaw logs --follow
undefined

WhatsApp QR Code Not Showing

WhatsApp二维码不显示

bash
undefined
bash
undefined

Ensure terminal supports Unicode

确保终端支持Unicode

Try a different terminal emulator

尝试更换终端模拟器

Check if WhatsApp is already logged in elsewhere

检查WhatsApp是否已在其他设备登录

(Only one Web session allowed)

(每个账号仅允许一个Web会话)

Restart gateway and try again

重启网关后重试

openclaw gateway restart
undefined
openclaw gateway restart
undefined

Custom API Proxy Issues

自定义API代理问题

bash
undefined
bash
undefined

Anthropic: Ensure base URL doesn't include /v1

Anthropic:基础地址请勿包含/v1

OpenAI: Must support v1/responses endpoint, not just v1/chat/completions

OpenAI:必须支持v1/responses端点,而非仅v1/chat/completions

Test with:

测试命令:

curl -H "Authorization: Bearer $OPENAI_API_KEY"
${OPENAI_BASE_URL}/responses
curl -H "Authorization: Bearer $OPENAI_API_KEY"
${OPENAI_BASE_URL}/responses

If 404, your proxy doesn't support Responses API

返回404则表示代理不支持Responses API

undefined
undefined

Configuration Reset

重置配置

bash
undefined
bash
undefined

Backup current config

备份当前配置

openclaw backup
openclaw backup

Remove config files

删除配置文件

rm -rf ~/.openclaw/openclaw.json ~/.openclaw/env
rm -rf ~/.openclaw/openclaw.json ~/.openclaw/env

Re-run installer or onboarding

重新运行安装脚本或初始化向导

openclaw onboard
openclaw onboard

Or use interactive menu

或使用交互式菜单

Memory/Performance Issues

内存/性能问题

bash
undefined
bash
undefined

Check memory usage

检查内存使用情况

openclaw health
openclaw health

Clear old memories

清除旧记忆

openclaw memory clear
openclaw memory clear

Restart gateway

重启网关

openclaw gateway restart
openclaw gateway restart

For macOS: Increase Node.js memory limit

macOS系统:增加Node.js内存限制

export NODE_OPTIONS="--max-old-space-size=4096" openclaw gateway start
undefined
export NODE_OPTIONS="--max-old-space-size=4096" openclaw gateway start
undefined

Real-World Examples

实际应用示例

Complete Setup Flow

完整部署流程

bash
undefined
bash
undefined

1. Install OpenClaw

1. 安装OpenClaw

2. Configure Anthropic Claude with custom API

2. 配置带自定义API的Anthropic Claude

bash ~/.openclaw/config-menu.sh
bash ~/.openclaw/config-menu.sh

→ [2] AI Model Configuration

→ [2] AI模型配置

→ [1] Anthropic Claude

→ [1] Anthropic Claude

→ Enter custom API: https://my-oneapi.com

→ 输入自定义API地址:https://my-oneapi.com

→ Enter API key: sk-ant-xxxxx

→ 输入API密钥:sk-ant-xxxxx

→ Select model: claude-sonnet-4-5-20250929

→ 选择模型:claude-sonnet-4-5-20250929

3. Configure Telegram

3. 配置Telegram

(Get token from @BotFather, user ID from @userinfobot)

(从@BotFather获取Token,从@userinfobot获取用户ID)

→ [3] Message Channel Configuration

→ [3] 消息渠道配置

→ [1] Telegram Bot

→ [1] Telegram机器人

→ Enter bot token: 123456:ABC-DEF...

→ 输入机器人Token:123456:ABC-DEF...

→ Enter user ID: 123456789

→ 输入用户ID:123456789

4. Start service

4. 启动服务

openclaw gateway start
openclaw gateway start

5. Test by messaging your Telegram bot

5. 向Telegram机器人发送消息测试

undefined
undefined

Multi-Channel Setup

多渠道部署

bash
undefined
bash
undefined

Configure multiple channels for the same AI backend

为同一AI后端配置多个渠道

source ~/.openclaw/env
source ~/.openclaw/env

Set up Telegram

配置Telegram

export TELEGRAM_BOT_TOKEN=xxxxx export TELEGRAM_USER_ID=xxxxx
export TELEGRAM_BOT_TOKEN=xxxxx export TELEGRAM_USER_ID=xxxxx

Set up Discord

配置Discord

export DISCORD_BOT_TOKEN=xxxxx export DISCORD_CHANNEL_ID=xxxxx
export DISCORD_BOT_TOKEN=xxxxx export DISCORD_CHANNEL_ID=xxxxx

Set up Feishu

配置飞书

export FEISHU_APP_ID=cli_xxxxx export FEISHU_APP_SECRET=xxxxx
export FEISHU_APP_ID=cli_xxxxx export FEISHU_APP_SECRET=xxxxx

Restart to apply all channels

重启服务使配置生效

openclaw gateway restart
openclaw gateway restart

Now OpenClaw responds on all platforms with shared memory

现在OpenClaw会在所有平台响应,且共享记忆

undefined
undefined

Custom Skills Definition

自定义技能定义

OpenClaw supports custom skills via Markdown files. Example structure:
markdown
undefined
OpenClaw支持通过Markdown文件定义自定义技能,示例结构:
markdown
undefined

Custom Skill: Weather Check

自定义技能:天气查询

Trigger phrases:
  • "what's the weather"
  • "check weather"
Actions:
  1. Call weather API
  2. Format response
  3. Send to user

Skills are typically stored in `~/.openclaw/skills/` (check OpenClaw documentation for exact format).
触发短语:
  • "今天天气怎么样"
  • "查一下天气"
操作步骤:
  1. 调用天气API
  2. 格式化响应内容
  3. 发送给用户

技能文件通常存储在`~/.openclaw/skills/`目录(具体格式请参考OpenClaw官方文档)。

Key Takeaways

关键要点

  1. Use the installer script for automatic environment setup
  2. Configure via menu (
    config-menu.sh
    ) for interactive guided setup
  3. Load environment (
    source ~/.openclaw/env
    ) before manual commands
  4. Custom APIs: Anthropic/OpenAI support custom base URLs (OneAPI, NewAPI, etc.)
  5. OpenAI proxies: Must support
    v1/responses
    endpoint (Responses API)
  6. Feishu: Use long connection mode (no webhook needed)
  7. WhatsApp: Only one Web session allowed per account
  8. Service management: Use
    openclaw gateway start/stop/restart/status
  9. Troubleshooting: Run
    openclaw doctor
    for diagnostics
  10. Multi-channel: All channels share the same AI backend and memory
  1. 使用安装脚本完成自动环境配置
  2. 通过配置菜单
    config-menu.sh
    )进行交互式引导配置
  3. 执行命令前加载环境变量
    source ~/.openclaw/env
  4. 自定义API支持:Anthropic/OpenAI支持自定义基础地址(OneAPI、NewAPI等)
  5. OpenAI代理要求:必须支持
    v1/responses
    端点(Responses API)
  6. 飞书配置:使用长连接模式(无需Webhook)
  7. WhatsApp限制:每个账号仅允许一个Web会话
  8. 服务管理:使用
    openclaw gateway start/stop/restart/status
    命令
  9. 故障排查:运行
    openclaw doctor
    进行诊断
  10. 多渠道特性:所有渠道共享同一AI后端和记忆
获取最新更新及提交问题:https://github.com/miaoxworld/OpenClawInstaller