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"
  }
}

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

相关推荐
qq_3692243313 天前
Windows全系通用!ntdll.dll文件丢失、报错、闪退问题的完整排查与修复教程
windows·dll·dll修复·dll丢失·dll错误
阿米亚波13 天前
【Windows】QEMU 启动 openEuler aarch64/arm64 架构系统 + 离线软件源
linux·windows·经验分享·笔记·架构·arm
caimouse13 天前
Reactos 第 10 章 网络操作 — 10.3.1 NIC驱动
网络·windows
初圣魔门首席弟子13 天前
Node.js 详细介绍(知识库版)
windows·qt·node.js·知识库
CHENG-JustDoIt13 天前
AI工具 | 爆火开源项目Odysseus AI 工作台:从项目介绍、部署情况及其使用等多方位分析指南(含详细步骤)
大数据·人工智能·windows·python·ai·开源·github
kingbal13 天前
Windows:flutter环境搭建
windows·flutter
未若君雅裁13 天前
Python 数据容器详解,list、tuple、str、set、dict 到底怎么选
windows·python·list
CodeKwang13 天前
Windows 环境 OCCT 8.0 编译构建及与 Qt6 项目集成
windows·qt·opencascade
我是伪码农13 天前
小兔鲜1-25
linux·服务器·windows
vx-Biye_Design13 天前
springboot安阳地区研学旅游服务小程序-计算机毕业设计源码12785
java·vue.js·windows·spring boot·tomcat·maven·mybatis