Windows安装OpenClaw龙虾助手

1. 打开管理员PowerShell
  1. 按 Win 键,搜索 PowerShell

  2. 右键 → 以 管理员 身份运行(必须管理员)

  3. 弹出"用户账户控制" → 点 是

2. 解锁脚本执行权限(必做)

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser

3.安装Node.js: https://nodejs.org/zh-cn 进行下载
  • 安装时务必勾选Add Git to PATH,新手保持默认选项即可。
4.安装龙虾OpenClaw

npm config set registry https://registry.npmmirror.com

配置国内镜像 完成后,再次执行 npm i -g openclaw 进行安装。

openclaw --version

openclaw onboard

5、windows如果报错
复制代码
选择一:修复 Windows 原生安装
在管理员 PowerShell 中依次执行:

powershell
# 1. 先卸载
npm uninstall -g openclaw

# 2. 清理缓存
npm cache clean --force

# 3. 重新用官方脚本安装
iwr -useb https://clawd.org.cn/install.ps1 -OutFile install.ps1; ./install.ps1 -Registry https://registry.npmmirror.com

# 1. 先查看当前配置
Get-Content C:\Users\Administrator\.openclaw\openclaw.json

# 2. 创建一个正确的配置文件(无 bind 字段)
@'
{
  "wizard": {
    "lastRunAt": "2026-04-07T12:16:48.158Z",
    "lastRunVersion": "0.2.0",
    "lastRunCommand": "onboard",
    "lastRunMode": "local"
  },
  "models": {
    "mode": "merge",
    "providers": {
      "custom": {
        "baseUrl": "https://maas-api.cn-huabei-1.xf-yun.com/v2",
        "apiKey": ":",
        "api": "openai-completions",
        "models": [
          {
            "id": "xopglm5",
            "name": "xopglm5",
            "reasoning": false,
            "input": ["text"],
            "cost": {
              "input": 0,
              "output": 0,
              "cacheRead": 0,
              "cacheWrite": 0
            },
            "contextWindow": 128000,
            "maxTokens": 4096
          }
        ]
      }
    }
  },
  "agents": {
    "defaults": {
      "model": {
        "primary": "custom/xopglm5"
      },
      "models": {
        "custom/xopglm5": {
          "alias": "xopglm5"
        }
      },
      "workspace": "C:\\Users\\Administrator\\.openclaw\\workspace",
      "maxConcurrent": 4,
      "subagents": {
        "maxConcurrent": 8
      }
    }
  },
  "commands": {
    "native": "auto",
    "nativeSkills": "auto"
  },
  "gateway": {
    "port": 9999,
    "mode": "local",
    "auth": {
      "mode": "password",
      "password": "s19911009!"
    },
    "tailscale": {
      "mode": "off",
      "resetOnExit": false
    }
  },
  "meta": {
    "lastTouchedVersion": "0.2.0",
    "lastTouchedAt": "2026-04-07T12:16:48.194Z"
  }
}
'@ | Out-File -FilePath C:\Users\Administrator\.openclaw\openclaw.json -Encoding utf8

# 3. 验证配置是否还有错误
openclaw-cn doctor

# 4. 重启 gateway
openclaw-cn gateway restart
相关推荐
YCOSA20259 小时前
Windows11_InsiderPreview_EnterpriseVL_x64_zh-cn_29680_1000.iso 官方直链
windows
怎么没有名字注册了啊10 小时前
Windows Server 2008 R2 如何开启Aero
windows
lingchen190612 小时前
Windows CMD 的 `cd`(change directory,切换目录)命令
windows·命令模式
ITHAOGE1513 小时前
下载 | Win11 26H2 正式版发布!(ISO映像、2026年度版本、26300.9457、Windows 11)
windows·科技·微软·电脑
YCOSA202514 小时前
雨晨 Windows 11 IoT 企业版 Edge 轻装 VCDX 29680.1000
windows·物联网
笨笨努力中16 小时前
2002年Windows XP系统下载视频资源迁移云盘
windows
l1t17 小时前
修复WSL CreateInstance/E_UNEXPECTED和 mounted read-only 错误
linux·windows·wsl
kakakahahahaha18 小时前
Windows电脑卡死恢复流程:任务管理器、Ctrl Alt Delete、explorer与DWM重启
windows·电脑·笔记本电脑·软件需求·电脑卡死
kakakahahahaha18 小时前
Windows鼠标失灵排查:Ctrl Alt Delete、Mouse Keys、USB控制器与驱动修复
windows·驱动开发·电脑·笔记本电脑·软件需求
Vex2une18 小时前
Windows 资源监视器发展史:从任务管理器附件到系统级诊断利器
windows·系统监控·任务管理器·诊断工具·etw·resmon·资源监视器