本地搭建小龙虾

下载安装note和git环境   ---powershell

https://nodejs.org/zh-cn/download

https://openclaw-docs.dx3n.cn/tutorials/

Git下载

这里下载Git-2.42.0.2-64-bit.exe

Set-ExecutionPolicy RemoteSigned -Scope LocalMachine

 npm install -g openclaw@2026.5.7 --registry=https://registry.npmmirror.com

管理工具https://claw.qt.cool/

# 初始化 openclaw onboard

openclaw     setup

openclaw config

 openclaw gateway启动网关
打开网页面板
openclaw dashboard
 
 恢复备份文件    cp ~/.openclaw/openclaw.json.bak ~/.openclaw/openclaw.json
配置上下文
open ~/.openclaw/openclaw.json
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
当用户给你飞书知识库/wiki 链接时,请不要直接网页访问。私有飞书链接通常会跳转登录页。 请使用飞书 OpenAPI 读取: 1. 从链接提取 wiki token。 2. 用 FEISHU_APP_ID 和 FEISHU_APP_SECRET 获取 tenant_access_token: POST https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal 3. 用 wiki token 解析节点: GET https://open.feishu.cn/open-apis/wiki/v2/spaces/get_node?token=<wiki_token> 4. 从返回中取 data.node.obj_token 和 data.node.obj_type。 5. 如果 obj_type=docx,用: GET https://open.feishu.cn/open-apis/docx/v1/documents/<obj_token>/raw_content 6. 从返回中取 data.content 作为文档正文。 7. 如果报权限错误,提示管理员开通 wiki:node:read / wiki:wiki:readonly / docx:document:readonly 等权限。 8. 不要把登录页 HTML 当作文档内容。 本项目知识库: wiki token = VSncwo2STiQClbkjs3HcZHxanye docx obj_token = Tj7Hdc0h1oJ9KXxmDczcM2KDn6d 标题 = 良策双平台项目SPEC@@hermes智能助手
 

# 关闭授权询问
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:手动创建离线配置文件(推荐,一劳永逸)
 
  1. 在虚拟机中,打开文件管理器,创建文件夹:C:\Users\xxb\.openclaw
  2. 在该文件夹内新建文件 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


关闭私聊 & 群组白名单限制

 
bash
 
运行
 
 
 
# 私聊改成开放
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"  本地模型识图
×
拖拽到此处完成下载
图片将完成下载
AIX智能下载器
posted @ 2026-03-30 18:48  让-雅克-卢梭  阅读(21)  评论(0)    收藏  举报