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
相关推荐
大明者省4 小时前
Label Studio安装与启动
windows
武藤一雄4 小时前
C# 异常(Exception)处理避坑指南
windows·microsoft·c#·.net·.netcore·鲁棒性
soragui5 小时前
【Python】第 4 章:Python 数据结构实现
数据结构·windows·python
橘子编程6 小时前
操作系统原理:从入门到精通全解析
java·linux·开发语言·windows·计算机网络·面试
程序员大辉8 小时前
Win11精简版的天花板:Windows X-Lite 26H1 V3完整安装教程,老电脑也能装
windows·电脑
熊明才9 小时前
PM2 服务器服务运维入门指南
运维·服务器·windows
沉迷学习 日益消瘦9 小时前
(windows环境)白嫖阿里云百炼免费 Token 使用 Claude 教程
windows·阿里云·claude·token·百炼
Mr_Xuhhh9 小时前
深入浅出ArrayList:从线性表到洗牌算法,掌握Java集合核心
windows
sunfdf10 小时前
使用免费工具在 Windows 11/10/8/7 中扩展 C 盘的 3 种方法
windows