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
相关推荐
云和数据.ChenGuang39 分钟前
python sorted函数详细剖析
开发语言·人工智能·windows·python·1024程序员节
小熊吃保安2 小时前
Windows也能用 Apple Watch 解锁
windows·rust·开源
fengye2071613 小时前
Windows 环境下硬核编译 CPython 避坑指南
windows
成成爱质评5 小时前
Windows 任务计划程序 + 唤醒定时器:让电脑按时开机干活
windows·单片机·电脑
禁默6 小时前
iPhone远程控制Windows电脑哪款好?四款工具实测横评
windows·电脑·iphone
Sakura_j_h_15 小时前
Python 在定时任务里输出 emoji,UnicodeEncodeError 从哪来
开发语言·字符编码·windows·python·定时任务
隔窗听雨眠18 小时前
PostgreSQL单表从Windows迁移到Linux:差异剖析、方案对比与全流程实战
linux·windows·postgresql
Helix25020 小时前
Ansible混合环境自动化:Windows与Linux统一配置管理实战
windows·自动化·ansible·playbook·配置管理·winrm·混合环境
Java开发追求者1 天前
windows快速安装docker
windows·docker·安装·1024程序员节
Helix2501 天前
Windows ETW与KQL实战:终端性能诊断与遥测数据分析指南
windows·性能诊断·kql·etw·azure monitor·遥测数据·tracert