Windows (WSL2)
Windows 上的 OpenClaw 推荐通过 WSL2(推荐 Ubuntu)。CLI + Gateway 网关在 Linux 内运行,这保持了运行时的一致性并使工具兼容性大大提高(Node/Bun/pnpm、Linux 二进制文件、Skills)。原生 Windows 可能更棘手。WSL2 给你完整的 Linux 体验——一条命令安装:wsl --install。 The
CLI + Gateway run inside Linux, which keeps the runtime consistent and makes
tooling far more compatible (Node/Bun/pnpm, Linux binaries, skills). Native
Windows might be trickier. WSL2 gives you the full Linux experience — one command
to install: wsl --install.
原生 Windows 配套应用已在计划中。
安装(WSL2)
- 入门指南(在 WSL 内使用)
- 安装和更新
- 官方 WSL2 指南(Microsoft):https://learn.microsoft.com/windows/wsl/install
Gateway 网关
Gateway 网关服务安装(CLI)
在 WSL2 内:高级:通过 LAN 暴露 WSL 服务(portproxy)
WSL has its own virtual network. WSL 有自己的虚拟网络。如果另一台机器需要访问在 WSL 内运行的服务(SSH、本地 TTS 服务器或 Gateway 网关),你必须将 Windows 端口转发到当前的 WSL IP。WSL IP 在重启后会改变,因此你可能需要刷新转发规则。 The WSL IP changes after restarts, so you may need to refresh the forwarding rule. 示例(以管理员身份运行 PowerShell):- 从另一台机器 SSH 目标是 Windows 主机 IP(示例:
ssh user@windows-host -p 2222)。 - 远程节点必须指向可访问的 Gateway 网关 URL(不是
127.0.0.1);使用openclaw status --all确认。 - 使用
listenaddress=0.0.0.0进行 LAN 访问;127.0.0.1仅保持本地访问。 - 如果你想自动化,注册一个计划任务在登录时运行刷新步骤。