windows电脑安装openclaw步骤(养龙虾)

windows电脑安装openclaw

* 安装nodejs 版本大于20

* 安装pnpm:npm install -g pnpm

* 安装git

下面命令都在powershell中以管理员身份执行

复制代码
* npm config set registry https://registry.npmmirror.com

可能提示:

复制代码
npm : 无法加载文件 D:\nodejs\npm.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https:/go.microsoft.com/fwlink/?LinkID=135170 中的 about_Executio

* 然后执行:

复制代码
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass -Force

* 再执行

复制代码
pnpm add -g openclaw  

耐心等等。。。

* 然后选择快速安装

安装完成后会输出done......

安装完正常会自动打开浏览器,如果没有,再执行

复制代码
openclaw onboard

* 然后是配置模型,以阿里的通义千问模型为例:

找到配置文件,一般路径在:C:\Users\Administrator\.openclaw\openclaw.json文件

打开后默认是下面的配置:

复制代码
{
  "wizard": {
    "lastRunAt": "2026-03-10T13:33:13.090Z",
    "lastRunVersion": "2026.3.8",
    "lastRunCommand": "onboard",
    "lastRunMode": "local"
  },
  "agents": {
    "defaults": {
      "workspace": "C:\\Users\\Administrator\\.openclaw\\workspace",
      "compaction": {
        "mode": "safeguard"
      },
      "maxConcurrent": 4,
      "subagents": {
        "maxConcurrent": 8
      }
    }
  },
  "tools": {
    "profile": "coding"
  },
  "messages": {
    "ackReactionScope": "group-mentions"
  },
  "commands": {
    "native": "auto",
    "nativeSkills": "auto",
    "restart": true,
    "ownerDisplay": "raw"
  },
  "session": {
    "dmScope": "per-channel-peer"
  },
  "gateway": {
    "port": 18789,
    "mode": "local",
    "bind": "loopback",
    "auth": {
      "mode": "token",
      "token": "__OPENCLAW_REDACTED__"
    },
    "tailscale": {
      "mode": "off",
      "resetOnExit": false
    },
    "nodes": {
      "denyCommands": [
        "camera.snap",
        "camera.clip",
        "screen.record",
        "contacts.add",
        "calendar.add",
        "reminders.add",
        "sms.send"
      ]
    }
  },
  "meta": {
    "lastTouchedVersion": "2026.3.8",
    "lastTouchedAt": "2026-03-10T13:33:13.111Z"
  }
}

配置完千问模型后如下:

复制代码
{
  "wizard": {
    "lastRunAt": "2026-03-10T13:33:13.090Z",
    "lastRunVersion": "2026.3.8",
    "lastRunCommand": "onboard",
    "lastRunMode": "local"
  },
  "models": {
    "mode": "merge",
    "providers": {
      "bailian": {  
        "baseUrl": "https://dashscope.aliyuncs.com/compatible-mode/v1", //北京区域的地址,具体可参考https://help.aliyun.com/zh/model-studio/openclaw#step-config-section
        "apiKey": "", //百炼平台的秘钥
        "api": "openai-completions",  
        "models": [  
          {
            "id": "qwen3-max-2026-01-23",  // qwen-max模型ID(需与百炼平台一致,可在「模型列表」中查看)
            "name": "通义千问Max",  // 模型别名(自定义,便于识别)
            "reasoning": false,  // 必须关闭(否则回复内容为空)
            "input": ["text"],  // 支持输入类型(文本)
            "contextWindow": 262144,  // 上下文窗口大小(qwen3-max的最大支持值)
            "maxTokens": 65536  // 最大输出Token数(可根据需求调整)
          }
        ]
      }
    }
  },
  "agents": {
    "defaults": {
      "workspace": "C:\\Users\\Administrator\\.openclaw\\workspace",
      "compaction": {
        "mode": "safeguard"
      },
      "maxConcurrent": 4,
      "subagents": {
        "maxConcurrent": 8
      },
      "model": {
        "primary": "bailian/qwen3-max-2026-01-23"  // 设置qwen-max为默认模型(格式:provider/modelID)
      },
      "models": {
        "bailian/qwen3-max-2026-01-23": {}  // 启用该模型(必须与primary一致)
      }
    }
  },
  "tools": {
    "profile": "coding"
  },
  "messages": {
    "ackReactionScope": "group-mentions"
  },
  "commands": {
    "native": "auto",
    "nativeSkills": "auto",
    "restart": true,
    "ownerDisplay": "raw"
  },
  "session": {
    "dmScope": "per-channel-peer"
  },
  "gateway": {
    "port": 18789,
    "mode": "local",
    "bind": "loopback",
    "auth": {
      "mode": "token",
      "token": "7ed87de72551d546326f707c493e53a21425e20db7172d1b"
    },
    "tailscale": {
      "mode": "off",
      "resetOnExit": false
    },
    "nodes": {
      "denyCommands": [
        "camera.snap",
        "camera.clip",
        "screen.record",
        "contacts.add",
        "calendar.add",
        "reminders.add",
        "sms.send"
      ]
    }
  },
  "meta": {
    "lastTouchedVersion": "2026.3.8",
    "lastTouchedAt": "2026-03-10T13:33:13.111Z"
  }
}

然后打开浏览器就可以聊天了

相关推荐
AxureMost34 分钟前
VideoProc Converter AI 视频转换/下载/超分辨率
windows
李小白杂货铺1 小时前
从 macOS 免密 SSH 到 Windows 10 完整配置指南
windows·win10·openssh·踩坑·ssh服务器·免密连接·安装和配置
线上放牧人11 小时前
Windows删除图标缓存
windows·python·pyqt
Koi慢热11 小时前
DayDayMap学术社区体验:卫星网络测绘专题用下来怎么样
网络·人工智能·windows·web安全·网络安全
web守墓人12 小时前
【goed/ui】自定义组件设计思想篇
linux·windows·ui·golang
2601_9623649715 小时前
红外活体模组,Windows 设备安全身份入口解析
windows·安全·电脑
易点云徐源16 小时前
(已解决)Photoshop 2020 点击“选择主体”闪退:不用重装,1 个配置切回旧算法解决
windows·photoshop
云计算练习生17 小时前
什么是系统调用?为什么程序访问硬件必须经过它
linux·windows·操作系统·系统调用·操作系统原理
其实防守也摸鱼1 天前
DeepSeek Harness 开源贡献手记:从入门到合入主线
服务器·数据库·windows·https·ssl
qqww1551 天前
Win11更新后Edge卡顿掉帧?隐私窗口流畅解决办法
windows·edge·优化·卡顿