Covers Alibaba Cloud Bailian model configuration, Feishu / DingTalk (traditional bot + DEAP advanced solution) / QQ / Discord all-platform integration, Qoder CLI integration, and advanced configuration and operations.
⚠️ Security Warning
Before you begin, be sure to read the following notes:
- Never deploy OpenClaw on your personal main computer— it has high file system and command execution privileges
- Be sure to use a cloud server(such as Alibaba Cloud ECS) for deployment, isolated from the local environment
- Protect your API keys— use environment variables or a secure vault, do not hard-code them in code
- Use strong random tokensto restrict Gateway access, avoid using simple passwords
- Rotate credentials regularly— especially the application keys for platforms such as DingTalk/Feishu/QQ
Use Cases
- Deploy the OpenClaw AI assistant from scratch on an Alibaba Cloud ECS server
- Chat with the AI via DingTalk (Stream bot or DEAP advanced solution)
- Connect OpenClaw via Feishu, QQ, or Discord
- Configure Alibaba Cloud Bailian Coding Plan as the AI inference backend
- Register Qoder CLI as an ACP Agent to enable code development in DingTalk/Feishu
Example
# 安装 OpenClaw
curl -fsSL https://clawd.bot/install.sh | bash
# 启动 Gateway
openclaw gateway --port 18789 --verbose
# 交互式配置模型和渠道
openclaw onboard
# 查看所有渠道状态
openclaw channel list
# 查看实时日志
tail -f /tmp/openclaw-gateway.log
Notes
- Never deploy on your local main computer; be sure to use a cloud server (such as Alibaba Cloud ECS)
- The DingTalk application must complete the "version release" process; merely saving the configuration will not take effect
- The DingTalk Client Secret, Bailian API Key, and QQ bot key are each shown only once and must be saved immediately
- Feishu integration requires selecting "WebSocket long connection" mode; do not use HTTP callback
- The DingTalk DEAP solution requires running the Connector on the same server, ensuring port 18789 is locally accessible
- It is recommended to configure random strong token authentication for the Gateway (
openssl rand -hex 24)
Overview
This guide will walk you through a complete OpenClaw cloud deployment, enabling conversations with the AI assistant through multiple IM platforms, with optional integration of Qoder CLI for code development.
Overall architecture:
┌────────────────────────────────────────────────────────────┐
│ 用户层 │
│ ┌────────┐ ┌────────┐ ┌──────┐ ┌─────────┐ │
│ │ 飞书 │ │ 钉钉 │ │ QQ │ │ Discord │ │
│ └───┬────┘ └───┬────┘ └──┬───┘ └────┬────┘ │
└──────┼───────────┼──────────┼───────────┼─────────────────┘
│ │ │ │
└───────────┴──────────┴───────────┘
│
Stream / WebSocket
│
┌─────────────────────────────▼──────────────────────────────┐
│ OpenClaw Gateway :18789 │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ ACP 协议层 │ │
│ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ │
│ │ │ acpx │ │ 调度器 │ │ 会话管理 │ │ │
│ │ └──────────┘ └──────────┘ └──────────┘ │ │
│ └──────────────────────────────────────────────────────┘ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ 渠道连接器层(飞书 / 钉钉 / QQ / Discord) │ │
│ └──────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘
│
阿里云百炼 API / Qoder CLI
Deployment steps overview:
- Purchase and configure an Alibaba Cloud ECS server
- Install Node.js and OpenClaw
- Configure the Alibaba Cloud Bailian model (Coding Plan)
- Configure Gateway external access and authentication
- Configure ACP protocol support
- Install and configure Qoder CLI (optional)
- Integrate IM platforms (Feishu / DingTalk / QQ / Discord)
Prerequisites
Required accounts and permissions
- Alibaba Cloud account
- Alibaba Cloud Bailian account (for model API)
- Developer/administrator account for the target IM platform
Required software (local)
- SSH client
- Modern browser (for accessing each platform's developer console)
Phase 1: Purchasing and Configuring an Alibaba Cloud Server
1.1 Recommended Server Configuration
| Configuration Item | Minimum Requirement | Recommended configuration |
|---|---|---|
| CPU | 2 cores | 2 cores |
| Memory | 2 GiB | 4 GiB |
| Disk | 20 GB SSD | 40 GB ESSD |
| Bandwidth | 1 Mbps | 20 Mbps+ |
| Operating system | Ubuntu 22.04 / CentOS 8 | Alibaba Cloud Linux 3 |
| Region | Any | US Virginia / Hong Kong, China (low latency for accessing AI services) |
1.2 Purchase methods
Method 1: Quick deployment via Compute Nest (recommended for beginners)
Visit Alibaba Cloud Compute Nest to deploy the preconfigured environment with one click:
🔗 Alibaba Cloud Compute Nest - OpenClaw quick deployment
Follow the on-page instructions: select region → select instance type → configure network and security group → confirm creation.
Method 2: Manually purchase an ECS instance
- Visit Alibaba Cloud ECS console
- Click "Create Instance"
- Key options:
- Image: Alibaba Cloud Linux 3 / Ubuntu 22.04 (if an OpenClaw application image is available, you can select it directly)
- Instance type:
ecs.c7.large(2 cores, 4 GiB) or higher - System disk:40 GB ESSD
- Public IP: Assign a public IPv4 address
- Bandwidth: Pay-by-traffic or fixed bandwidth (at least 1 Mbps)
- Configure the security group (see below)
- Set login credentials (key pair recommended)
- Confirm and create
1.3 Configure security group rules
| Port | Protocol | Purpose | Authorization object |
|---|---|---|---|
| 22 | TCP | SSH remote connection | Your IP address |
| 18789 | TCP | OpenClaw Gateway | 0.0.0.0/0 |
Configuration steps:
- ECS console → find the instance → click "Security Group"
- "Configure Rules" → "Inbound" → "Manually Add" the above rules
1.4 Connect to the server
# 使用密码登录
ssh root@<你的服务器公网IP>
# 使用密钥登录
ssh -i /path/to/your-key.pem root@<你的服务器公网IP>
# 或通过阿里云控制台网页终端:
# ECS 控制台 → 实例详情 → 远程连接
Phase 2: Install Node.js and OpenClaw
2.1 Install Node.js (nvm recommended)
# 安装 nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
source ~/.bashrc
# 安装 Node.js 22 LTS
nvm install 22
nvm use 22
node -v # 验证:应输出 v22.x.x
2.2 Install OpenClaw
Method 1: Via the official installation script (recommended)
curl -fsSL https://clawd.bot/install.sh | bash
Method 2: Via npm global installation
npm install -g openclaw
Verify installation:
openclaw --version
# 预期输出:版本号如 "2026.1.x"
# 若提示命令不存在,尝试旧名称:clawdbot --version
2.3 Start OpenClaw Gateway
# 方式一:前台启动(调试用)
openclaw gateway --port 18789 --verbose
# 方式二:后台启动
nohup setsid openclaw gateway --port 18789 --verbose > /tmp/openclaw-gateway.log 2>&1 &
# 检查状态
systemctl --user status openclaw-gateway.service
# 或
openclaw gateway status
Phase 3: Configure Alibaba Cloud Model Studio models (Coding Plan)
3.1 Purchase a Coding Plan package
| Package | First-month price | Next-month price | Monthly request volume |
|---|---|---|---|
| Lite Basic Edition | 7.9 yuan | 40 yuan/month | 18,000 requests |
| Pro Advanced Edition | 39.9 yuan | 200 yuan/month | 90,000 requests |
- Visit Alibaba Cloud Model Studio console
- Navigate to "Coding Plan" or "Subscription Packages"
- Select Lite or Pro and complete payment
3.2 Obtain API credentials
- Base URL(fixed):
https://coding.dashscope.aliyuncs.com/v1 - API Key format:
sk-sp-xxxxx
Obtaining steps:
- Log in to Alibaba Cloud Model Studio console
- Go to "Key Management" or "API Keys"
- Click "Create API Key"
- Copy and save immediately— cannot be viewed again after closing
Supported models:
qwen3.5-plus- General scenarios (recommended for beginners)qwen3-max-2026-01-23- Advanced reasoningkimi-k2.5- Code generation (if available)glm-5- Chinese-optimized
3.3 Configure OpenClaw to use Bailian
Method 1: Interactive guide
openclaw onboard
Follow the prompts:
- Select "Add custom model provider"
- Provider ID:
bailian - Base URL:
https://coding.dashscope.aliyuncs.com/v1 - API Key: paste
sk-sp-xxxxx - API type:
openai-completions - Add model:
qwen3.5-plus - Set as default model
Method 2: Manually edit the configuration file
Edit ~/.openclaw/openclaw.json:
{
"models": {
"providers": {
"bailian": {
"baseUrl": "https://coding.dashscope.aliyuncs.com/v1",
"apiKey": "sk-sp-YOUR_KEY_HERE",
"api": "openai-completions",
"models": [
{
"id": "qwen3.5-plus",
"name": "Qwen 3.5 Plus",
"reasoning": true,
"input": ["text"],
"contextWindow": 32000,
"maxTokens": 4096
}
]
}
}
},
"agents": {
"defaults": {
"model": {
"primary": "bailian/qwen3.5-plus"
}
}
}
}
Phase 4: Configure Gateway external access and authentication
When the Gateway needs to be accessed via DingTalk DEAP or other external services, authentication and HTTP endpoints must be configured.
4.1 Generate a strong authentication token
openssl rand -hex 24
# 示例输出:a3f7c2e1d4b5a6c7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a3
4.2 Update the Gateway configuration
Edit ~/.openclaw/openclaw.json, add the gateway section:
{
"gateway": {
"port": 18789,
"mode": "local",
"bind": "loopback",
"controlUI": {
"allowInsecureAuth": false
},
"auth": {
"mode": "token",
"token": "在此处填入上一步生成的强令牌"
},
"http": {
"endpoints": {
"chatCompletions": {
"enabled": true
}
}
}
}
}
4.3 Restart the Gateway
openclaw gateway restart
# 或手动重启:
pkill -f "openclaw gateway"
nohup setsid openclaw gateway --port 18789 --verbose > /tmp/openclaw-gateway.log 2>&1 &
4.4 Verify the Gateway is running properly
curl http://127.0.0.1:18789/health
# 应返回 {"status":"ok"} 或类似响应
Phase 5: Configure ACP protocol support
The ACP (Agent Client Protocol) protocol allows OpenClaw to orchestrate multiple AI Agents.
5.1 Install and enable the ACPX plugin
# 安装 ACPX 插件
openclaw plugins install @openclaw/acpx
# 启用插件
openclaw config set plugins.entries.acpx.enabled true
5.2 Configure ACP parameters
# 启用 ACP
openclaw config set acp.enabled true
# 启用 ACP 调度
openclaw config set acp.dispatch.enabled true
# 设置后端为 acpx
openclaw config set acp.backend "acpx"
# 设置默认 Agent
openclaw config set acp.defaultAgent "openclaw"
# 设置允许的 Agents
openclaw config set acp.allowedAgents '["openclaw","claude","codex","opencode","gemini"]'
# 设置最大并发会话数
openclaw config set acp.maxConcurrentSessions 8
5.3 Restart the Gateway to apply the configuration
openclaw gateway restart
5.4 Verify the ACP configuration
openclaw config get acp --raw
# 应输出:
# {
# "enabled": true,
# "dispatch": { "enabled": true },
# "backend": "acpx",
# "defaultAgent": "openclaw",
# "allowedAgents": [...]
# }
Phase 6: Install and configure Qoder CLI (optional)
If you want to do code development via Qoder, you can install Qoder CLI and register it as an ACP Agent.
6.1 Install Qoder CLI
npm install -g @qoder-ai/qodercli
# 验证安装
qodercli --version
6.2 Configure Qoder CLI authentication
Method 1: Environment variables (temporary)
export QODER_PERSONAL_ACCESS_TOKEN="your-api-key-here"
qodercli status # 验证登录
Method 2: Persistent configuration file
mkdir -p ~/.config/qoder
cat > ~/.config/qoder/config.json << 'EOF'
{
"api_key": "your-api-key-here"
}
EOF
6.3 Configure acpx to support Qoder
mkdir -p ~/.acpx
cat > ~/.acpx/config.json << 'EOF'
{
"agents": {
"qoder": {
"command": "env QODER_PERSONAL_ACCESS_TOKEN=your-api-key-here qodercli --acp"
}
},
"defaultAgent": "qoder",
"defaultPermissions": "approve-all"
}
EOF
6.4 Register Qoder with ACP
# 添加 qoder 到允许的 Agents 列表
openclaw config set acp.allowedAgents '["openclaw","qoder","claude","codex","opencode","gemini"]'
# 可选:设置 qoder 为默认 Agent
openclaw config set acp.defaultAgent "qoder"
# 重启 Gateway
openclaw gateway restart
6.5 Test Qoder CLI
qodercli -p "hello" --max-turns 1
# 若返回结果,说明 Qoder CLI 工作正常
Phase 7: Feishu Bot integration
7.1 Create a Feishu enterprise self-built app
- Visit Feishu Open Platform
- Click "Create App" → select "Enterprise Self-built"
- Fill in the app name (e.g. "OpenClaw Assistant") and description
- Record the App ID and App Secret immediately
7.2 Configure the required permissions
Go to the app's "Permission Management" and enable the following permissions:
contact:user.base:readonly 获取用户基本信息
im:message 读取消息
im:message:send_as_bot 发送消息(Bot 身份)
im:resource 获取消息中的资源
Confirm that all 4 permissions are activated.
7.3 Enable the bot and configure event subscription
- Go to "App Capabilities" → add "Bot"
- Event subscription: select "Use long connection to receive events" (WebSocket, no public URL required)
- Add event:
im.message.receive_v1(receive message event) - Save and create a version
- Publish the app(internal enterprise approval is sufficient)
7.4 Configure OpenClaw to connect to Feishu
Run the guide:
openclaw onboard
Follow the prompts:
- Accept risk:Yes
- Configuration method:Quick start
- Model provider: select the configured Bailian
- Channel: selectFeishu
- Enter credentials: App ID, App Secret (from step 7.1)
- Enable skills:Yes
- Select hooks:session-memory
- Restart Gateway:Yes
7.5 Using the Feishu bot
- Workbench: Feishu → Workbench → Find the app → Start chatting
- Global search: Search for the app name to enter directly
- Group chat: Add the bot to the group → @mention the bot to interact
Phase 8: DingTalk integration
DingTalk provides two integration options; choose according to your needs:
| Option | Complexity | Features |
|---|---|---|
| Option A: Traditional bot (Stream mode) | Lower | Direct configuration, no additional components required |
| Option B: DEAP Agent (advanced) | Higher | Through the Connector tunnel, richer features |
Option A: DingTalk bot (Stream mode)
A-1: Install the DingTalk plugin
openclaw plugins install https://github.com/soimy/openclaw-channel-dingtalk.git
# 验证安装
openclaw plugins list
A-2: Create an enterprise internal app on the DingTalk Open Platform
- Visit DingTalk Open Platform
- Log in with an enterprise administrator account
- Click "Create App" → Select "Enterprise Internal App"
- Fill in the app information (name, description, icon)
- Click "Confirm Creation"
- In "Credentials & Basic Information", record Client ID(AppKey) and Client Secret(AppSecret)
⚠️ Client Secret is only displayed once; please save it properly immediately.
A-3: Configure app permissions
Go to "Permission Management" and apply for the following permissions:
Contacts permissions:
qyapi_get_member- Get enterprise member informationqyapi_get_department_list- Get department list
Bot permissions:
chat:chat:readonly/chat:chat:writeim:chat:readonly/im:chat:write/im:chat:write:groupCard.Instance.Write/Card.Streaming.Writeqyapi_robot_sendmsg
Click "Batch Apply" and wait for administrator approval.
A-4: Configure and publish the bot
- Go to the "Bot" page → Add bot → Select "Custom Bot"
- Message receiving mode:Stream mode(WebSocket, no public IP required)
- Go to "Version Management & Release" → Create a new version (1.0.0) → Apply for release
A-5: Configure OpenClaw to connect to DingTalk
Edit ~/.openclaw/openclaw.json, in channels add:
{
"channels": {
"dingtalk": {
"enabled": true,
"clientId": "你的_APPKEY",
"clientSecret": "你的_APPSECRET",
"robotCode": "你的_APPKEY",
"corpId": "你的_CORPID",
"agentId": "你的_AGENTID",
"dmPolicy": "open",
"groupPolicy": "open",
"messageType": "markdown",
"streamMode": true,
"autoReply": true,
"debug": false
}
}
}
Or configure using the command line:
openclaw config set channels.dingtalk.enabled true
openclaw config set channels.dingtalk.clientId "YOUR_CLIENT_ID"
openclaw config set channels.dingtalk.clientSecret "YOUR_CLIENT_SECRET"
openclaw config set channels.dingtalk.sessionTimeout 1800000
openclaw gateway restart
A-6: Add the bot to a group chat
- Open the target DingTalk group → Group settings → Smart group assistant
- Add bot → Enterprise internal bot → Find your bot → Add
Verification: Send @OpenClaw 助手 你好in the group chat, and the bot should reply.
Option B: DingTalk DEAP Agent (advanced option)
Architecture: DingTalk App → DEAP cloud → Connector tunnel → Your server Gateway
B-1: Obtain DEAP credentials
- CorpId:DingTalk Open Platform → Enterprise Information
- DEAP API Key:DingTalk DEAP Platform → Security & Permissions → API-Key Management → Create Key
B-2: Install and run the Connector on the server
# 检查服务器架构
uname -m # x86_64 或 aarch64
# 从以下地址下载对应版本:
# https://github.com/DingTalk-Real-AI/dingtalk-moltbot-connector/releases
cd ~
wget [下载链接] -O connector.zip
unzip -o connector.zip
cd connector-linux-amd64 # 根据实际目录名调整
chmod +x connector-linux
# 后台运行 Connector
nohup ./connector-linux \
-deapCorpId 你的_CORPID \
-deapApiKey 你的_DEAP_APIKEY \
> /tmp/dingtalk-connector.log 2>&1 &
# 验证运行状态
ps aux | grep connector
tail -20 /tmp/dingtalk-connector.log
B-3: Create an Agent on the DEAP platform
- Visit DingTalk DEAP platform
- Create a new Agent
- Add skill: search for "OpenClaw" or "OpenClaw Gateway"
- Configure skill parameters:
- apikey: your DEAP API Key
- apihost:
127.0.0.1:18789 - gatewayToken: the Gateway authentication token configured in Phase 4
- Publish the Agent
B-4: Use the DEAP Agent in DingTalk
- Search for the Agent name in the DingTalk App
- Send tasks directly in natural language; commands are executed on the Alibaba Cloud server through the tunnel
Phase 9: QQ Bot Integration
9.1 Create a QQ Bot
- Visit QQ Open Platform
- Important: You need to register an account (you cannot log in directly with a QQ account)
- Log in → "Bots" → "Create Bot"
- Fill in the name and description
- Record the Bot ID and Bot Secret immediately(they cannot be viewed again after closing)
9.2 Configure the IP whitelist
- QQ Open Platform → Bot details → IP whitelist
- Add the Alibaba Cloud server'spublic IP to the whitelist
9.3 Configure OpenClaw
openclaw onboard
Select QQ as the channel, and enter:
- Bot ID
- Bot Secret
Complete the remaining steps (model selection, skills, hooks).
Phase 10: Discord Bot Integration
10.1 Create a Discord Bot
- Visit Discord Developer Portal
- "New Application" → enter the application name
- Go to the "Bot" tab
- Click "Reset Token" → immediately copy and save the Bot Token
- Enable "Message Content Intent" (message content intent permission)
10.2 Generate an invite link and join a server
- Go to "OAuth2" → "URL Generator"
- Scope selection:
bot - Bot Permissions check:
- Send Messages
- Read Message History
- Copy the generated URL and open it in a browser
- Select your Discord server → Authorize
10.3 Configure OpenClaw
openclaw onboard
Select Discord as the channel, and enter the Bot Token (from step 10.1).
Legacy note: Some older documentation uses
clawdbot; please useopenclaw。
Verification and Usage Examples
Cross-platform test message
你现在用的是什么模型?
用三句话总结什么是 OpenClaw
创建一个工作日报模板
Check Gateway status
# 查看 Gateway 运行日志
tail -50 /tmp/openclaw-gateway.log
# 查看所有渠道状态
openclaw channel list
# 查看 ACP 会话
openclaw sessions list
DingTalk usage example
# 日常对话
@OpenClaw 助手 你好,请介绍一下你自己
# 代码需求
@OpenClaw 助手 帮我写一段 Python 爬虫代码,抓取网页标题
# 指定特定 Agent
@OpenClaw 助手 /acp spawn claude 分析这段代码的 bug
# 如果安装了 Qoder CLI
@OpenClaw 助手 用 qoder 开发一个 TODO 应用
# 多轮对话
@OpenClaw 助手 我想开发一个个人博客(使用 Next.js 和 TypeScript)
Parallel task execution example
Send multiple tasks at once to improve efficiency:
请处理以下任务:
1. 用三句话总结 OpenClaw
2. 创建一个包含 5 项的每周待办模板
3. 推荐一个提高效率的小技巧
Advanced Configuration
Configure multiple Agents
# 设置允许的 Agents 列表
openclaw config set acp.allowedAgents '["openclaw","qoder","claude","codex","opencode","gemini"]'
# 在聊天中使用特定 Agent
# /acp spawn codex --mode persistent 使用 Codex
# /acp spawn claude --mode persistent 使用 Claude
# /acp spawn qoder --mode persistent 使用 Qoder
Configure persistent sessions
# 启用会话绑定(同一话题持续使用同一 Agent)
openclaw config set session.threadBindings.enabled true
openclaw config set session.threadBindings.ttlHours 24
openclaw gateway restart
Configure security policies
# 设置执行权限级别
# strict: 严格限制 moderate: 适度限制 approve-all: 全部批准
openclaw config set acp.permissions "strict"
# 设置任务超时时间(秒)
openclaw config set acp.timeout 300
Configure message reply templates
Create ~/.openclaw/dingtalk-templates.json:
{
"welcome": "你好!我是 OpenClaw AI 助手,有什么可以帮助你的吗?",
"error": "抱歉,处理您的请求时出现了错误,请稍后重试。",
"thinking": "正在思考中...",
"timeout": "处理超时,请简化您的问题后重试。"
}
Performance Optimization and Operations
Configure a systemd system service (recommended for production environments)
# 增加系统文件描述符限制
echo "fs.file-max = 65535" >> /etc/sysctl.conf
sysctl -p
# 创建 systemd 服务
cat > /etc/systemd/system/openclaw.service << 'EOF'
[Unit]
Description=OpenClaw Gateway
After=network.target
[Service]
Type=simple
User=root
ExecStart=/root/.nvm/versions/node/v22.22.0/bin/openclaw gateway
Restart=always
RestartSec=5
Environment="PATH=/root/.nvm/versions/node/v22.22.0/bin:/usr/bin:/usr/local/bin"
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable openclaw
systemctl start openclaw
systemctl status openclaw
Monitoring and Log Management
# 实时查看 Gateway 日志
tail -f /tmp/openclaw-gateway.log
# 查看 ACP 状态
openclaw acp status
# 查看所有会话
openclaw sessions list
# 查看钉钉渠道指标
openclaw channel metrics dingtalk
# 通过 systemd 查看日志
journalctl -u openclaw -f
DingTalk DEAP Connector daemon
# 配置 Connector 开机自启
cat > /etc/systemd/system/dingtalk-connector.service << 'EOF'
[Unit]
Description=DingTalk DEAP Connector
After=network.target openclaw.service
[Service]
Type=simple
User=root
WorkingDirectory=/root/connector-linux-amd64
ExecStart=/root/connector-linux-amd64/connector-linux \
-deapCorpId YOUR_CORPID \
-deapApiKey YOUR_DEAP_APIKEY
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
EOF
systemctl enable dingtalk-connector
systemctl start dingtalk-connector
Troubleshooting Common Issues
Quick Troubleshooting Table
| Symptom | Possible Cause | Solution |
|---|---|---|
401 Unauthorized |
Gateway Token mismatch | Check whether the token in openclaw.json matches the DEAP/bot configuration |
405 Method Not Allowed |
HTTP endpoint not enabled | Ensure gateway.http.endpoints.chatCompletions.enabled: true |
| The bot is completely unresponsive | App not published / missing permissions | Check the app publishing status and permission approval |
| DEAP Connector disconnected | Firewall / port issue | Ensure port 18789 is locally accessible, check firewall rules |
| The bot responds slowly | Insufficient server resources | Check CPU/memory, check the number of ACP sessions |
insufficient scope |
DingTalk permissions not approved | Reapply for permissions and wait for approval |
Issue 1: Gateway startup failure
# 检查端口占用
netstat -tlnp | grep 18789
# 查看详细日志
openclaw logs
# 强制重启
openclaw gateway restart --force
Issue 2: DingTalk bot unresponsive
Troubleshooting steps:
- Confirm the app has been formally published in "Version Management and Release" (saving alone is not enough)
- Confirm all bot permissions have been applied for and approved
- Verify that the Client ID and Client Secret are correct
- Check the connector logs:
openclaw logs dingtalk -f - Confirm that Stream mode is enabled
- Confirm that the bot has been added to the target group chat
Issue 3: Unable to add the bot to a group chat
Troubleshooting steps:
- Confirm that you are a group admin or group owner
- Confirm the app has been published and approved by an admin
- On the "Bot" page, confirm that the bot status is "Enabled"
Issue 4: Stream mode / WebSocket connection failure
# 检查服务器是否能访问外部服务
ping oapi.dingtalk.com
ping open.feishu.cn
# 检查防火墙是否阻止出站连接
# 尝试重启对应渠道连接器
openclaw channel restart dingtalk
Issue 5: The bot responds slowly or times out midway
# 检查服务器资源
top
free -h
# 查看 ACP 会话状态
openclaw sessions list
# 检查 OpenClaw 错误日志
openclaw logs --tail 200
Quick reference card
| Platform | Key credentials | Connection mode | Special requirements |
|---|---|---|---|
| Feishu | App ID、App Secret | WebSocket persistent connection | 4 permissions,im.message.receive_v1 events |
| DingTalk (traditional bot) | AppKey、AppSecret、CorpId、AgentId | Stream mode | Card.Instance.Write、Card.Streaming.Write permissions |
| DingTalk (DEAP) | CorpId、DEAP API Key、Gateway Token | Connector tunnel | The Connector must be on the same server as the Gateway |
| Bot ID, bot secret | HTTP API | Add the server's public IP to the whitelist | |
| Discord | Bot Token | WebSocket Gateway | Enable Message Content Intent |
Environment variable reference
Use environment variables instead of hard-coded tokens in configuration files (recommended):
# 添加到 ~/.bashrc 或 ~/.zshrc
export OPENCLAW_GATEWAY_TOKEN="你的_gateway_token"
export DINGTALK_CLIENT_SECRET="你的_dingtalk_secret"
export FEISHU_APP_SECRET="你的_feishu_secret"
export BAILIAN_API_KEY="sk-sp-YOUR_KEY_HERE"
export QODER_PERSONAL_ACCESS_TOKEN="你的_qoder_api_key"
Then run source ~/.bashrc to apply the configuration. Some OpenClaw versions support using openclaw.json in $ENV_VAR syntax to reference environment variables.
Routine maintenance commands
Restart the Gateway:
systemctl restart openclaw
# 或手动方式:
pkill -f "openclaw gateway" && nohup setsid openclaw gateway --port 18789 --verbose > /tmp/openclaw-gateway.log 2>&1 &
Update OpenClaw:
openclaw update
# 或重新运行安装脚本:
curl -fsSL https://clawd.bot/install.sh | bash
Manage plugins:
openclaw plugins list
openclaw plugins update [插件名]
openclaw plugins install [插件名或 Git URL]
View runtime logs:
# Gateway 主日志
tail -f /tmp/openclaw-gateway.log
# 钉钉 DEAP Connector 日志
tail -f /tmp/dingtalk-connector.log
# 特定渠道日志
openclaw logs dingtalk -f
openclaw logs feishu -f
Troubleshooting entry point:
openclaw gateway status # Gateway 状态
openclaw channel list # 所有渠道状态
openclaw sessions list # ACP 会话列表
openclaw channel status dingtalk # 特定渠道状态
References
- OpenClaw official website
- OpenClaw official documentation
- OpenClaw GitHub
- Alibaba Cloud ECS console
- Alibaba Cloud Bailian console
- DingTalk Open Platform
- DingTalk DEAP Platform
- DingTalk enterprise internal application development guide
- DingTalk Bot Development Documentation
- Feishu Open Platform
- QQ Open Platform
- Discord Developer Portal
- ACP Protocol Specification
- Alibaba Cloud Lightweight Server Documentation