2026 租用 Mac mini M4 部署 OpenClaw 與 OpenHuman:
Ollama 本機大模型、7×24 LaunchAgent 與雙 Agent 完整指南

想在 2026 年搭建 7×24 私有 AI Agent、卻在自購 Mac mini、Linux 雲端主機與主力筆電之間猶豫的開發者,常卡在 Gateway 要 macOS 權限、本機模型吃記憶體、兩個 Agent 搶 GPU 三件事上。本文寫給要同機跑 OpenClaw + OpenHuman v0.53 + Ollama 的台港團隊:租用節點、LaunchAgent、Memory Tree、M4 16GB vs 64GB、雙棧分工、安全與 TCO。🦞🧠

OpenClaw 與 OpenHuman 雙 Agent 示意

2026 年 5 月底,台北與新竹的獨立開發者圈裡,OpenClaw 已是多頻道 Gateway 的實務標準;OpenHuman v0.53 則補上「跨工作階段記憶樹 + 本機 local_ai」這一層。典型需求是:手機 Telegram 丟一句話 → OpenClaw 路由工具 → 需要長期脈絡時交給 OpenHuman → 推理由同機 Ollama 完成。這條鏈路在 Linux 雲端主機上能跑 Gateway,卻常在 macOS TCC、Metal 推理、LaunchAgent 7×24 上踩坑;在主力 MacBook 上常開又污染開發環境。本文給出租用 MacDate 獨占 Mac mini M4 的完整路徑,並與 OpenClaw + Ollama Gateway 路由排錯OpenClaw 多平台安裝指南 互補。

01. 為何選 macOS 節點跑 OpenClaw + OpenHuman

OpenClaw 在 2026 年的生產實務裡,macOS 原生節點承擔的不只是「能裝 npm」:瀏覽器自動化、螢幕錄製、部分頻道 Webhook,以及 openclaw onboard --install-daemon 寫入的 LaunchAgents,都假設宿主是 Darwin + Apple Silicon。OpenHuman 的 local_ai 預設對接 http://127.0.0.1:11434,在 M 系列上走 Metal / 統一記憶體(UMA),同價位 x86 虛擬主機難以複現相近 token/s 與功耗曲線。雙 Agent 同機時,macOS 還提供統一的 log show、活動監視器與記憶體壓力視覺化——當你要判斷「是 Gateway OOM 還是 Ollama 把記憶體頂滿」時,比純 SSH 的 Linux 更省除錯時間。

三類常見痛點:

  1. 權限與路徑漂移:終端機 npm install -g openclaw 後,LaunchAgent 實際拉起的可能是另一條 node 路徑,輔助使用權限勾錯宿主會讓工具呼叫靜默逾時。
  2. 7×24 與記憶連續性:OpenHuman Memory Tree 依賴磁碟上的 episodic 索引持續寫入;雲端快照還原、筆電合蓋休眠都會打斷夜間 Cron 與 Telegram 非同步的複利。
  3. 本機推理與 Gateway 搶記憶體:16GB 統一記憶體若同時載入 14B 量化與多頻道外掛,swap 抖動會讓 Gateway 心跳逾時——需要模型分級與 Agent 分工,而非單純「再租大一點的 VPS」。

02. 租用 MacDate 節點:方案與 SSH 驗收

MacDate 提供獨占裸機 Mac mini M4(16GB)與 M4 Pro(64GB),按日/按週彈性計費,約 2 小時內交付 SSH 金鑰與公網 IP。選型口訣:

  • 僅 OpenClaw + 雲端 API、不跑本機 14B → M4 16GB 足夠,可先讀 按日租用 Mac 完全指南 FAQ 完成首次 SSH/VNC。
  • OpenHuman Memory Tree + Ollama 7B~14B 常駐 → 建議 M4 Pro 64GB,或 16GB 僅跑 7B 量化並限制並行。
  • 試點 1~2 週 → 按日起租,驗證 Telegram 工作流與磁碟成長後再續租;單價見 Mac mini M4 定價頁

登入後驗收:sw_vers 確認 macOS;df -h 系統碟剩餘 >80GB(Ollama 快取常達 20~40GB);curl -I https://api.telegram.org 確認出站頻寬;內網管理可先裝 Tailscale(見 §07)。

03. OpenClaw 安裝與 LaunchAgent 7×24

在租用節點上,建議官方 CLI + onboarding 註冊守護行程

# 安裝 OpenClaw CLI(macOS) $ openclaw install # 互動式設定並寫入 LaunchAgent $ openclaw onboard --install-daemon $ openclaw doctor $ launchctl list | grep -i openclaw

--install-daemon 會在 ~/Library/LaunchAgents/ 寫入使用者級 plist。頻道建議先接 Telegram(Bot Token + allowlist);Ollama 提供商宣告見 Ollama 路由排錯文。完整分支見 安裝與部署指南

04. OpenHuman v0.53:Memory Tree 與 local_ai

OpenHuman 是帶長期記憶的對話 Agent:v0.53 起預設啟用 Memory Tree。安裝:

$ curl -fsSL https://install.openhuman.dev | bash $ openhuman doctor

編輯 ~/.openhuman/config.yaml

  • memory.tree.enabled: true — 索引寫入 ~/.openhuman/memory/,退租前務必打包備份。
  • providers.local_ai — 指向本機 Ollama,例如 base_url: http://127.0.0.1:11434/v1model: qwen2.5:7b-instruct-q4_K_M;與 OpenClaw 可共用 daemon,但建議不同 model 標籤避免同時載入兩個 14B。
  • channels — 生產環境建議「僅 OpenClaw 對外、OpenHuman 只聽 localhost」。
💡 分工:OpenClaw 管多頻道 ingress 與 doctor;OpenHuman 管 Memory Tree 與 local_ai。勿讓兩行程式同時綁定公網 3978/8080。

05. Ollama 模型:16GB 與 64GB 記憶體

檔位 M4 16GB M4 Pro 64GB
主模型qwen2.5:7b-instruct-q4_K_M14b 或 32B 實驗檔
雲端兜底建議保留 Haiku/4o-mini API可更多走本機
典型 t/s(7B Q4)約 45~65約 55~80
$ ollama pull qwen2.5:7b-instruct-q4_K_M $ ollama list

06. 雙棧資源管理

  • 連接埠:Gateway 3978;OpenHuman 僅 127.0.0.1:8787;Ollama 11434 不對外。
  • OllamaOLLAMA_MAX_LOADED_MODELS=1 與合理 OLLAMA_KEEP_ALIVE
  • 監控memory_pressureollama ps 寫入 cron 日誌。

07. 安全:稽核、Tailscale、金鑰隔離

租用節點帶獨立公網 IP,禁止把 Bot Token、API Key 寫進公開 repo。SSH/管理走 Tailscale;openclaw doctor 檢查 allowlist;退租前 tar czf agent-backup.tar.gz ~/.openclaw ~/.openhuman,平台 NIST 擦除後金鑰失效。

08. TCO(24 個月 · 7×24)

雙 Agent + 本機 7B 全年在線估算:買斷 M4 16GB 硬體約 ¥11,499;MacDate 按天 ¥158×180 天/年×2 年 ≈ ¥56,880(適合先租 3~6 個月驗證);GPU 雲 7×24 遠高於 Mac,且缺原生 Gateway。定價以 官網套餐 為準。

09. 七步落地

  1. 下單 MacDate,讀 SSH FAQ
  2. SSH 驗收磁碟與 HTTPS 出站。
  3. 安裝 Ollama 並 ollama pull 7B 標籤。
  4. openclaw installonboard --install-daemondoctor
  5. 安裝 OpenHuman,開 Memory Tree,設 local_ai
  6. Telegram 冒煙測試,檢查 ~/.openhuman/memory/
  7. 備份設定目錄後再決定續租或買斷。

10. FAQ

模型列表為空?

ollama list,再對齊 OpenClaw 提供商 ID,見 路由排錯

LaunchAgent 不啟動?

重跑 openclaw onboard --install-daemonlaunchctl bootout 舊 label 後再 bootstrap。

雙 Agent 卡死?

多半是 Ollama 載入過大模型——改 7B Q4,設 OLLAMA_MAX_LOADED_MODELS=1

11. 何時用 MacDate 彈性租用

把雙 Agent 堆在主力 MacBook 7×24會帶來風扇、電池與 TCC 污染;買斷又可能在流程未驗證前就付出 CapEx。MacDate 按天租用提供獨占 Apple Silicon、LaunchAgent 原生、退租 NIST 擦除——先租數週跑通 Telegram + Ollama + Memory Tree,再決定買斷。MacDate 是硬體彈性租用平台,與第三方 Agent 品牌無關。

僅需 Gateway + Ollama 可從 安裝大全 單線入手。

延伸閱讀