alicloud-platform-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,启用DingTalk、Feishu、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
    ,
    AgentId
    ,
    CorpId
    ) or Feishu app credentials (
    App ID
    ,
    App Secret
    ) or Discord bot token.
  • DashScope API key.
  • 拥有目标Linux主机的SSH访问权限(推荐Debian/Ubuntu系统)。
  • DingTalk企业应用凭证(
    AppKey
    AppSecret
    AgentId
    CorpId
    )或Feishu应用凭证(
    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 channel

DingTalk channel

openclaw plugins install @soimy/dingtalk openclaw plugins list | grep dingtalk
openclaw plugins install @soimy/dingtalk openclaw plugins list | grep dingtalk

Feishu channel

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 channel (built-in, no extra plugin needed)

Configure token in Step 3 and start gateway in Step 4

Configure token in Step 3 and start gateway in Step 4


If plugin dependencies are missing:

```bash
cd ~/.openclaw/extensions/dingtalk
npm install dingtalk-stream axios form-data zod --save

如果缺少插件依赖:

```bash
cd ~/.openclaw/extensions/dingtalk
npm install dingtalk-stream axios form-data zod --save

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. 打开每个渠道页面,提取以下信息:
    • 该渠道是内置支持还是需要安装插件。
    • 准确的安装命令(不要猜测包名)。
    • 所需的凭证/令牌以及配置项key。
  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.
  • channels.dingtalk
    ,
    channels.feishu
    , or
    channels.discord
    credentials and policy.
  • plugins.allow
    including installed channel plugins.
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
    :格式为
    供应商/模型名
  • channels.dingtalk
    channels.feishu
    channels.discord
    :配置对应渠道的凭证和策略。
  • plugins.allow
    :包含已安装的渠道插件。
请使用references/config.md中的完整模板。 DingTalk字段映射参考references/dingtalk-setup.md。 Feishu安装配置和字段映射参考references/feishu-setup.md。 Discord安装配置和字段映射参考references/discord-setup.md。 渠道发现工作流参考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 daemon-reload
systemctl --user restart openclaw-gateway
bash
openclaw gateway install
openclaw gateway start
openclaw gateway status
如果使用用户级systemd运行,修改配置后需要重载:
bash
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
    .
  • DingTalk no response: check app publish status and required permissions.
  • 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
    配置。
  • DingTalk无响应:检查应用发布状态和所需权限是否配置正确。
  • Feishu无响应:检查事件订阅模式是否为WebSocket,网关是否正常运行。
  • Discord无响应:验证机器人权限(intents)、令牌是否正确,是否通过首次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.
  • 不要在仓库文件中硬编码真实密钥。
  • 生产环境密钥请存储在服务器本地配置或密钥管理服务中。
  • 在工单或聊天中分享日志前请脱敏敏感信息。