本地搭建小龙虾
下载安装note和git环境 ---powershell
https://nodejs.org/zh-cn/download
https://openclaw-docs.dx3n.cn/tutorials/
Git下载
Set-ExecutionPolicy RemoteSigned -Scope LocalMachine
npm install -g openclaw@2026.5.7 --registry=https://registry.npmmirror.com
# 初始化 openclaw onboard
openclaw setup
openclaw config
npx -y @larksuite/openclaw-lark install ---------飞书插件
openclaw plugins install @openclaw/feishu
npx -y @tencent-weixin/openclaw-weixin-cli@latest install ---------微信 --------------二维码
openclaw channels login --channel openclaw-weixin
npx -y @wecom/wecom-openclaw-cli install 企业微信
openclaw plugins install "@tencent-weixin/openclaw-weixin@latest"
飞书权限
{ "scopes": { "tenant": [ "aily:file:read", "aily:file:write", "application:application.app_message_stats.overview:readonly", "application:application:self_manage", "application:bot.menu:write", "cardkit:card:read", "cardkit:card:write", "contact:contact.base:readonly", "contact:user.employee_id:readonly", "corehr:file:download", "event:ip_list", "im:chat.access_event.bot_p2p_chat:read", "im:chat.members:bot_access", "im:message", "im:message.group_at_msg:readonly", "im:message.p2p_msg:readonly", "im:message:readonly", "im:message:send_as_bot", "im:resource" ], "user": [ "aily:file:read", "aily:file:write", "contact:contact.base:readonly", "im:chat.access_event.bot_p2p_chat:read" ] } }
# 填入你的 AppID(cli_xxx) openclaw config set channels.feishu.appId "cli_你的AppID"
# 填入你的 AppSecret openclaw config set channels.feishu.appSecret "你的AppSecret"
点击添加事件,可以进行搜索
搜索im.chat.member.
im.message.receive_v1
wiki:wiki,wiki:wiki:readonly,wiki:node:read
# 关闭授权询问
openclaw config set tools.exec.ask off
openclaw config set tools.profile "full" 启动工具能改左面
# 开放完整执行权限
openclaw config set tools.exec.security full
# 开放文件读写
openclaw config set tools.file.security full
openclaw config set tools.file.write true
openclaw config set tools.file.delete true
# 开放主机命令(网页端才能操作)
openclaw config set tools.exec.host gateway
关闭授权弹窗命令
openclaw config set tools.exec.ask off
openclaw config set tools.exec.security full
openclaw config set approvals.exec.enabled false
openclaw restart
pkill -f openclaw
openclaw config set tools.exec.ask off
openclaw config set tools.exec.security full
openclaw config save
openclaw gateway --port 18789 --force
离线部署
方式 A:手动创建离线配置文件(推荐,一劳永逸)
- 在虚拟机中,打开文件管理器,创建文件夹:
C:\Users\xxb\.openclaw - 在该文件夹内新建文件
config.yaml,复制粘贴以下离线专用配置(直接用,无需修改,除非你换了模型名):yaml# OpenClaw 离线虚拟机专用配置 gateway: mode: local # 本地模式,不对外暴露 port: 18789 host: 127.0.0.1 # 仅监听本地,彻底隔离外网 model: provider: ollama # 绑定本地Ollama模型,完全离线 ollama: endpoint: http://localhost:11434 model: qwen2.5:7b # 替换为你本地的模型名 offline: enabled: true # 强制开启离线模式,禁止所有联网 network: enable: false # 彻底禁用网络请求
第一步:获取 Tavily API Key
1. 访问 Tavily 官网(tavily.com)
2. 注册账号
3. 在 Dashboard 中获取 API Key
注意:免费版有每月 1000 次搜索额度,足够个人使用。
第二步:在 OpenClaw 中配置
找到你的 OpenClaw 配置文件(通常在 ~/.openclaw/ 目录),添加环境变量:
TAVILY_API_KEY=你的APIKey
或者直接在终端设置:
export TAVILY_API_KEY=你的APIKey
第三步:重启 OpenClaw
openclaw restart
第四步:测试搜索
在聊天框输入:“搜索今天的热点新闻”
如果正常返回搜索结果,说明配置成功!
解决端口占用问题
端口 18789 被占用
netstat -ano | findstr :18789
taskkill /PID 12345 /F
网关链接不上就是浏览器的问题
# 1. 允许非安全认证(解决跨域问题)
openclaw config set gateway.controlUi.allowInsecureAuth true
# 2. 关键步骤:禁用设备身份验证(允许 HTTP 访问)
openclaw config set gateway.controlUi.dangerouslyDisableDeviceAuth true
openclaw config set gateway.controlUi.allowedOrigins '["*"]'
苹果电脑 sudo chown -R $(whoami) ~/.openclaw
openclaw config set gateway.controlUi.dangerouslyDisableDeviceAuth false
关闭私聊 & 群组白名单限制
# 私聊改成开放
openclaw config set channels.feishu.dmPolicy open
# 群聊改成开放
openclaw config set channels.feishu.groupPolicy open
openclaw plugins install @dingtalk-real-ai/dingtalk-connector
openclaw config set channels.dingtalk-connector.enabled true
openclaw config set channels.dingtalk-connector.mode "stream"
openclaw config set channels.dingtalk-connector.clientId "你的Client ID"
openclaw config set channels.dingtalk-connector.clientSecret "你的Client Secret"
openclaw config set agents.defaults.imageModel "你的模型ID" 本地模型识图

浙公网安备 33010602011771号