跳轉到內容
最近更新

OpenClaw Windows 安裝教學(小白保姆級)

⚠️ 安全提醒:建議先在舊電腦、虛擬機或獨立 Windows 賬號上測試。
OpenClaw 具備較高權限能力,不建議直接在主力工作環境裸奔運行。

你將完成什麼

  • 使用 PowerShell 安裝 OpenClaw
  • 完成 Windows 環境的 onboarding
  • 啟動 OpenClaw,驗證它能正常響應
  • 處理常見 Windows 安裝問題,例如 ExecutionPolicy、PATH、Defender 和防火牆

開始前準備

  • 使用者名和路徑儘量保持簡單,避免編碼或長路徑問題
  • 準備可用的模型 API Key
  • 確保網絡能夠訪問安裝腳本

Step 1:以管理員身份打開 PowerShell

開始菜單 -> 搜尋 PowerShell -> 右鍵 -> 以管理員身份運行

Command
whoami

Step 2:允許腳本執行

Command
Set-ExecutionPolicy RemoteSigned -Scope CurrentUserGet-ExecutionPolicy -Scope CurrentUser

Step 3:安裝 OpenClaw

Command
iwr -useb https://openclaw.bot/install.ps1 | iex

驗證安裝

Command
openclaw --versionwhere openclaw

Step 4:如果命令無法執行

  • 先關閉 PowerShell,再重新打開
  • 重新執行 openclaw --version
  • 如有必要,刪除舊全局包後重新安裝
Command
npm uninstall -g clawdbotnpm uninstall -g moltbotnpm uninstall -g openclaw

Step 5:完成 onboarding

Command
openclaw onboard --flow quickstart

如果你想要最簡單的第一輪驗證,通道優先選擇 Telegram。

Step 6:啟動並運行 OpenClaw

Command
openclaw start

修改設定後重啟:

Command
openclaw gateway restart

驗證啟動結果

  • 日誌裡沒有持續報錯
  • 你設定的通道能收到測試回覆

Step 7:Windows 安裝常見坑

ExecutionPolicy 報錯

回到 Step 2,確認當前使用者作用域已設置成功。

PATH 或命令找不到

使用 where openclaw 檢查路徑,安裝後重新打開 PowerShell。

防火牆或 Defender 問題

  • 允許相關進程通過 Windows Firewall
  • 只有在必要時才把 OpenClaw 資料目錄加入 Defender 排除項

Step 8:相關運維操作

如果你要讓 OpenClaw 長期運行,不建議一直停留在桌面環境,應繼續看 Docker / VPS 部署指南

如果你需要設定路由、網關令牌或技能,繼續看 高級設定

相關 OpenClaw 指南