运行时依赖
安装命令
点击复制技能文档
OpenClaw 设置 部署 OpenClaw 到 Linux,启用 DingTalk、Feishu、Discord 或其他文档中记录的渠道,并验证网关健康状况。 使用此工作流 按照以下顺序运行此序列: 准备 Linux 运行时并安装 OpenClaw。 从官方文档中发现渠道(对于新的渠道请求是必需的)。 安装和验证渠道集成。 创建/合并 ~/.openclaw/openclaw.json。 配置并启动网关服务。 运行健康检查并收集日志。 先决条件 目标 Linux 主机的 SSH 访问权限(首选 Debian/Ubuntu)。 DingTalk 企业应用凭据(AppKey、AppSecret)用于官方连接器,或者 Feishu 应用凭据(App ID、App Secret),或者 Discord 机器人令牌。 DashScope API 密钥。 步骤 1:准备运行时 ssh root@<服务器> curl -fsSL https://deb.nodesource.com/setup_20.x | bash - apt-get install -y nodejs node --version npm --version 步骤 2:安装 OpenClaw 和渠道集成 npm install -g openclaw@latest openclaw --version # DingTalk 官方连接器 openclaw plugins install @dingtalk-real-ai/dingtalk-connector --pin # 或从官方 GitHub 仓库安装 openclaw plugins install https://github.com/DingTalk-Real-AI/dingtalk-openclaw-connector.git openclaw plugins list | grep dingtalk # Feishu 渠道 openclaw plugins install @openclaw/feishu openclaw plugins list | grep feishu # Discord 渠道(内置,无需额外插件) # 在步骤 3 中配置令牌,在步骤 4 中启动网关 如果从旧的 DingTalk 插件升级,首先卸载遗留的插件 ID,并且只在 plugins.allow 中保留官方连接器。 步骤 3:自动发现其他渠道从官方文档中 当用户要求超出当前设置的任何额外渠道时,首先执行以下操作: 打开 https://docs.openclaw.ai/channels/index。 从“支持的渠道”列表中识别请求的渠道页面。 打开每个渠道页面并提取: 是否为内置或基于插件的。 确切的安装命令(不要猜测包名称)。 所需的凭据/令牌和配置密钥。 在主机上应用安装/配置。 将渠道特定的注释记录到 ~/.openclaw/openclaw.json 中。 使用 references/channel-discovery.md 中的确切工作流。 步骤 4:配置 openclaw.json 创建或更新 ~/.openclaw/openclaw.json,包含: models.providers.bailian 用于 DashScope 端点和模型。 agents.defaults.model.primary 以 provider/model 格式,默认为 bailian/glm-5。 models.providers.bailian.models 按以下顺序排列:qwen3-plus、glm-5、minimax-m2.5、kimi-k2.5。 agents.defaults.model.fallbacks 按以下顺序排列:bailian/qwen3-plus、bailian/minimax-m2.5、bailian/kimi-k2.5。 channels.dingtalk-connector、channels.feishu 或 channels.discord 凭据和策略。 plugins.allow,包括已安装的渠道插件。 重要:代理级别的模型配置在 ~/.openclaw/agents/main/agent/models.json 中可以覆盖 ~/.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 中的 DingTalk 字段映射。 使用 references/feishu-setup.md 中的 Feishu 设置和字段映射。 使用 references/discord-setup.md 中的 Discord 设置和字段映射。 使用 references/channel-discovery.md 中的渠道发现工作流。 步骤 5:安装和启动网关 openclaw gateway install openclaw gateway start openclaw gateway status 如果使用用户级 systemd 运行,请在配置更改后重新加载: systemctl --user import-environment DASHSCOPE_API_KEY systemctl --user daemon-reload systemctl --user restart openclaw-gateway 步骤 6:验证和排除故障 openclaw doctor openclaw gateway status openclaw gateway logs -f 常见故障: 插件未加载:重新运行插件安装并检查 plugins.allow。 未知模型:检查 agents.defaults.model.primary 格式(provider/model-id)。 API 密钥错误:验证 models.providers.bailian.apiKey 和 DASHSCOPE_API_KEY 导入到 systemd 中。 配置更改但运行时模型未更改:检查和更新 ~/.openclaw/agents/main/agent/models.json。 空有效负载/意外回退:验证协议-端点对(openai-completions vs openai-responses),并在需要时清除过时的会话。 DingTalk 无响应:使用 openclaw logs --follow 并检查网关/渠道/dingtalk-connector 行以获取流重连或凭据问题。 官方连接器已安装,但旧探针不一致:依赖运行时日志和实际消息发送/接收作为真实来源。 Feishu 无响应:检查事件订阅模式是否为 WebSocket,并且网关正在运行。 Discord 无响应:验证机器人意图、令牌和首次 DM 配对批准。 安全注意事项 不要在存储库文件中硬编码真实的密钥。 将生产密钥保留在服务器本地配置或密钥管理器中。 在共享日志之前在票据或聊天中编辑日志。 验证 mkdir -p output/aliyun-ope