aliyun-openclaw-setup
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseOpenClaw Setup
OpenClaw 安装配置
Deploy OpenClaw on Linux, enable DingTalk, Feishu, Discord, or other documented channels, and verify gateway health.
在Linux上部署OpenClaw,启用钉钉、飞书、Discord或其他文档中记录的渠道,并验证网关健康状态。
Use This Workflow
使用本工作流
Run this sequence in order:
- Prepare Linux runtime and install OpenClaw.
- Discover channels from official docs (required for new channel requests).
- Install and verify channel integrations.
- Create/merge .
~/.openclaw/openclaw.json - Configure and start gateway service.
- Run health checks and collect logs.
请按顺序执行以下步骤:
- 准备Linux运行环境并安装OpenClaw。
- 从官方文档发现渠道(新增渠道请求时必须执行)。
- 安装并验证渠道集成。
- 创建/合并配置文件。
~/.openclaw/openclaw.json - 配置并启动网关服务。
- 运行健康检查并收集日志。
Prerequisites
前置条件
- SSH access to target Linux host (Debian/Ubuntu preferred).
- DingTalk enterprise app credentials (,
AppKey) for the official connector, or Feishu app credentials (AppSecret,App ID), or Discord bot token.App Secret - DashScope API key.
- 拥有目标Linux主机的SSH访问权限(推荐Debian/Ubuntu系统)。
- 官方连接器所需的钉钉企业应用凭证(、
AppKey),或飞书应用凭证(AppSecret、App ID),或Discord机器人令牌。App Secret - DashScope API密钥。
Step 1: Prepare Runtime
步骤1:准备运行环境
bash
ssh root@<server>
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
apt-get install -y nodejs
node --version
npm --versionbash
ssh root@<server>
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
apt-get install -y nodejs
node --version
npm --versionStep 2: Install OpenClaw and Channel Integrations
步骤2:安装OpenClaw和渠道集成插件
bash
npm install -g openclaw@latest
openclaw --versionbash
npm install -g openclaw@latest
openclaw --versionDingTalk official connector
钉钉官方连接器
openclaw plugins install @dingtalk-real-ai/dingtalk-connector --pin
openclaw plugins install @dingtalk-real-ai/dingtalk-connector --pin
or install from official GitHub repo
或者从官方GitHub仓库安装
openclaw plugins install https://github.com/DingTalk-Real-AI/dingtalk-openclaw-connector.git
openclaw plugins list | grep dingtalk
openclaw plugins install https://github.com/DingTalk-Real-AI/dingtalk-openclaw-connector.git
openclaw plugins list | grep dingtalk
Feishu channel
飞书渠道
openclaw plugins install @openclaw/feishu
openclaw plugins list | grep feishu
openclaw plugins install @openclaw/feishu
openclaw plugins list | grep feishu
Discord channel (built-in, no extra plugin needed)
Discord渠道(内置,无需额外安装插件)
Configure token in Step 3 and start gateway in Step 4
请在步骤3中配置令牌,步骤4中启动网关
If upgrading from old DingTalk plugins, uninstall legacy plugin IDs first and keep only the official connector in `plugins.allow`.
如果是从旧版钉钉插件升级,请先卸载旧版本插件ID,仅在`plugins.allow`中保留官方连接器。Step 3: Auto-Discover Additional Channels from Official Docs
步骤3:从官方文档自动发现额外渠道
When user asks for any extra channel beyond current setup, do this first:
- Open .
https://docs.openclaw.ai/channels/index - Identify requested channel pages from the "Supported channels" list.
- Open each channel page and extract:
- Whether it is built-in or plugin-based.
- Exact install command (do not guess package names).
- Required credentials/tokens and config keys.
- Apply installation/configuration on host.
- Record channel-specific notes into .
~/.openclaw/openclaw.json
Use the exact workflow in references/channel-discovery.md.
当用户需要当前配置以外的额外渠道时,请先执行以下操作:
- 打开。
https://docs.openclaw.ai/channels/index - 从「支持的渠道」列表中找到用户请求的渠道页面。
- 打开每个渠道页面,提取以下信息:
- 属于内置功能还是需要安装插件。
- 准确的安装命令(请勿猜测包名)。
- 所需的凭证/令牌和配置键。
- 在主机上执行安装/配置操作。
- 将渠道专属说明记录到中。
~/.openclaw/openclaw.json
请严格遵循references/channel-discovery.md中的工作流操作。
Step 4: Configure openclaw.json
openclaw.json步骤4:配置openclaw.json
openclaw.jsonCreate or update with:
~/.openclaw/openclaw.json- for DashScope endpoint and models.
models.providers.bailian - in
agents.defaults.model.primaryformat, default toprovider/model.bailian/glm-5 - ordered as:
models.providers.bailian.modelsqwen3-plusglm-5minimax-m2.5kimi-k2.5
- ordered as:
agents.defaults.model.fallbacksbailian/qwen3-plusbailian/minimax-m2.5bailian/kimi-k2.5
- ,
channels.dingtalk-connector, orchannels.feishucredentials and policy.channels.discord - including installed channel plugins.
plugins.allow
Important:
- Agent-level model config at can override
~/.openclaw/agents/main/agent/models.json.~/.openclaw/openclaw.json - Keep provider definitions aligned in both files when defaults appear not to take effect.
- Protocol must match endpoint:
- -> use
api: openai-completionshttps://dashscope.aliyuncs.com/compatible-mode/v1 - -> use
api: openai-responseshttps://dashscope.aliyuncs.com/api/v2/apps/protocols/compatible-mode/v1
Use the full template in references/config.md.
Use DingTalk field mapping in references/dingtalk-setup.md.
Use Feishu setup and field mapping in references/feishu-setup.md.
Use Discord setup and field mapping in references/discord-setup.md.
Use channel discovery workflow in references/channel-discovery.md.
创建或更新,配置以下内容:
~/.openclaw/openclaw.json- :配置DashScope端点和模型。
models.providers.bailian - :使用
agents.defaults.model.primary格式,默认为服务商/模型。bailian/glm-5 - 按以下顺序排列:
models.providers.bailian.modelsqwen3-plusglm-5minimax-m2.5kimi-k2.5
- 按以下顺序排列:
agents.defaults.model.fallbacksbailian/qwen3-plusbailian/minimax-m2.5bailian/kimi-k2.5
- 、
channels.dingtalk-connector或channels.feishu的凭证和策略。channels.discord - 包含已安装的渠道插件。
plugins.allow
注意事项:
- 位于的Agent级别模型配置可以覆盖
~/.openclaw/agents/main/agent/models.json的配置。~/.openclaw/openclaw.json - 当默认配置未生效时,请保持两个文件中的服务商定义一致。
- 协议必须与端点匹配:
- -> 使用
api: openai-completionshttps://dashscope.aliyuncs.com/compatible-mode/v1 - -> 使用
api: openai-responseshttps://dashscope.aliyuncs.com/api/v2/apps/protocols/compatible-mode/v1
请使用references/config.md中的完整模板。
请参考references/dingtalk-setup.md中的钉钉字段映射规则。
请参考references/feishu-setup.md中的飞书安装和字段映射规则。
请参考references/discord-setup.md中的Discord安装和字段映射规则。
请参考references/channel-discovery.md中的渠道发现工作流。
Step 5: Install and Start Gateway
步骤5:安装并启动网关
bash
openclaw gateway install
openclaw gateway start
openclaw gateway statusIf running with user-level systemd, reload after config changes:
bash
systemctl --user import-environment DASHSCOPE_API_KEY
systemctl --user daemon-reload
systemctl --user restart openclaw-gatewaybash
openclaw gateway install
openclaw gateway start
openclaw gateway status如果使用用户级systemd运行,修改配置后需要重载:
bash
systemctl --user import-environment DASHSCOPE_API_KEY
systemctl --user daemon-reload
systemctl --user restart openclaw-gatewayStep 6: Verify and Troubleshoot
步骤6:验证与排查
bash
openclaw doctor
openclaw gateway status
openclaw gateway logs -fCommon failures:
- Plugin not loaded: re-run plugin install and check .
plugins.allow - Unknown model: check format (
agents.defaults.model.primary).provider/model-id - API key error: verify and
models.providers.bailian.apiKeyimported in systemd.DASHSCOPE_API_KEY - Config changed but runtime model unchanged: check and update .
~/.openclaw/agents/main/agent/models.json - Empty payload / unexpected fallback: verify protocol-endpoint pair (vs
openai-completions) and clear stale session if needed.openai-responses - DingTalk no response: use and check
openclaw logs --followlines for stream reconnect or credential issues.gateway/channels/dingtalk-connector - Official connector installed but old probes inconsistent: rely on runtime logs and real message send/receive as source of truth.
- Feishu no response: check event subscription mode is WebSocket and gateway is running.
- Discord no response: verify bot intents, token, and first-DM pairing approval.
bash
openclaw doctor
openclaw gateway status
openclaw gateway logs -f常见故障:
- 插件未加载:重新执行插件安装命令,检查配置。
plugins.allow - 未知模型:检查格式(
agents.defaults.model.primary)。服务商/模型ID - API密钥错误:验证和systemd中导入的
models.providers.bailian.apiKey是否正确。DASHSCOPE_API_KEY - 配置已修改但运行时模型未更新:检查并更新。
~/.openclaw/agents/main/agent/models.json - 空 payload / 意外触发降级:验证协议-端点配对(和
openai-completions),必要时清理过期会话。openai-responses - 钉钉无响应:执行,查看
openclaw logs --follow相关日志排查流重连或凭证问题。gateway/channels/dingtalk-connector - 已安装官方连接器但旧探针数据不一致:以运行时日志和真实消息收发结果为准。
- 飞书无响应:检查事件订阅模式是否为WebSocket,网关是否正常运行。
- Discord无响应:验证机器人意图、令牌,以及首次DM配对是否已批准。
Security Notes
安全注意事项
- Do not hardcode real secrets in repository files.
- Keep production keys in server-local configs or secret managers.
- Redact logs before sharing in tickets or chat.
- 请勿在仓库文件中硬编码真实密钥。
- 生产环境密钥请保存在服务器本地配置或密钥管理服务中。
- 共享日志到工单或聊天前请脱敏。
Validation
验证
bash
mkdir -p output/aliyun-openclaw-setup
echo "validation_placeholder" > output/aliyun-openclaw-setup/validate.txtPass criteria: command exits 0 and is generated.
output/aliyun-openclaw-setup/validate.txtbash
mkdir -p output/aliyun-openclaw-setup
echo "validation_placeholder" > output/aliyun-openclaw-setup/validate.txt通过标准:命令退出码为0,且成功生成文件。
output/aliyun-openclaw-setup/validate.txtOutput And Evidence
输出与凭证
- Save artifacts, command outputs, and API response summaries under .
output/aliyun-openclaw-setup/ - Include key parameters (region/resource id/time range) in evidence files for reproducibility.
- 将构建产物、命令输出和API响应摘要保存到目录下。
output/aliyun-openclaw-setup/ - 在凭证文件中包含关键参数(地域/资源ID/时间范围),便于复现问题。
Workflow
工作流
- Confirm user intent, region, identifiers, and whether the operation is read-only or mutating.
- Run one minimal read-only query first to verify connectivity and permissions.
- Execute the target operation with explicit parameters and bounded scope.
- Verify results and save output/evidence files.
- 确认用户需求、地域、标识,以及操作是只读还是会修改资源。
- 先执行一个最小化的只读查询,验证连通性和权限。
- 使用明确的参数和有限的范围执行目标操作。
- 验证结果并保存输出/凭证文件。