aliyun-openclaw-setup

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

OpenClaw 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:
  1. Prepare Linux runtime and install OpenClaw.
  2. Discover channels from official docs (required for new channel requests).
  3. Install and verify channel integrations.
  4. Create/merge
    ~/.openclaw/openclaw.json
    .
  5. Configure and start gateway service.
  6. Run health checks and collect logs.
请按顺序执行以下步骤:
  1. 准备Linux运行环境并安装OpenClaw。
  2. 从官方文档发现渠道(新增渠道请求时必须执行)。
  3. 安装并验证渠道集成。
  4. 创建/合并
    ~/.openclaw/openclaw.json
    配置文件。
  5. 配置并启动网关服务。
  6. 运行健康检查并收集日志。

Prerequisites

前置条件

  • SSH access to target Linux host (Debian/Ubuntu preferred).
  • DingTalk enterprise app credentials (
    AppKey
    ,
    AppSecret
    ) for the official connector, or Feishu app credentials (
    App ID
    ,
    App Secret
    ), or Discord bot token.
  • DashScope API key.
  • 拥有目标Linux主机的SSH访问权限(推荐Debian/Ubuntu系统)。
  • 官方连接器所需的钉钉企业应用凭证(
    AppKey
    AppSecret
    ),或飞书应用凭证(
    App ID
    App Secret
    ),或Discord机器人令牌。
  • 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 --version
bash
ssh root@<server>
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
apt-get install -y nodejs
node --version
npm --version

Step 2: Install OpenClaw and Channel Integrations

步骤2:安装OpenClaw和渠道集成插件

bash
npm install -g openclaw@latest
openclaw --version
bash
npm install -g openclaw@latest
openclaw --version

DingTalk 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:
  1. Open
    https://docs.openclaw.ai/channels/index
    .
  2. Identify requested channel pages from the "Supported channels" list.
  3. 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.
  4. Apply installation/configuration on host.
  5. Record channel-specific notes into
    ~/.openclaw/openclaw.json
    .
Use the exact workflow in references/channel-discovery.md.
当用户需要当前配置以外的额外渠道时,请先执行以下操作:
  1. 打开
    https://docs.openclaw.ai/channels/index
  2. 从「支持的渠道」列表中找到用户请求的渠道页面。
  3. 打开每个渠道页面,提取以下信息:
    • 属于内置功能还是需要安装插件。
    • 准确的安装命令(请勿猜测包名)。
    • 所需的凭证/令牌和配置键。
  4. 在主机上执行安装/配置操作。
  5. 将渠道专属说明记录到
    ~/.openclaw/openclaw.json
    中。
请严格遵循references/channel-discovery.md中的工作流操作。

Step 4: Configure
openclaw.json

步骤4:配置
openclaw.json

Create or update
~/.openclaw/openclaw.json
with:
  • models.providers.bailian
    for DashScope endpoint and models.
  • agents.defaults.model.primary
    in
    provider/model
    format, default to
    bailian/glm-5
    .
  • models.providers.bailian.models
    ordered as:
    1. qwen3-plus
    2. glm-5
    3. minimax-m2.5
    4. kimi-k2.5
  • agents.defaults.model.fallbacks
    ordered as:
    1. bailian/qwen3-plus
    2. bailian/minimax-m2.5
    3. bailian/kimi-k2.5
  • channels.dingtalk-connector
    ,
    channels.feishu
    , or
    channels.discord
    credentials and policy.
  • plugins.allow
    including installed channel plugins.
Important:
  • Agent-level model config at
    ~/.openclaw/agents/main/agent/models.json
    can override
    ~/.openclaw/openclaw.json
    .
  • Keep provider definitions aligned in both files when defaults appear not to take effect.
  • Protocol must match endpoint:
    • api: openai-completions
      -> use
      https://dashscope.aliyuncs.com/compatible-mode/v1
    • api: openai-responses
      -> use
      https://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
,配置以下内容:
  • models.providers.bailian
    :配置DashScope端点和模型。
  • agents.defaults.model.primary
    :使用
    服务商/模型
    格式,默认为
    bailian/glm-5
  • models.providers.bailian.models
    按以下顺序排列:
    1. qwen3-plus
    2. glm-5
    3. minimax-m2.5
    4. kimi-k2.5
  • agents.defaults.model.fallbacks
    按以下顺序排列:
    1. bailian/qwen3-plus
    2. bailian/minimax-m2.5
    3. bailian/kimi-k2.5
  • channels.dingtalk-connector
    channels.feishu
    channels.discord
    的凭证和策略。
  • plugins.allow
    包含已安装的渠道插件。
注意事项:
  • 位于
    ~/.openclaw/agents/main/agent/models.json
    的Agent级别模型配置可以覆盖
    ~/.openclaw/openclaw.json
    的配置。
  • 当默认配置未生效时,请保持两个文件中的服务商定义一致。
  • 协议必须与端点匹配:
    • api: openai-completions
      -> 使用
      https://dashscope.aliyuncs.com/compatible-mode/v1
    • api: openai-responses
      -> 使用
      https://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 status
If 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-gateway
bash
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-gateway

Step 6: Verify and Troubleshoot

步骤6:验证与排查

bash
openclaw doctor
openclaw gateway status
openclaw gateway logs -f
Common failures:
  • Plugin not loaded: re-run plugin install and check
    plugins.allow
    .
  • Unknown model: check
    agents.defaults.model.primary
    format (
    provider/model-id
    ).
  • API key error: verify
    models.providers.bailian.apiKey
    and
    DASHSCOPE_API_KEY
    imported in systemd.
  • Config changed but runtime model unchanged: check and update
    ~/.openclaw/agents/main/agent/models.json
    .
  • Empty payload / unexpected fallback: verify protocol-endpoint pair (
    openai-completions
    vs
    openai-responses
    ) and clear stale session if needed.
  • DingTalk no response: use
    openclaw logs --follow
    and check
    gateway/channels/dingtalk-connector
    lines for stream reconnect or credential issues.
  • 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密钥错误:验证
    models.providers.bailian.apiKey
    和systemd中导入的
    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.txt
Pass criteria: command exits 0 and
output/aliyun-openclaw-setup/validate.txt
is generated.
bash
mkdir -p output/aliyun-openclaw-setup
echo "validation_placeholder" > output/aliyun-openclaw-setup/validate.txt
通过标准:命令退出码为0,且成功生成
output/aliyun-openclaw-setup/validate.txt
文件。

Output 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

工作流

  1. Confirm user intent, region, identifiers, and whether the operation is read-only or mutating.
  2. Run one minimal read-only query first to verify connectivity and permissions.
  3. Execute the target operation with explicit parameters and bounded scope.
  4. Verify results and save output/evidence files.
  1. 确认用户需求、地域、标识,以及操作是只读还是会修改资源。
  2. 先执行一个最小化的只读查询,验证连通性和权限。
  3. 使用明确的参数和有限的范围执行目标操作。
  4. 验证结果并保存输出/凭证文件。