使用 飞书
使用火山方舟平台提供的Doubao-seed-1.8 语言模型 (0.0008-0.0024 元/千tokens)
使用kimi Moonshot 提供的联网搜索服务 (0.03元/次)
Linux/MacOs
curl -fsSL https://openclaw.ai/install.sh | bashWindows
powershell -c "irm https://openclaw.ai/install.ps1 | iex"# 0. (可选)配置代理注意(临时的,注意变更你的代理服务IP地址):
export HTTP_PROXY=http://192.168.31.82:7890
export HTTPS_PROXY=http://192.168.31.82:7890
# 测试链接性,提示200就是成功
apt install -y curl
curl -I https://www.google.com
# 1. 安装Python、Git、编译工具等核心依赖
apt install -y python3 python3-pip python3-venv git gcc g++ make libssl-dev libffi-dev
# 2. 升级pip到最新版
python3 -m pip install --upgrade pip setuptools wheel
(若提示error: externally-managed-environment错误,执行:)
apt install -y python3-pip python3-setuptools python3-wheel
# 3. 安装pnpm(最后提示pnpm版本即为成功)
curl -fsSL https://get.pnpm.io/install.sh | sh -
source ~/.bashrc
pnpm -v
# 4. 安装Node.js
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
source ~/.bashrc
nvm install 22.18.0
nvm use 22.18.0
# 1. 克隆OpenClaw仓库(官方最新版)
git clone https://github.com/openclaw/openclaw.git /opt/openclaw
cd /opt/openclaw# 1. 安装依赖
pnpm install
# 2. 编译UI程序
pnpm ui:build
# 3. 编译主程序
pnpm build
# 4.运行配置程序
pnpm openclaw onboard --install-daemon
# Dev loop (auto-reload on source/config changes) 监控运行状态
pnpm gateway:watchhttps://open.feishu.cn/ 进行注册并进入网页
登录后进入 → 开发者后台 → 应用列表 → 点击「创建应用」
选择 企业自建应用, 填写相关信息创建后进入应用详情页
添加应用能力 → 机器人
权限管理 → 开通权限 → 批量导入替换以下内容并确认
{
"scopes": {
"tenant": [
"base:app:copy",
"base:app:create",
"base:app:read",
"base:app:update",
"base:collaborator:create",
"base:collaborator:delete",
"base:collaborator:read",
"base:dashboard:copy",
"base:dashboard:read",
"base:field:create",
"base:field:delete",
"base:field:read",
"base:field:update",
"base:form:read",
"base:form:update",
"base:record:create",
"base:record:delete",
"base:record:read",
"base:record:retrieve",
"base:record:update",
"base:role:create",
"base:role:delete",
"base:role:read",
"base:role:update",
"base:table:create",
"base:table:delete",
"base:table:read",
"base:table:update",
"base:view:read",
"base:view:write_only",
"bitable:app",
"bitable:app:readonly",
"board:whiteboard:node:create",
"board:whiteboard:node:delete",
"board:whiteboard:node:read",
"board:whiteboard:node:update",
"contact:contact.base:readonly",
"contact:user.base:readonly",
"contact:user.employee_id:readonly",
"contact:user.employee_number:read",
"contact:user.id:readonly",
"docs:doc",
"docs:doc:readonly",
"docs:document.comment:create",
"docs:document.comment:read",
"docs:document.comment:update",
"docs:document.comment:write_only",
"docs:document.content:read",
"docs:document.media:download",
"docs:document.media:upload",
"docs:document.subscription",
"docs:document.subscription:read",
"docs:document:copy",
"docs:document:export",
"docs:document:import",
"docs:event.document_deleted:read",
"docs:event.document_edited:read",
"docs:event.document_opened:read",
"docs:event:subscribe",
"docs:permission.member",
"docs:permission.member:auth",
"docs:permission.member:create",
"docs:permission.member:delete",
"docs:permission.member:readonly",
"docs:permission.member:retrieve",
"docs:permission.member:transfer",
"docs:permission.member:update",
"docs:permission.setting",
"docs:permission.setting:read",
"docs:permission.setting:readonly",
"docs:permission.setting:write_only",
"docx:document",
"docx:document.block:convert",
"docx:document:create",
"docx:document:readonly",
"drive:drive",
"drive:drive.metadata:readonly",
"drive:drive.search:readonly",
"drive:drive:readonly",
"drive:drive:version",
"drive:drive:version:readonly",
"drive:export:readonly",
"drive:file",
"drive:file.like:readonly",
"drive:file.meta.sec_label.read_only",
"drive:file:download",
"drive:file:readonly",
"drive:file:upload",
"drive:file:view_record:readonly",
"event:ip_list",
"im:app_feed_card:write",
"im:biz_entity_tag_relation:read",
"im:biz_entity_tag_relation:write",
"im:chat",
"im:chat.access_event.bot_p2p_chat:read",
"im:chat.announcement:read",
"im:chat.announcement:write_only",
"im:chat.chat_pins:read",
"im:chat.chat_pins:write_only",
"im:chat.collab_plugins:read",
"im:chat.collab_plugins:write_only",
"im:chat.managers:write_only",
"im:chat.members:bot_access",
"im:chat.members:read",
"im:chat.members:write_only",
"im:chat.menu_tree:read",
"im:chat.menu_tree:write_only",
"im:chat.moderation:read",
"im:chat.tabs:read",
"im:chat.tabs:write_only",
"im:chat.top_notice:write_only",
"im:chat.widgets:read",
"im:chat.widgets:write_only",
"im:chat:create",
"im:chat:delete",
"im:chat:moderation:write_only",
"im:chat:operate_as_owner",
"im:chat:read",
"im:chat:readonly",
"im:chat:update",
"im:datasync.feed_card.time_sensitive:write",
"im:message",
"im:message.group_at_msg:readonly",
"im:message.group_msg",
"im:message.p2p_msg:readonly",
"im:message.pins:read",
"im:message.pins:write_only",
"im:message.reactions:read",
"im:message.reactions:write_only",
"im:message.urgent",
"im:message.urgent.status:write",
"im:message.urgent:phone",
"im:message.urgent:sms",
"im:message:readonly",
"im:message:recall",
"im:message:send_as_bot",
"im:message:send_multi_depts",
"im:message:send_multi_users",
"im:message:send_sys_msg",
"im:message:update",
"im:resource",
"im:tag:read",
"im:tag:write",
"im:url_preview.update",
"im:user_agent:read",
"sheets:spreadsheet",
"sheets:spreadsheet.meta:read",
"sheets:spreadsheet.meta:write_only",
"sheets:spreadsheet:create",
"sheets:spreadsheet:read",
"sheets:spreadsheet:readonly",
"sheets:spreadsheet:write_only",
"space:document.event:read",
"space:document:delete",
"space:document:move",
"space:document:retrieve",
"space:document:shortcut",
"space:folder:create",
"wiki:member:create",
"wiki:member:retrieve",
"wiki:member:update",
"wiki:node:copy",
"wiki:node:create",
"wiki:node:move",
"wiki:node:read",
"wiki:node:retrieve",
"wiki:node:update",
"wiki:setting:read",
"wiki:setting:write_only",
"wiki:space:read",
"wiki:space:retrieve",
"wiki:space:write_only",
"wiki:wiki",
"wiki:wiki:readonly"
]
}
}事件与回调 → 时间配置 → 订阅方式 → 长连接 → 保存 → 添加事件 → 勾选消息与群主所有事件 → 添加
上方创建版本发布 → 填写版本信息和版本说明 → 提交审核 → 管理员打开飞书客户端 → 开发者小助手收到审核消息 → 进入管理后台审核 → 点击操作列审核按钮 → 右上角 → 通过 → 客户端开发者小助手收到应用消息 → 成功
左侧菜单 → 凭证与基础信息 → 在 应用凭证 区域获取 App ID 和 App Secret
访问 https://platform.moonshot.cn/ → 右上角 注册 并登录 → 进入 用户中心 → API Key 管理 → 新建API Key
# 1. I understand this is personal-by-default and shared/multi-user use requires lock-down. Continue?(我明白这默认情况下是个人使用的,而多人共用/多用户使用则需要进行限制设置。继续吗?)
按左右选择yes继续
# 2. Setup mode(安装模式)
直接回车选择QuickStart快速安装
# 3. Model/auth Provider(模型/授权 提供者)
按上下进行切换,回车确认, 我这里使用火山方舟的,选择Volcano Engine,需自行去火山方舟去注册和开通账号和模型,链接:https://console.volcengine.com/
# 4. Default model (默认模型)
按上下进行切换,回车确认,选择要使用的模型,不同的模型能力和收费不同,根据自己的需要选择,我这里选择了Doubao-seed-1.8-xxx xxx为版本号
# 5. Select channel(QuickStart) 选择频道(快速开始)
按上下进行切换,回车确认,选择聊天交互的程序,以飞书为例选择Feishu
# 6. How do you want to provide this App Secret?(您打算如何提供这个应用的密钥?)
选择Enter App Secret,手动输入
# 7. Enter Feishu App Secret(输入飞书App Secret)
复制粘贴飞书的App Secret 并回车
# 8. Enter Feishu App ID(输入飞书App ID)
复制粘贴飞书的App ID 并回车
# 9.Feishu connection mode(飞书连接模式)
直接回车选择WebSocket(default)
# 10. Which Feishu domain?(哪个飞书域名?)
直接回车选择Feishu(feishu.cn)国内访问的域名
# 11.Group chat policy(群聊政策)
选择选择第二个Open - respond in all groups 所有聊天群都可使用
# 12. (可选,若选择了指定聊天群的需要配置)Group chat allowlist (chat_ids)
打开飞书客户端并登录 → 创建群聊(或已有群聊) → 点击群聊右上角三个点 → 设置 → 拉到最下面复制群聊ID → 粘贴输入 并回车
# 13. Search provider(搜索策略)
选择Kimi Moonshot
# 14. Enter Kimi API Key(输入kimi api key)
复制粘贴kimi的API Key 并回车
# 15. Configure skills now?(现在配置技能?)
直接回车选yes
# 16. Install missing skill dependencies(安装技能依赖?)
上下高亮空格选中,然后回车,先跳过,后面需要再装
# 17. Set GOOGLE_PLACES_API_KEY for goplaces?(设置Google位置服务APIKEY?)
直接回车, 跳过
# 18. Set NOTION_API_KEY for notion (设置NOTION?)
直接回车,跳过
# 19. Set OPENAI_API_KEY for openai-image-gen?(设置OPENAI 图像生成?)
直接回车,跳过
# 20. Set OPENAI_API_KEY for openai-whisper-gen?(设置OPENAI 声音?)
直接回车,跳过
# 21. Set ELEVENLABS_API_KEY for sag?(设置sag ?)
直接回车,跳过
# 22. Enable hooks(设置钩子?)
直接空格选择再回车,选跳过。钩子可让您在发出代理命令时自动执行操作。示例:在发出 /new 或 /reset 命令时将会话上下文保存到内存中。
等待安装完成配置完成之后会自动启动
在飞书客户端的机器人应用中提问测试吧
# 启动
systemctl --user start openclaw-gateway.service
# 重启
systemctl --user restart openclaw-gateway.service
# 停止
systemctl --user stop openclaw-gateway.service
# 状态
systemctl --user status openclaw-gateway.service pnpm管理:
cd /opt/openclaw
# 前台启动,能看到实时报错
pnpm openclaw gateway start