在 macOS VM 上執行 OpenClaw(沙箱隔離)
建議的預設(大多數使用者)
- 小型 Linux VPS:用於全年無休的 Gateway 閘道器,成本低。請參閱 VPS hosting。 See VPS hosting. See VPS hosting.
- Dedicated hardware (Mac mini or Linux box) if you want full control and a residential IP for browser automation. Many sites block data center IPs, so local browsing often works better.
- 混合式:將 Gateway 閘道器放在便宜的 VPS 上,當需要瀏覽器/UI 自動化時再連接你的 Mac 作為 節點。請參閱 Nodes 與 Gateway remote。 See Nodes and Gateway remote. See Nodes and Gateway remote.
macOS VM 選項
在 Apple Silicon Mac 上的本機 VM(Lume)
使用 Lume 在既有的 Apple Silicon Mac 上,以沙箱化的 macOS VM 執行 OpenClaw。 你將獲得:- 完整且隔離的 macOS 環境(主機保持乾淨)
- 透過 BlueBubbles 支援 iMessage(在 Linux/Windows 上不可能)
- 透過複製 VM 即可立即重置
- 無需額外硬體或雲端成本
託管的 Mac 供應商(雲端)
如果你想在雲端使用 macOS,也可以選擇託管的 Mac 供應商:- MacStadium(託管 Mac)
- 其他託管 Mac 供應商亦可;請依其 VM + SSH 文件操作
快速路徑(Lume,進階使用者)
- 安裝 Lume
lume create openclaw --os macos --ipsw latest- 完成設定助理,啟用「遠端登入」(SSH)
lume run openclaw --no-display- 以 SSH 連線、安裝 OpenClaw、設定頻道
- 完成
你需要準備的項目(Lume)
- Apple Silicon Mac(M1/M2/M3/M4)
- 主機需為 macOS Sequoia 或更新版本
- 每個 VM 約 60 GB 的可用磁碟空間
- 約 20 分鐘
1. 安裝 Lume
~/.local/bin 不在你的 PATH 中:
2. 建立 macOS VM
3. 完成設定助理
在 VNC 視窗中:- 選擇語言與地區
- 略過 Apple ID(或若稍後需要 iMessage 則登入)
- 建立使用者帳號(請記住使用者名稱與密碼)
- 略過所有選用功能
- 開啟「系統設定」→「一般」→「共享」
- 啟用「遠端登入」
4. 取得 VM 的 IP 位址
192.168.64.x)。
5. 以 SSH 連線至 VM
youruser 替換為你建立的帳號,並將 IP 替換為你的 VM IP。
6. 安裝 OpenClaw
在 VM 內:7. 設定頻道
Edit the config file:8. 以無顯示模式執行 VM
停止 VM,並在不顯示畫面的情況下重新啟動:加碼:iMessage 整合
This is the killer feature of running on macOS. 這是在 macOS 上執行的關鍵優勢。使用 BlueBubbles 將 iMessage 加入 OpenClaw。 在 VM 內:- 從 bluebubbles.app 下載 BlueBubbles
- 以你的 Apple ID 登入
- 啟用 Web API 並設定密碼
- 將 BlueBubbles webhook 指向你的 Gateway 閘道器(範例:
https://your-gateway-host:3000/bluebubbles-webhook?password=<password>)
儲存黃金映像
在進一步自訂前,先為乾淨狀態建立快照:Running 24/7
讓 VM 持續運作的方法:- 讓你的 Mac 持續接上電源
- 在「系統設定」→「節能」中停用睡眠
- 視需要使用
caffeinate
Troubleshooting
| 問題 | 解決方式 |
|---|---|
| 無法 SSH 連線至 VM | 確認 VM 的「系統設定」中已啟用「遠端登入」 |
| 未顯示 VM IP | 等待 VM 完全開機,再次執行 lume get openclaw |
| 找不到 Lume 指令 | 將 ~/.local/bin 加入你的 PATH |
| WhatsApp QR 無法掃描 | 執行 openclaw channels login 時,請確認你登入的是 VM(非主機) |