help/faq.md
Quick answers plus deeper troubleshooting for real-world setups (local dev, VPS, multi-agent, OAuth/API keys, model failover). 14. 如需執行期診斷,請參閱 Troubleshooting。 15. 完整的設定參考請參閱 Configuration。目錄
- [快速開始與首次執行設定]
- 我卡住了,最快脫困的方法是什麼?
- 安裝與設定 OpenClaw 的建議方式是什麼?
- 完成入門引導後,如何開啟儀表板?
- 在 localhost 與遠端時,如何驗證儀表板(權杖)?
- 需要什麼執行環境?
- 可以在 Raspberry Pi 上執行嗎?
- Raspberry Pi 安裝有什麼建議?
- [It is stuck on “wake up my friend” / onboarding will not hatch. 19. 我無法存取 docs.openclaw.ai(SSL 錯誤)。 20. 接下來該怎麼做?
- 可以在不重做入門引導的情況下,遷移到新機器(Mac mini)嗎?
- 在哪裡查看最新版本的新內容?
- I can’t access docs.openclaw.ai (SSL error). 現在該怎麼辦?
- stable 與 beta 的差異是什麼?
- 如何安裝 beta 版?beta 與 dev 有何不同?
- 如何試用最新版本?
- 安裝與入門引導通常需要多久?
- 安裝程式卡住? How do I get more feedback?
- Windows 安裝顯示找不到 git 或無法辨識 openclaw
- 文件沒有回答我的問題,如何取得更好的答案?
- 如何在 Linux 上安裝 OpenClaw?
- 如何在 VPS 上安裝 OpenClaw?
- 雲端 / VPS 安裝指南在哪裡?
- 可以請 OpenClaw 自行更新嗎?
- 入門引導精靈實際上做了什麼?
- 需要 Claude 或 OpenAI 的訂閱才能執行嗎?
- 可以在沒有 API 金鑰的情況下使用 Claude Max 訂閱嗎
- Anthropic 的「setup-token」驗證如何運作?
- 在哪裡取得 Anthropic setup-token?
- 是否支援 Claude 訂閱驗證(Claude Pro 或 Max)?
- 為什麼我會看到來自 Anthropic 的
HTTP 429: rate_limit_error? - 是否支援 AWS Bedrock?
- Codex 驗證如何運作?
- 是否支援 OpenAI 訂閱驗證(Codex OAuth)?
- 如何設定 Gemini CLI OAuth
- 本機模型適合輕鬆聊天嗎?
- 如何讓託管模型流量留在特定區域?
- 一定要買 Mac Mini 才能安裝嗎?
- iMessage 支援一定需要 Mac mini 嗎?
- 如果我買 Mac mini 來執行 OpenClaw,可以連接我的 MacBook Pro 嗎?
- 可以使用 Bun 嗎?
- Telegram:
allowFrom要填什麼? - 是否可以讓多人使用同一個 WhatsApp 號碼搭配不同的 OpenClaw 實例?
- 可以同時執行「快速聊天」代理與「用 Opus 進行程式開發」的代理嗎?
- Homebrew 可以在 Linux 上運作嗎?
- hackable(git)安裝與 npm 安裝有什麼不同?
- 之後可以在 npm 與 git 安裝之間切換嗎?
- 應該在筆電或 VPS 上執行 Gateway 閘道器?
- 在專用機器上執行 OpenClaw 有多重要?
- VPS 的最低需求與建議的作業系統是什麼?
- 可以在 VM 中執行 OpenClaw 嗎?需求是什麼?
- 什麼是 OpenClaw?
- Skills 與自動化
- How do I customize skills without keeping the repo dirty?
- Can I load skills from a custom folder?
- 我如何為不同任務使用不同模型?
- The bot freezes while doing heavy work. How do I offload that?
- Cron 或提醒未觸發。 我該檢查什麼?
- OpenClaw 可以排程或在背景中持續執行任務嗎?
- 我可以在 Linux 上執行僅限 Apple macOS 的技能嗎?
- 是否有 Notion 或 HeyGen 的整合?
- How do I install the Chrome extension for browser takeover?
- 沙箱與記憶
- 磁碟上的資料位置
- 設定基礎
- 設定檔是什麼格式?在哪裡? 我設定了
gateway.bind: "lan"(或"tailnet"),現在卻沒有任何服務在監聽/UI 顯示未授權 - 為什麼現在在 localhost 也需要權杖(token)?
- 修改設定後需要重新啟動嗎?
- 如何啟用網頁搜尋(以及網頁抓取)?
- config.apply 把我的設定清空了。我要如何復原並避免再次發生?
- 如何在多個裝置上執行一個中央 Gateway,並搭配專用的工作節點? OpenClaw 瀏覽器可以以無頭(headless)模式執行嗎?
- 如何使用 Brave 來進行瀏覽器控制?
- 指令是如何在 Telegram、Gateway 與節點之間傳遞的?
- How do I use Brave for browser control?
- 設定檔是什麼格式?在哪裡? 我設定了
- 遠端 Gateway 閘道器與節點
- Tailscale 已連線,但我沒有收到任何回應。接下來該怎麼辦?
- 兩個 OpenClaw 實例可以彼此通訊嗎(本地 + VPS)?
- 多個代理需要各自獨立的 VPS 嗎? 在個人筆電上執行一個節點,相較於從 VPS 透過 SSH,有什麼好處嗎?
- 節點會執行 Gateway 服務嗎?
- Do I need separate VPSes for multiple agents
- 如何將 Mac 節點連接到遠端 Gateway(Tailscale Serve)?
- 我應該在第二台筆電上安裝,還是只新增一個節點?
- OpenClaw 是如何載入環境變數的?
- 「我透過服務啟動了 Gateway,結果環境變數不見了。」現在該怎麼辦?
-
- [我設定了
COPILOT_GITHUB_TOKEN,但模型狀態顯示「Shell env: off」。 - 為什麼?](#i-set-copilotgithubtoken-but-models-status-shows-shell-env-off-why)
- [我設定了
- 環境變數與 .env 載入
- OpenClaw 是如何載入環境變數的?
- 「我透過服務啟動了 Gateway,但我的環境變數消失了。」 7. 現在該怎麼辦? 是否有辦法讓一組 OpenClaw 實例形成「一個 CEO、多個代理」的架構?
- 為什麼在任務進行到一半時脈絡被截斷?我要如何避免? 如何在保留安裝的情況下,完全重置 OpenClaw?
- 工作階段與多重聊天
- 我遇到「context too large」錯誤——要如何重置或壓縮?
- 為什麼我會看到「LLM request rejected: messages.N.content.X.tool_use.input: Field required」?
- 為什麼我每 30 分鐘會收到一次心跳訊息?
- 我需要把「機器人帳號」加入 WhatsApp 群組嗎? 如何取得 WhatsApp 群組的 JID?
- 為什麼我每 30 分鐘會收到一次心跳訊息?
- 我需要把一個「機器人帳號」加入 WhatsApp 群組嗎?
- 我可以建立多少個工作區與代理?
- 為什麼 OpenClaw 在群組中不回覆?
- 群組/執行緒會和私訊共享上下文嗎?
- 你建議使用哪個模型?
- 我可以同時執行多個機器人或聊天(Slack)嗎?以及該如何設定?
- Do groups/threads share context with DMs?
- 你推薦使用什麼模型?
- 我要如何在不清除設定的情況下切換模型?
- 模型:預設、選擇、別名與切換
- 我可以使用自架模型(llama.cpp、vLLM、Ollama)嗎?
- What model do you recommend?
- How do I switch models without wiping my config?
- 我可以在日常任務中使用 GPT 5.2,在程式開發時使用 Codex 5.3 嗎?
- 我可以把 MiniMax 作為預設,並在複雜任務時使用 OpenAI 嗎?
- 我要如何新增來自其他供應商(如 OpenRouter 或 Z.AI)的模型?
- Can I use MiniMax as my default and OpenAI for complex tasks?
- 這個錯誤代表什麼意思?
- 修復清單:
No credentials found for profile "anthropic:default" - How do I add models from other providers like OpenRouter or Z.AI?
- 模型容錯與「All models failed」
- 驗證設定檔:是什麼以及如何管理
- Gateway:連接埠、「already running」與遠端模式
- 21. Gateway 使用的是哪個連接埠?
- Why does
openclaw gateway statussayRuntime: runningbutRPC probe: failed? - What does “another gateway instance is already listening” mean?
- How do I run OpenClaw in remote mode (client connects to a Gateway elsewhere)?
- The Control UI says “unauthorized” (or keeps reconnecting). 27. 接下來該怎麼辦?
- 記錄與除錯
- 5. 日誌在哪裡?
- 媒體與附件
- 安全性與存取控制
- 聊天指令、終止任務與「停不下來」
32. 若有問題時的前 60 秒
-
Quick status (first check)
- 快速本機摘要:OS 與更新、gateway/服務可達性、agents/sessions、供應商設定與執行期問題(當 gateway 可達時)。
-
Pasteable report (safe to share)
- 含日誌尾端的唯讀診斷(權杖已遮蔽)。
-
- Daemon 與連接埠狀態
- 顯示監督器的執行期與 RPC 可達性、探測目標 URL,以及服務可能使用的設定。
-
- 深度探測
Runs gateway health checks + provider probes (requires a reachable gateway). See Health. -
Tail the latest log
If RPC is down, fall back to:File logs are separate from service logs; see Logging and Troubleshooting.
-
Run the doctor (repairs)
修復/遷移設定與狀態,並執行健康檢查。 See Doctor.
-
Gateway snapshot
Asks the running gateway for a full snapshot (WS-only). See Health.
快速開始與首次執行設定
Im stuck whats the fastest way to get unstuck
使用一個能 看見你的機器 的本地 AI 代理。 這比在 Discord 詢問有效得多,因為多數「我卡住了」的情況是 本地設定或環境問題, 遠端協助者無法檢視。- Claude Code: https://www.anthropic.com/claude-code/
- OpenAI Codex: https://openai.com/codex/
--install-method git.
Tip: ask the agent to plan and supervise the fix (step-by-step), then execute only the
necessary commands. That keeps changes small and easier to audit.
還是卡住了嗎?歡迎到 Discord 詢問,或在 GitHub 討論區 發起討論。
Start with these commands (share outputs when asking for help):
openclaw status: quick snapshot of gateway/agent health + basic config.openclaw models status: checks provider auth + model availability.openclaw doctor: validates and repairs common config/state issues.
openclaw status --all, openclaw logs --follow,
openclaw gateway status, openclaw health --verbose.
Quick debug loop: First 60 seconds if something’s broken.
Install docs: Install, Installer flags, Updating.
What’s the recommended way to install and set up OpenClaw
The repo recommends running from source and using the onboarding wizard:pnpm openclaw onboard.
How do I open the dashboard after onboarding
The wizard opens your browser with a clean (non-tokenized) dashboard URL right after onboarding and also prints the link in the summary. Keep that tab open; if it didn’t launch, copy/paste the printed URL on the same machine.How do I authenticate the dashboard token on localhost vs remote
Localhost (same machine):- Open
http://127.0.0.1:18789/. - If it asks for auth, paste the token from
gateway.auth.token(orOPENCLAW_GATEWAY_TOKEN) into Control UI settings. - 從 gateway 主機取得:
openclaw config get gateway.auth.token(或產生一個:openclaw doctor --generate-gateway-token)。
- Tailscale Serve (recommended): keep bind loopback, run
openclaw gateway --tailscale serve, openhttps://<magicdns>/. 如果gateway.auth.allowTailscale為true,身分識別標頭即可滿足驗證(不需要權杖)。 - Tailnet bind: run
openclaw gateway --bind tailnet --token "<token>", openhttp://<tailscale-ip>:18789/, paste token in dashboard settings. - SSH tunnel:
ssh -N -L 18789:127.0.0.1:18789 user@hostthen openhttp://127.0.0.1:18789/and paste the token in Control UI settings.
What runtime do I need
Node >= 22 is required.pnpm is recommended. Bun is not recommended for the Gateway.
它能在 Raspberry Pi 上執行嗎
是. The Gateway is lightweight - docs list 512MB-1GB RAM, 1 core, and about 500MB disk as enough for personal use, and note that a Raspberry Pi 4 can run it. If you want extra headroom (logs, media, other services), 2GB is recommended, but it’s not a hard minimum. 提示:小型的 Pi/VPS 可以託管 Gateway,而你可以在筆電/手機上配對 節點,用於 本地螢幕/相機/畫布或指令執行。 See Nodes.Any tips for Raspberry Pi installs
Short version: it works, but expect rough edges.- Use a 64-bit OS and keep Node >= 22.
- Prefer the hackable (git) install so you can see logs and update fast.
- Start without channels/skills, then add them one by one.
- If you hit weird binary issues, it is usually an ARM compatibility problem.
卡在「wake up my friend」/ 入門引導無法孵化,該怎麼辦?
That screen depends on the Gateway being reachable and authenticated. The TUI also sends “Wake up, my friend!” automatically on first hatch. If you see that line with no reply and tokens stay at 0, the agent never ran.- Restart the Gateway:
- Check status + auth:
- If it still hangs, run:
Can I migrate my setup to a new machine Mac mini without redoing onboarding
是. Copy the state directory and workspace, then run Doctor once. This keeps your bot “exactly the same” (memory, session history, auth, and channel state) as long as you copy both locations:- Install OpenClaw on the new machine.
- Copy
$OPENCLAW_STATE_DIR(default:~/.openclaw) from the old machine. - Copy your workspace (default:
~/.openclaw/workspace). - Run
openclaw doctorand restart the Gateway service.
~/.openclaw/ (for example ~/.openclaw/agents/<agentId>/sessions/).
Related: Migrating, Where things live on disk,
Agent workspace, Doctor,
Remote mode.
Where do I see what is new in the latest version
Check the GitHub changelog: https://github.com/openclaw/openclaw/blob/main/CHANGELOG.md Newest entries are at the top. If the top section is marked Unreleased, the next dated section is the latest shipped version. Entries are grouped by Highlights, Changes, and Fixes (plus docs/other sections when needed).無法存取 docs.openclaw.ai(SSL 錯誤),該怎麼辦?
Some Comcast/Xfinity connections incorrectly blockdocs.openclaw.ai via Xfinity
Advanced Security. 將其停用或把 docs.openclaw.ai 加入允許清單,然後再試一次。 More
detail: Troubleshooting.
Please help us unblock it by reporting here: https://spa.xfinity.com/check_url_status.
If you still can’t reach the site, the docs are mirrored on GitHub:
https://github.com/openclaw/openclaw/tree/main/docs
What’s the difference between stable and beta
Stable and beta are npm dist-tags, not separate code lines:latest= stablebeta= early build for testing
latest. That’s why beta and stable can point at the
same version.
查看有哪些變更:
https://github.com/openclaw/openclaw/blob/main/CHANGELOG.md
How do I install the beta version and whats the difference between beta and dev
Beta is the npm dist-tagbeta (may match latest).
Dev is the moving head of main (git); when published, it uses the npm dist-tag dev.
One-liners (macOS/Linux):
How long does install and onboarding usually take
Rough guide:- Install: 2-5 minutes
- Onboarding: 5-15 minutes depending on how many channels/models you configure
How do I try the latest bits
Two options:- Dev channel (git checkout):
main branch and updates from source.
- Hackable install (from the installer site):
安裝程式卡住了?如何取得更多回饋?
Re-run the installer with verbose output:Windows install says git not found or openclaw not recognized
Two common Windows issues: 1) npm error spawn git / git not found- Install Git for Windows and make sure
gitis on your PATH. - Close and reopen PowerShell, then re-run the installer.
- Your npm global bin folder is not on PATH.
-
Check the path:
-
Ensure
<prefix>\\binis on PATH (on most systems it is%AppData%\\npm). - Close and reopen PowerShell after updating PATH.
The docs didnt answer my question how do I get a better answer
Use the hackable (git) install so you have the full source and docs locally, then ask your bot (or Claude/Codex) from that folder so it can read the repo and answer precisely.How do I install OpenClaw on Linux
Short answer: follow the Linux guide, then run the onboarding wizard.- Linux quick path + service install: Linux.
- Full walkthrough: Getting Started.
- Installer + updates: Install & updates.
How do I install OpenClaw on a VPS
Any Linux VPS works. Install on the server, then use SSH/Tailscale to reach the Gateway. Guides: exe.dev, Hetzner, Fly.io. Remote access: Gateway remote.Where are the cloudVPS install guides
We keep a hosting hub with the common providers. Pick one and follow the guide:- VPS hosting (all providers in one place)
- Fly.io
- Hetzner
- exe.dev
- Hub:Platforms。 Remote access: Gateway remote. Nodes: Nodes, Nodes CLI.
Can I ask OpenClaw to update itself
- 簡短回答:可以,但不建議。 The update flow can restart the Gateway (which drops the active session), may need a clean git checkout, and can prompt for confirmation. Safer: run updates from a shell as the operator.
- 使用 CLI:
What does the onboarding wizard actually do
openclaw onboard is the recommended setup path. 32. 在 本機模式 下,它會引導你完成:
-
- 模型/驗證設定(Claude 訂閱建議使用 Anthropic setup-token,支援 OpenAI Codex OAuth,API 金鑰為選用,支援 LM Studio 本機模型)
- Workspace location + bootstrap files
- Gateway settings (bind/port/auth/tailscale)
-
- Providers(WhatsApp、Telegram、Discord、Mattermost(外掛)、Signal、iMessage)
-
- 常駐程式安裝(macOS 為 LaunchAgent;Linux/WSL2 為 systemd 使用者單元)
-
- 健康檢查 與 skills 選擇
Do I need a Claude or OpenAI subscription to run this
否. You can run OpenClaw with API keys (Anthropic/OpenAI/others) or with local-only models so your data stays on your device. Subscriptions (Claude Pro/Max or OpenAI Codex) are optional ways to authenticate those providers. Docs: Anthropic, OpenAI, Local models, Models.Can I use Claude Max subscription without an API key
是. You can authenticate with a setup-token instead of an API key. 這是訂閱路徑。 Claude Pro/Max subscriptions do not include an API key, so this is the correct approach for subscription accounts. Important: you must verify with Anthropic that this usage is allowed under their subscription policy and terms. If you want the most explicit, supported path, use an Anthropic API key.How does Anthropic setuptoken auth work
claude setup-token會透過 Claude Code CLI 產生一個 權杖字串(它不在網頁主控台中提供)。 16. 你可以在 任何機器 上執行它。 Choose Anthropic token (paste setup-token) in the wizard or paste it withopenclaw models auth paste-token --provider anthropic. 18. 該權杖會以 anthropic 供應商的驗證設定檔儲存,並像 API 金鑰一樣使用(不會自動重新整理)。 More detail: OAuth.
Where do I find an Anthropic setuptoken
It is not in the Anthropic Console. The setup-token is generated by the Claude Code CLI on any machine:openclaw models auth setup-token --provider anthropic。 If you ran claude setup-token elsewhere, paste it on the gateway host with openclaw models auth paste-token --provider anthropic. See Anthropic.
Do you support Claude subscription auth (Claude Pro or Max)
Yes - via setup-token. OpenClaw no longer reuses Claude Code CLI OAuth tokens; use a setup-token or an Anthropic API key. Generate the token anywhere and paste it on the gateway host. 31. 請參閱 Anthropic 與 OAuth。- 注意:Claude 訂閱存取受 Anthropic 條款所規範。 For production or multi-user workloads, API keys are usually the safer choice.
34. 為什麼我會看到來自 Anthropic 的 HTTP 429 ratelimiterror
- 這表示你在目前時間窗口內的 Anthropic 配額/速率限制 已用盡。 If you use a Claude subscription (setup-token or Claude Code OAuth), wait for the window to reset or upgrade your plan. If you use an Anthropic API key, check the Anthropic Console for usage/billing and raise limits as needed.
Is AWS Bedrock supported
- 是的 —— 透過 pi-ai 的 Amazon Bedrock(Converse) 供應商,並使用 手動設定。 You must supply AWS credentials/region on the gateway host and add a Bedrock provider entry in your models config. 43. 請參閱 Amazon Bedrock 與 Model providers。 44. 如果你偏好受管理的金鑰流程,在 Bedrock 前方使用 OpenAI 相容的代理仍然是可行的選項。
Codex 的驗證是如何運作的
OpenClaw supports OpenAI Code (Codex) via OAuth (ChatGPT sign-in). The wizard can run the OAuth flow and will set the default model toopenai-codex/gpt-5.3-codex when appropriate. 請參閱 Model providers 與 Wizard。
Do you support OpenAI subscription auth Codex OAuth
是. OpenClaw fully supports OpenAI Code (Codex) subscription OAuth. 上線引導精靈 可以替你執行 OAuth 流程。 See OAuth, Model providers, and Wizard.How do I set up Gemini CLI OAuth
Gemini CLI uses a plugin auth flow, not a client id or secret inopenclaw.json.
- 步驟:
-
- 啟用外掛:
openclaw plugins enable google-gemini-cli-auth
- 啟用外掛:
-
登入:
openclaw models auth login --provider google-gemini-cli --set-default
Is a local model OK for casual chats
- 通常不適合。 OpenClaw needs large context + strong safety; small cards truncate and leak. If you must, run the largest MiniMax M2.1 build you can locally (LM Studio) and see /gateway/local-models. Smaller/quantized models increase prompt-injection risk - see Security.
How do I keep hosted model traffic in a specific region
- 選擇區域鎖定的端點。 16. OpenRouter 提供 MiniMax、Kimi 與 GLM 的美國託管選項;選擇美國託管的變體即可讓資料留在該地區。 23. 你仍可透過設定
models.mode: "merge"同時列出 Anthropic/OpenAI,讓備援模型可用,同時遵守你選擇的區域化供應商。
4. 我一定要買一台 Mac Mini 才能安裝這個嗎
否. 5. OpenClaw 可在 macOS 或 Linux 上執行(Windows 可透過 WSL2)。 6. Mac mini 並非必須——有些人會買來作為 24/7 開機的主機,但小型 VPS、家用伺服器或 Raspberry Pi 等級的裝置也都可以。- 只有在需要 僅限 macOS 的工具 時,你才需要一台 Mac。 28. iMessage 請使用 BlueBubbles(推薦)——BlueBubbles 伺服器在任何 Mac 上執行,而 Gateway 可在 Linux 或其他地方執行。 如果你需要其他僅限 macOS 的工具,請在 Mac 上執行 Gateway,或配對一個 macOS 節點。
- 文件:BlueBubbles、Nodes、Mac remote mode。
25. 我需要 Mac mini 才能支援 iMessage 嗎
- 你需要 某一台已登入 Messages 的 macOS 裝置。 27. 它 不一定 要是 Mac mini——任何 Mac 都可以。 28. 使用 BlueBubbles(推薦)來支援 iMessage——BlueBubbles 伺服器在 macOS 上執行,而 Gateway 可在 Linux 或其他地方執行。
- 常見架構:
-
- 在 Linux/VPS 上執行 Gateway,並在任何已登入 Messages 的 Mac 上執行 BlueBubbles 伺服器。
-
- 如果你想要最簡單的單機設定,也可以把所有東西都跑在同一台 Mac 上。
33. 如果我買 Mac mini 來執行 OpenClaw,可以連接到我的 MacBook Pro 嗎
是. 40. Mac mini 可以執行 Gateway,而你的 MacBook Pro 可以作為 節點(陪伴裝置)連接。 35. 節點不會執行 Gateway——它們提供額外功能,例如該裝置上的螢幕/相機/畫布,以及system.run。
- 常見模式:
-
- Gateway 跑在 Mac mini(全天候運作)。
-
- MacBook Pro 執行 macOS App 或節點主機,並配對到 Gateway。
-
- 使用
openclaw nodes status/openclaw nodes list來查看狀態。
- 使用
26. 我可以使用 Bun 嗎
- 不建議 使用 Bun。 28. 我們觀察到執行期錯誤,特別是在 WhatsApp 與 Telegram 上。
- 請使用 Node 以獲得穩定的 Gateway。
45. Telegram 的 allowFrom 要填什麼
channels.telegram.allowFrom是 人類發送者的 Telegram 使用者 ID(數字,建議)或@username。 47. 這不是機器人的使用者名稱。
- 私訊你的機器人,然後執行
openclaw logs --follow並讀取from.id。
- 官方 Bot API:
-
- 私訊你的機器人,接著呼叫
https://api.telegram.org/bot<bot_token>/getUpdates並讀取message.from.id。
- 私訊你的機器人,接著呼叫
- DM
@userinfobotor@getidsbot.
- 請參閱 /channels/telegram。
Can multiple people use one WhatsApp number with different OpenClaw instances
Yes, via multi-agent routing. 9. 將每個傳送者的 WhatsApp DM(對等kind: "direct",傳送者 E.164 如 +15551234567)綁定到不同的 agentId,讓每個人都有自己的工作區與工作階段儲存。 42. 回覆仍會來自 同一個 WhatsApp 帳號,而 DM 的存取控制(channels.whatsapp.dmPolicy / channels.whatsapp.allowFrom)是以 WhatsApp 帳號為單位的全域設定。 See Multi-Agent Routing and WhatsApp.
44. 我可以同時跑一個快速聊天代理,以及一個用於寫程式的 Opus 代理嗎
是. Use multi-agent routing: give each agent its own default model, then bind inbound routes (provider account or specific peers) to each agent. 範例設定位於 Multi-Agent Routing。 47. 另請參閱 Models 與 Configuration。48. Homebrew 能在 Linux 上使用嗎
是. 49. Homebrew 支援 Linux(Linuxbrew)。 快速開始:/home/linuxbrew/.linuxbrew/bin (or your brew prefix) so brew-installed tools resolve in non-login shells.
Recent builds also prepend common user bin dirs on Linux systemd services (for example ~/.local/bin, ~/.npm-global/bin, ~/.local/share/pnpm, ~/.bun/bin) and honor PNPM_HOME, NPM_CONFIG_PREFIX, BUN_INSTALL, VOLTA_HOME, ASDF_DATA_DIR, NVM_DIR, and FNM_DIR when set.
What’s the difference between the hackable git install and npm install
- 可駭(git)安裝: 完整原始碼檢出、可編輯,最適合貢獻者。 You run builds locally and can patch code/docs.
- npm install: global CLI install, no repo, best for “just run it.” Updates come from npm dist-tags.
之後可以在 npm 與 git 安裝之間切換嗎
是. Install the other flavor, then run Doctor so the gateway service points at the new entrypoint. This does not delete your data - it only changes the OpenClaw code install. 你的狀態 (~/.openclaw) 與工作區 (~/.openclaw/workspace) 都會保持不變。
- 從 npm → git:
- Doctor 會偵測到 gateway 服務進入點不一致,並提供重新寫入服務設定以符合目前安裝(在自動化中使用
--repair)。
Should I run the Gateway on my laptop or a VPS
Short answer: if you want 24/7 reliability, use a VPS. If you want the lowest friction and you’re okay with sleep/restarts, run it locally. 筆電(本地 Gateway)- Pros: no server cost, direct access to local files, live browser window.
- Cons: sleep/network drops = disconnects, OS updates/reboots interrupt, must stay awake.
- VPS / 雲端
- Pros: always-on, stable network, no laptop sleep issues, easier to keep running.
- Cons: often run headless (use screenshots), remote file access only, you must SSH for updates.
How important is it to run OpenClaw on a dedicated machine
Not required, but recommended for reliability and isolation.- Dedicated host (VPS/Mac mini/Pi): always-on, fewer sleep/reboot interruptions, cleaner permissions, easier to keep running.
- Shared laptop/desktop: totally fine for testing and active use, but expect pauses when the machine sleeps or updates.
What are the minimum VPS requirements and recommended OS
OpenClaw is lightweight. For a basic Gateway + one chat channel:- Absolute minimum: 1 vCPU, 1GB RAM, ~500MB disk.
- Recommended: 1-2 vCPU, 2GB RAM or more for headroom (logs, media, multiple channels). Node tools and browser automation can be resource hungry.
Can I run OpenClaw in a VM and what are the requirements
是. Treat a VM the same as a VPS: it needs to be always on, reachable, and have enough RAM for the Gateway and any channels you enable. Baseline guidance:- Absolute minimum: 1 vCPU, 1GB RAM.
- Recommended: 2GB RAM or more if you run multiple channels, browser automation, or media tools.
- OS: Ubuntu LTS or another modern Debian/Ubuntu.
- 如果你使用 Windows,WSL2 是最容易的 VM 風格設定,且具備最佳的工具相容性。 6. 請參閱 Windows、VPS hosting。 If you are running macOS in a VM, see macOS VM.
What is OpenClaw?
What is OpenClaw in one paragraph
OpenClaw is a personal AI assistant you run on your own devices. 10. 它會在你已經使用的訊息平台上回覆(WhatsApp、Telegram、Slack、Mattermost(外掛)、Discord、Google Chat、Signal、iMessage、WebChat),並且在支援的平台上也能提供語音 + 即時 Canvas。 11. Gateway 是永遠在線的控制平面;助手本身才是產品。12. 價值主張是什麼
- OpenClaw 不是「只是 Claude 的包裝器」。 It’s a local-first control plane that lets you run a capable assistant on your own hardware, reachable from the chat apps you already use, with stateful sessions, memory, and tools - without handing control of your workflows to a hosted SaaS.
- 重點特色:
-
- 你的裝置,你的資料: 在任何你想要的地方(Mac、Linux、VPS)執行 Gateway,並將工作區與會話歷史保留在本地。
- Real channels, not a web sandbox: WhatsApp/Telegram/Slack/Discord/Signal/iMessage/etc, plus mobile voice and Canvas on supported platforms.
- Model-agnostic: use Anthropic, OpenAI, MiniMax, OpenRouter, etc., with per-agent routing and failover.
- Local-only option: run local models so all data can stay on your device if you want.
-
- 多代理路由: 依頻道、帳號或任務分離不同代理,每個都有自己的工作區與預設值。
- Open source and hackable: inspect, extend, and self-host without vendor lock-in.
I just set it up what should I do first
Good first projects:- Build a website (WordPress, Shopify, or a simple static site).
- Prototype a mobile app (outline, screens, API plan).
- Organize files and folders (cleanup, naming, tagging).
-
- 連接 Gmail,並自動化摘要或後續跟進。
- 它可以處理大型任務,但在你將任務拆分成多個階段,並使用子代理進行平行工作時,效果最佳。
30. OpenClaw 的五大日常使用情境是什麼
Everyday wins usually look like:-
- 個人簡報: 你關心的收件匣、行事曆與新聞摘要。
- Research and drafting: quick research, summaries, and first drafts for emails or docs.
- Reminders and follow ups: cron or heartbeat driven nudges and checklists.
- Browser automation: filling forms, collecting data, and repeating web tasks.
-
- 跨裝置協作: 從手機送出任務,讓 Gateway 在伺服器上執行,並在聊天中取回結果。
37. OpenClaw 能協助 SaaS 的名單開發、外聯、廣告與部落格嗎
- 可以,用於研究、資格篩選與撰寫草稿。 39. 它可以掃描網站、建立候選清單、整理潛在客戶摘要,並撰寫外聯或廣告文案草稿。
- 對於外聯或廣告投放,請保留人工審核。 Avoid spam, follow local laws and platform policies, and review anything before it is sent. The safest pattern is to let OpenClaw draft and you approve.
- 文件:Security。
What are the advantages vs Claude Code for web development
- OpenClaw 是一個個人助理與協調層,而不是 IDE 的替代品。 46. 在儲存庫內進行最快的直接寫碼循環,請使用 Claude Code 或 Codex。 47. 當你需要持久記憶、跨裝置存取,以及工具編排時,使用 OpenClaw。
- Persistent memory + workspace across sessions
-
- 多平台存取(WhatsApp、Telegram、TUI、WebChat)
- Tool orchestration (browser, files, scheduling, hooks)
- Always-on Gateway (run on a VPS, interact from anywhere)
- Nodes for local browser/screen/camera/exec
Skills and automation
How do I customize skills without keeping the repo dirty
Use managed overrides instead of editing the repo copy. Put your changes in~/.openclaw/skills/<name>/SKILL.md (or add a folder via skills.load.extraDirs in ~/.openclaw/openclaw.json). Precedence is <workspace>/skills > ~/.openclaw/skills > bundled, so managed overrides win without touching git. Only upstream-worthy edits should live in the repo and go out as PRs.
Can I load skills from a custom folder
是. Add extra directories viaskills.load.extraDirs in ~/.openclaw/openclaw.json (lowest precedence). Default precedence remains: <workspace>/skills → ~/.openclaw/skills → bundled → skills.load.extraDirs. clawhub installs into ./skills by default, which OpenClaw treats as <workspace>/skills.
How can I use different models for different tasks
Today the supported patterns are:- Cron jobs: isolated jobs can set a
modeloverride per job. - Sub-agents: route tasks to separate agents with different default models.
- On-demand switch: use
/modelto switch the current session model at any time.
The bot freezes while doing heavy work How do I offload that
Use sub-agents for long or parallel tasks. Sub-agents run in their own session, return a summary, and keep your main chat responsive. Ask your bot to “spawn a sub-agent for this task” or use/subagents.
Use /status in chat to see what the Gateway is doing right now (and whether it is busy).
Token tip: long tasks and sub-agents both consume tokens. If cost is a concern, set a
cheaper model for sub-agents via agents.defaults.subagents.model.
Docs: Sub-agents.
Cron or reminders do not fire What should I check
Cron runs inside the Gateway process. If the Gateway is not running continuously, scheduled jobs will not run. 檢查清單:- Confirm cron is enabled (
cron.enabled) andOPENCLAW_SKIP_CRONis not set. - Check the Gateway is running 24/7 (no sleep/restarts).
- Verify timezone settings for the job (
--tzvs host timezone).
How do I install skills on Linux
Use ClawHub (CLI) or drop skills into your workspace. The macOS Skills UI isn’t available on Linux. Browse skills at https://clawhub.com. Install the ClawHub CLI (pick one package manager):Can OpenClaw run tasks on a schedule or continuously in the background
是. Use the Gateway scheduler:- Cron jobs for scheduled or recurring tasks (persist across restarts).
- Heartbeat for “main session” periodic checks.
- Isolated jobs for autonomous agents that post summaries or deliver to chats.
Can I run Apple macOS-only skills from Linux?
Not directly. macOS skills are gated bymetadata.openclaw.os plus required binaries, and skills only appear in the system prompt when they are eligible on the Gateway host. On Linux, darwin-only skills (like apple-notes, apple-reminders, things-mac) will not load unless you override the gating.
You have three supported patterns:
Option A - run the Gateway on a Mac (simplest).
Run the Gateway where the macOS binaries exist, then connect from Linux in remote mode or over Tailscale. The skills load normally because the Gateway host is macOS.
由於 Gateway 主機是 macOS,技能會正常載入。 選項 B - 使用 macOS 節點(不需 SSH)。 The agent runs those skills via the nodes tool. If you choose “Always Ask”, approving “Always Allow” in the prompt adds that command to the allowlist.
代理會透過 nodes 工具執行這些技能。 Then override the skill to allow Linux so it stays eligible.
-
Create an SSH wrapper for the binary (example:
memofor Apple Notes): -
Put the wrapper on
PATHon the Linux host (for example~/bin/memo). -
Override the skill metadata (workspace or
~/.openclaw/skills) to allow Linux: - Start a new session so the skills snapshot refreshes.
Do you have a Notion or HeyGen integration
Not built-in today. Options:- Custom skill / plugin: best for reliable API access (Notion/HeyGen both have APIs).
- Browser automation: works without code but is slower and more fragile.
- 自訂技能/外掛: 最適合需要穩定 API 存取的情境(Notion/HeyGen 皆提供 API)。
- 瀏覽器自動化: 無需寫程式即可運作,但速度較慢且較不穩定。
How do I install the Chrome extension for browser takeover
Use the built-in installer, then load the unpacked extension in Chrome:chrome://extensions → enable “Developer mode” → “Load unpacked” → pick that folder.
Full guide (including remote Gateway + security notes): Chrome extension
使用內建安裝程式,然後在 Chrome 中載入未封裝的擴充功能:
如果 Gateway 閘道器 在其他地方執行,請在瀏覽器機器上執行 node host,
以便 Gateway 閘道器 能代理瀏覽器動作。
You still need to click the extension button on the tab you want to control (it doesn’t auto-attach).
Sandboxing and memory
如果 Gateway 與 Chrome 在同一台機器上執行(預設設定),通常不需要任何額外設定。
是. 你仍需要在想要控制的分頁上點擊擴充功能按鈕(它不會自動附加)。 沙箱與記憶體是否有專門的沙箱文件?
- 預設映像以安全為優先,並以
node使用者身分執行,因此不包含系統套件、Homebrew 或內建瀏覽器。 4. 若要更完整的設定:
- Docker 感覺受限,我要如何啟用完整功能?
-
- 使用
OPENCLAW_DOCKER_APT_PACKAGES將系統相依套件烘焙進映像。
- 使用
-
- 透過隨附的 CLI 安裝 Playwright 瀏覽器:
node /app/node_modules/playwright-core/cli.js install chromium
- 透過隨附的 CLI 安裝 Playwright 瀏覽器:
-
- 設定
PLAYWRIGHT_BROWSERS_PATH並確保該路徑會被持久化。
- 設定
agents.defaults.sandbox.mode: "non-main",讓群組/頻道工作階段(非 main 金鑰)在 Docker 中執行,而主要的 DM 工作階段仍留在主機上。 然後透過 tools.sandbox.tools 限制沙箱工作階段可用的工具。
設定流程 + 範例設定:Groups: personal DMs + public groups
關鍵設定參考:Gateway configuration
我要如何將主機資料夾綁定到沙箱中
- 將
agents.defaults.sandbox.docker.binds設為["host:path:mode"](例如:"/home/user/src:/src:ro")。 18. 全域與每個 agent 的 bind 會合併;當scope: "shared"時,會忽略每個 agent 的 bind。 19. 對任何敏感內容使用:ro,並記得 bind 會繞過沙盒的檔案系統隔離牆。 範例與安全注意事項請參考 Sandboxing 與 Sandbox vs Tool Policy vs Elevated。
記憶體是如何運作的
- OpenClaw 的記憶體其實就是 agent 工作區中的 Markdown 檔案:
- 每日筆記位於
memory/YYYY-MM-DD.md -
- 精選的長期筆記位於
MEMORY.md(僅主/私有工作階段)
- 精選的長期筆記位於
- OpenClaw 也會執行 靜默的預先壓縮記憶體刷新,提醒模型在自動壓縮前寫下可持久保存的筆記。 這只會在工作區可寫入時執行(唯讀沙箱會跳過)。 請參閱 Memory。
記憶體一直忘記事情,我要怎麼讓它記住
請要求機器人 將該事實寫入記憶體。 29. 長期筆記應放在MEMORY.md,短期脈絡則放在 memory/YYYY-MM-DD.md。
這仍然是我們正在改進的領域。 31. 提醒模型儲存記憶會很有幫助;它會知道該怎麼做。 32. 如果它仍然忘記,請確認 Gateway 每次執行都使用相同的工作區。
- 文件:Memory, Agent workspace。
語意記憶搜尋是否需要 OpenAI API 金鑰
只有在你使用 OpenAI embeddings 時才需要。 Codex OAuth 僅涵蓋聊天/補全,且不提供 embeddings 存取權限,因此 使用 Codex 登入(OAuth 或 Codex CLI 登入) 無法用於語意記憶搜尋。 37. OpenAI embeddings 仍然需要真正的 API 金鑰(OPENAI_API_KEY 或 models.providers.openai.apiKey)。
-
若未明確設定 provider,OpenClaw 會在能解析到 API 金鑰時自動選擇 provider(驗證設定檔、
models.providers.*.apiKey或環境變數)。 -
若解析到 OpenAI 金鑰則優先使用 OpenAI,否則若解析到 Gemini 金鑰則使用 Gemini。 40. 如果兩者都沒有可用的金鑰,記憶搜尋會保持停用,直到你完成設定。 41. 如果你已設定且存在本地模型路徑,OpenClaw 會優先使用
local。 -
如果你想完全使用本地,請設定
memorySearch.provider = "local"(並可選擇設定memorySearch.fallback = "none")。 如果你想使用 Gemini embeddings,請設定memorySearch.provider = "gemini"並提供GEMINI_API_KEY(或memorySearch.remote.apiKey)。 44. 我們支援 OpenAI、Gemini 或 local 的 embedding 模型——設定細節請參考 Memory。
45. 記憶會永久保存嗎?有什麼限制?
- 記憶檔案存放在磁碟上,除非你刪除,否則會一直保留。 47. 限制來自你的儲存空間,而不是模型。 工作階段情境 仍受模型的情境視窗限制,因此長對話可能會被壓縮或截斷。 這就是為什麼需要記憶體搜尋——它只會將相關部分拉回到情境中。
- 文件:Memory, Context。
Where things live on disk
Is all data used with OpenClaw saved locally
No - OpenClaw’s state is local, but external services still see what you send them.- Local by default: sessions, memory files, config, and workspace live on the Gateway host
(
~/.openclaw+ your workspace directory). - Remote by necessity: messages you send to model providers (Anthropic/OpenAI/etc.) go to their APIs, and chat platforms (WhatsApp/Telegram/Slack/etc.) store message data on their servers.
- You control the footprint: using local models keeps prompts on your machine, but channel traffic still goes through the channel’s servers.
Where does OpenClaw store its data
- 一切都位於
$OPENCLAW_STATE_DIR之下(預設:~/.openclaw):
| 2. 路徑 | 目的 |
|---|---|
3. $OPENCLAW_STATE_DIR/openclaw.json | Main config (JSON5) |
5. $OPENCLAW_STATE_DIR/credentials/oauth.json | 6. 舊版 OAuth 匯入(首次使用時複製到驗證設定檔) |
$OPENCLAW_STATE_DIR/agents/<agentId>/agent/auth-profiles.json | Auth profiles (OAuth + API keys) |
9. $OPENCLAW_STATE_DIR/agents/<agentId>/agent/auth.json | 10. 執行期驗證快取(自動管理) |
$OPENCLAW_STATE_DIR/credentials/ | Provider state (e.g. whatsapp/<accountId>/creds.json) |
$OPENCLAW_STATE_DIR/agents/ | 12. 每個代理的狀態(agentDir + sessions) |
$OPENCLAW_STATE_DIR/agents/<agentId>/sessions/ | 14. 對話歷史與狀態(每個代理) |
$OPENCLAW_STATE_DIR/agents/<agentId>/sessions/sessions.json | 16. 工作階段中繼資料(每個代理) |
~/.openclaw/agent/* (migrated by openclaw doctor).
Your workspace (AGENTS.md, memory files, skills, etc.) is separate and configured via agents.defaults.workspace (default: ~/.openclaw/workspace).
Where should AGENTSmd SOULmd USERmd MEMORYmd live
- 這些檔案位於 代理工作區,而不是
~/.openclaw。
- Workspace (per agent):
AGENTS.md,SOUL.md,IDENTITY.md,USER.md,MEMORY.md(ormemory.md),memory/YYYY-MM-DD.md, optionalHEARTBEAT.md. - State dir (
~/.openclaw): config, credentials, auth profiles, sessions, logs, and shared skills (~/.openclaw/skills).
- 預設工作區是
~/.openclaw/workspace,可透過以下方式設定:
- 提示:如果你想要持久的行為或偏好,請要求機器人 將其寫入 AGENTS.md 或 MEMORY.md,而不是依賴聊天記錄。
- 請參閱 Agent workspace 與 Memory。
28. 建議的備份策略是什麼
Put your agent workspace in a private git repo and back it up somewhere private (for example GitHub private). This captures memory + AGENTS/SOUL/USER files, and lets you restore the assistant’s “mind” later. Do not commit anything under~/.openclaw (credentials, sessions, tokens).
If you need a full restore, back up both the workspace and the state directory
separately (see the migration question above).
Docs: Agent workspace.
How do I completely uninstall OpenClaw
See the dedicated guide: Uninstall.Can agents work outside the workspace
是. 37. 工作區是 預設的 cwd 與記憶錨點,而不是硬性沙箱。 Relative paths resolve inside the workspace, but absolute paths can access other host locations unless sandboxing is enabled. If you need isolation, useagents.defaults.sandbox or per-agent sandbox settings. If you
want a repo to be the default working directory, point that agent’s
workspace to the repo root. The OpenClaw repo is just source code; keep the
workspace separate unless you intentionally want the agent to work inside it.
Example (repo as default cwd):
Im in remote mode where is the session store
Session state is owned by the gateway host. If you’re in remote mode, the session store you care about is on the remote machine, not your local laptop. See Session management.Config basics
What format is the config Where is it
OpenClaw reads an optional JSON5 config from$OPENCLAW_CONFIG_PATH (default: ~/.openclaw/openclaw.json):
~/.openclaw/workspace).
I set gatewaybind lan or tailnet and now nothing listens the UI says unauthorized
Non-loopback binds require auth. Configuregateway.auth.mode + gateway.auth.token (or use OPENCLAW_GATEWAY_TOKEN).
gateway.remote.tokenis for remote CLI calls only; it does not enable local gateway auth.- The Control UI authenticates via
connect.params.auth.token(stored in app/UI settings). Avoid putting tokens in URLs.
Why do I need a token on localhost now
The wizard generates a gateway token by default (even on loopback) so local WS clients must authenticate. This blocks other local processes from calling the Gateway. Paste the token into the Control UI settings (or your client config) to connect. If you really want open loopback, removegateway.auth from your config. Doctor can generate a token for you any time: openclaw doctor --generate-gateway-token.
Do I have to restart after changing config
The Gateway watches the config and supports hot-reload:gateway.reload.mode: "hybrid"(default): hot-apply safe changes, restart for critical oneshot,restart,offare also supported
How do I enable web search and web fetch
web_fetch works without an API key. web_search requires a Brave Search API
key. Recommended: run openclaw configure --section web to store it in
tools.web.search.apiKey. Environment alternative: set BRAVE_API_KEY for the
Gateway process.
- If you use allowlists, add
web_search/web_fetchorgroup:web. web_fetch預設為啟用(除非明確停用)。- Daemons read env vars from
~/.openclaw/.env(or the service environment).
How do I run a central Gateway with specialized workers across devices
The common pattern is one Gateway (e.g. Raspberry Pi) plus nodes and agents:- Gateway (central): owns channels (Signal/WhatsApp), routing, and sessions.
- Nodes (devices): Macs/iOS/Android connect as peripherals and expose local tools (
system.run,canvas,camera). - Agents (workers): separate brains/workspaces for special roles (e.g. “Hetzner ops”, “Personal data”).
- Sub-agents: spawn background work from a main agent when you want parallelism.
- TUI: connect to the Gateway and switch agents/sessions.
Can the OpenClaw browser run headless
是. It’s a config option:false (headful). Headless is more likely to trigger anti-bot checks on some sites. See Browser.
Headless uses the same Chromium engine and works for most automation (forms, clicks, scraping, logins). 14. 主要差異:
-
- 沒有可見的瀏覽器視窗(若需要視覺畫面請使用截圖)。
-
- 某些網站在無頭模式下對自動化更嚴格(CAPTCHA、反機器人)。
- 例如,X/Twitter 經常封鎖無頭工作階段。
How do I use Brave for browser control
Setbrowser.executablePath to your Brave binary (or any Chromium-based browser) and restart the Gateway.
See the full config examples in Browser.
11. 遠端 Gateway 與節點
22. 指令如何在 Telegram、gateway 與 nodes 之間傳遞
- Telegram 訊息由 gateway 處理。 24. gateway 會執行 agent, 然後只有在需要 node 工具時,才透過 Gateway WebSocket 呼叫 nodes:
-
Telegram → Gateway → Agent →
node.*→ Node → Gateway → Telegram - Nodes 不會看到進來的供應商流量;它們只會接收 node RPC 呼叫。
27. 如果 Gateway 託管在遠端,我的 agent 要如何存取我的電腦
-
簡短答案:將你的電腦配對為一個節點。 19. Gateway 在其他地方執行,但它可以透過 Gateway WebSocket 在你的本機上呼叫
node.*工具(螢幕、相機、系統)。 - 典型設定:
-
- 在永遠在線的主機(VPS/家用伺服器)上執行 Gateway。
-
- 將 Gateway 主機與你的電腦放在同一個 tailnet 中。
-
- 確保 Gateway WS 可達(tailnet 綁定或 SSH 通道)。
-
- 在本機開啟 macOS App,並以 Remote over SSH 模式(或直接 tailnet)連線, 以便註冊為一個節點。
-
- 在 Gateway 上核准該節點:
- 不需要另外的 TCP 橋接;nodes 透過 Gateway WebSocket 連線。
-
安全提醒:配對 macOS node 會允許在該機器上執行
system.run。 28. 僅 配對你信任的裝置,並檢視 Security。 - 文件:Nodes、Gateway protocol、macOS remote mode、Security。
30. Tailscale 已連線,但我沒有收到回覆,接下來怎麼辦
Check the basics:- Gateway is running:
openclaw gateway status - Gateway health:
openclaw status - Channel health:
openclaw channels status
- 接著驗證驗證與路由:
-
- 如果你使用 Tailscale Serve,請確保
gateway.auth.allowTailscale設定正確。
- 如果你使用 Tailscale Serve,請確保
- If you connect via SSH tunnel, confirm the local tunnel is up and points at the right port.
- Confirm your allowlists (DM or group) include your account.
40. 兩個 OpenClaw 實例可以在本機或 VPS 上彼此通訊嗎
是. 41. 目前沒有內建的「機器人對機器人」橋接,但你可以用幾種可靠的方式自行串接:- 最簡單: 使用兩個機器人都能存取的一般聊天通道(Telegram/Slack/WhatsApp)。
- 讓 Bot A 傳送訊息給 Bot B,然後讓 Bot B 如常回覆。
-
CLI 橋接(通用): 執行一個腳本,呼叫另一個 Gateway:
openclaw agent --message ... 45. --deliver,目標指向另一個機器人 正在監聽的聊天。 46. 如果其中一個機器人在遠端 VPS 上,請透過 SSH/Tailscale 將你的 CLI 指向該遠端 Gateway(請見 Remote access)。
Do I need separate VPSes for multiple agents
否. One Gateway can host multiple agents, each with its own workspace, model defaults, and routing. That is the normal setup and it is much cheaper and simpler than running one VPS per agent. Use separate VPSes only when you need hard isolation (security boundaries) or very different configs that you do not want to share. Otherwise, keep one Gateway and use multiple agents or sub-agents.Is there a benefit to using a node on my personal laptop instead of SSH from a VPS
Yes - nodes are the first-class way to reach your laptop from a remote Gateway, and they unlock more than shell access. The Gateway runs on macOS/Linux (Windows via WSL2) and is lightweight (a small VPS or Raspberry Pi-class box is fine; 4 GB RAM is plenty), so a common setup is an always-on host plus your laptop as a node.- No inbound SSH required. Nodes connect out to the Gateway WebSocket and use device pairing.
- Safer execution controls.
system.runis gated by node allowlists/approvals on that laptop. - More device tools. Nodes expose
canvas,camera, andscreenin addition tosystem.run. - Local browser automation. Keep the Gateway on a VPS, but run Chrome locally and relay control with the Chrome extension + a node host on the laptop.
Should I install on a second laptop or just add a node
If you only need local tools (screen/camera/exec) on the second laptop, add it as a node. That keeps a single Gateway and avoids duplicated config. Local node tools are currently macOS-only, but we plan to extend them to other OSes. Install a second Gateway only when you need hard isolation or two fully separate bots. Docs: Nodes, Nodes CLI, Multiple gateways.Do nodes run a gateway service
否. Only one gateway should run per host unless you intentionally run isolated profiles (see Multiple gateways). Nodes are peripherals that connect to the gateway (iOS/Android nodes, or macOS “node mode” in the menubar app). For headless node hosts and CLI control, see Node host CLI. A full restart is required forgateway, discovery, and canvasHost changes.
Is there an API RPC way to apply config
是.config.apply validates + writes the full config and restarts the Gateway as part of the operation.
configapply wiped my config How do I recover and avoid this
config.apply replaces the entire config. If you send a partial object, everything
else is removed.
Recover:
- Restore from backup (git or a copied
~/.openclaw/openclaw.json). - If you have no backup, re-run
openclaw doctorand reconfigure channels/models. - If this was unexpected, file a bug and include your last known config or any backup.
- A local coding agent can often reconstruct a working config from logs or history.
- Use
openclaw config setfor small changes. - Use
openclaw configurefor interactive edits.
What’s a minimal sane config for a first install
How do I set up Tailscale on a VPS and connect from my Mac
Minimal steps:-
Install + login on the VPS
-
Install + login on your Mac
- Use the Tailscale app and sign in to the same tailnet.
-
Enable MagicDNS (recommended)
- In the Tailscale admin console, enable MagicDNS so the VPS has a stable name.
-
Use the tailnet hostname
- SSH:
ssh [email protected] -
- Gateway WS:
ws://your-vps.tailnet-xxxx.ts.net:18789
- Gateway WS:
- SSH:
- 這會讓 gateway 綁定在 loopback,並透過 Tailscale 對外提供 HTTPS。 5. 請參閱 Tailscale。
6. 我要如何將 Mac 節點連線到遠端的 Gateway Tailscale Serve
- Serve 會暴露 Gateway Control UI + WS。 8. 節點會透過同一個 Gateway WS 端點連線。
- 建議的設定:
-
- 請確保 VPS + Mac 位於同一個 tailnet。
-
- 使用 macOS App 的 Remote 模式(SSH 目標可以是 tailnet 主機名稱)。
- 該 App 會建立 Gateway 連接埠的通道,並以節點身分連線。
-
Approve the node on the gateway:
15. 環境變數與 .env 載入
How does OpenClaw load environment variables
OpenClaw reads env vars from the parent process (shell, launchd/systemd, CI, etc.) 17. 並且另外會載入:-
- 目前工作目錄中的
.env
- 目前工作目錄中的
- a global fallback
.envfrom~/.openclaw/.env(aka$OPENCLAW_STATE_DIR/.env)
.env file overrides existing env vars.
- 你也可以在設定中定義行內環境變數(僅在程序環境中不存在時才會套用):
21. 我是透過服務啟動 Gateway,但我的環境變數不見了,該怎麼辦
Two common fixes:-
- 將缺少的金鑰放到
~/.openclaw/.env,這樣即使服務沒有繼承你的 shell 環境也能讀取到。
- 將缺少的金鑰放到
- Enable shell import (opt-in convenience):
OPENCLAW_LOAD_SHELL_ENV=1, OPENCLAW_SHELL_ENV_TIMEOUT_MS=15000.
I set COPILOTGITHUBTOKEN but models status shows Shell env off Why
openclaw models status reports whether shell env import is enabled. 29. “Shell env: off”
並 不 代表你的環境變數遺失——這只表示 OpenClaw 不會自動載入
你的登入 shell。
- 如果 Gateway 以服務方式執行(launchd/systemd),它不會繼承你的 shell 環境。 31. 請用以下其中一種方式修正:
-
Put the token in
~/.openclaw/.env: -
- 或啟用 shell 匯入(
env.shellEnv.enabled: true)。
- 或啟用 shell 匯入(
-
Or add it to your config
envblock (applies only if missing).
- Copilot token 會從
COPILOT_GITHUB_TOKEN讀取(也支援GH_TOKEN/GITHUB_TOKEN)。 - 請參閱 /concepts/model-providers 與 /environment。
8. 工作階段與多重聊天
How do I start a fresh conversation
- 以獨立訊息傳送
/new或/reset。 11. 請參閱 Session management。
12. 如果我從不傳送新的訊息,工作階段會自動重置嗎
是. 44. 工作階段會在session.idleMinutes 後過期(預設 60)。 14. 下一則
訊息會為該聊天鍵建立新的工作階段 ID。 15. 這不會刪除
逐字稿——只會啟動新的工作階段。
48. 是否有方法讓一組 OpenClaw 執行個體形成一個 CEO 與多個代理
- 可以,透過 多代理路由 與 子代理。 19. 你可以建立一個協調代理 以及多個具有各自工作區與模型的工作代理。
- 不過,這最適合被視為一個 有趣的實驗。 21. 它非常耗權杖,而且通常 比使用一個機器人搭配多個工作階段效率更低。 我們所設想的典型模型是: 你只和一個機器人對話,但用不同的工作階段來進行平行工作。 That bot can also spawn sub-agents when needed.
- 文件:Multi-agent routing、Sub-agents、Agents CLI。
25. 為什麼在任務進行到一半時脈絡被截斷?我要如何避免
- 工作階段的脈絡受限於模型的視窗大小。 27. 冗長的聊天、大量的工具輸出,或許多 檔案都可能觸發壓縮或截斷。
- 有哪些方法有幫助:
-
- 要求機器人總結目前狀態並將其寫入檔案。
-
- 在長任務前使用
/compact,切換主題時使用/new。
- 在長任務前使用
- Keep important context in the workspace and ask the bot to read it back.
- 對於長時間或平行的工作使用子代理,讓主聊天保持較小。
-
- 如果經常發生,選擇具有更大脈絡視窗的模型。
我要如何在保留安裝的情況下,完全重置 OpenClaw?
Use the reset command:- The onboarding wizard also offers Reset if it sees an existing config. See Wizard.
-
- 如果你使用了設定檔(
--profile/OPENCLAW_PROFILE),請重置每個狀態目錄(預設為~/.openclaw-<profile>)。
- 如果你使用了設定檔(
- Dev reset:
openclaw gateway --dev --reset(dev-only; wipes dev config + credentials + sessions + workspace).
Im getting context too large errors how do I reset or compact
使用以下其中一種:-
- 壓縮(保留對話,但總結較舊的回合):
- 或使用
/compact <instructions>來引導摘要。
-
重置(為相同的聊天鍵建立全新的工作階段 ID):
- 如果持續發生:
- 啟用或調整 工作階段修剪(
agents.defaults.contextPruning),以修剪舊的工具輸出。 - Use a model with a larger context window.
Why am I seeing LLM request rejected messagesNcontentXtooluseinput Field required
This is a provider validation error: the model emitted atool_use block without the required
input. 這通常表示工作階段歷史已過期或損毀(常見於長對話串
或工具/結構描述變更之後)。
Fix: start a fresh session with /new (standalone message).
為什麼我每 30 分鐘會收到一次心跳訊息?
心跳預設每 30m 執行一次。 Tune or disable them:HEARTBEAT.md 存在但實質上是空的(僅包含空白行與像 # Heading 這樣的 Markdown 標題),OpenClaw 會略過 Heartbeat 執行以節省 API 呼叫。
若檔案不存在,Heartbeat 仍會執行,由模型自行決定要做什麼。
若檔案不存在,心跳仍會執行,並由模型決定要做什麼。
Per-agent overrides use agents.list[].heartbeat. Docs: Heartbeat.
Do I need to add a bot account to a WhatsApp group
否. OpenClaw runs on your own account, so if you’re in the group, OpenClaw can see it. By default, group replies are blocked until you allow senders (groupPolicy: "allowlist").
If you want only you to be able to trigger group replies:
How do I get the JID of a WhatsApp group
Option 1 (fastest): tail logs and send a test message in the group:@g.us 結尾的 chatId(或 from),例如:
[email protected]。
Option 2 (if already configured/allowlisted): list groups from config:
為什麼 OpenClaw 在群組中不回覆
Two common causes:- Mention gating is on (default). You must @mention the bot (or match
mentionPatterns). - You configured
channels.whatsapp.groupswithout"*"and the group isn’t allowlisted.
Do groupsthreads share context with DMs
Direct chats collapse to the main session by default. Groups/channels have their own session keys, and Telegram topics / Discord threads are separate sessions. See Groups and Group messages.How many workspaces and agents can I create
No hard limits. 數十個(甚至上百個)都沒問題,但請留意:- Disk growth: sessions + transcripts live under
~/.openclaw/agents/<agentId>/sessions/. - Token cost: more agents means more concurrent model usage.
- Ops overhead: per-agent auth profiles, workspaces, and channel routing.
- Keep one active workspace per agent (
agents.defaults.workspace). - Prune old sessions (delete JSONL or store entries) if disk grows.
- Use
openclaw doctorto spot stray workspaces and profile mismatches.
Can I run multiple bots or chats at the same time Slack and how should I set that up
是. Use Multi-Agent Routing to run multiple isolated agents and route inbound messages by channel/account/peer. Slack is supported as a channel and can be bound to specific agents. Browser access is powerful but not “do anything a human can” - anti-bot, CAPTCHAs, and MFA can still block automation. For the most reliable browser control, use the Chrome extension relay on the machine that runs the browser (and keep the Gateway anywhere). Best-practice setup:- 常駐的 Gateway 主機(VPS/Mac mini)。
- 每個角色一個代理(綁定)。
- Slack channel(s) bound to those agents.
- Local browser via extension relay (or a node) when needed.
Models: defaults, selection, aliases, switching
What is the default model
OpenClaw 的預設模型是你設定為以下者:provider/model (example: anthropic/claude-opus-4-6). If you omit the provider, OpenClaw currently assumes anthropic as a temporary deprecation fallback - but you should still explicitly set provider/model.
What model do you recommend
Recommended default:anthropic/claude-opus-4-6.
良好替代: anthropic/claude-sonnet-4-5。
Reliable (less character): openai/gpt-5.2 - nearly as good as Opus, just less personality.
Budget: zai/glm-4.7.
MiniMax M2.1 has its own docs: MiniMax and
Local models.
經驗法則:高風險工作使用你 負擔得起的最佳模型,日常聊天或摘要則使用較便宜的模型。 You can route models per agent and use sub-agents to
parallelize long tasks (each sub-agent consumes tokens). See Models and
Sub-agents.
強烈警告:較弱或過度量化的模型更容易受到提示注入與不安全行為的影響。 See Security.
More context: Models.
Can I use selfhosted models llamacpp vLLM Ollama
是. If your local server exposes an OpenAI-compatible API, you can point a custom provider at it. Ollama is supported directly and is the easiest path. Security note: smaller or heavily quantized models are more vulnerable to prompt injection. We strongly recommend large models for any bot that can use tools. If you still want small models, enable sandboxing and strict tool allowlists. Docs: Ollama, Local models, Model providers, Security, Sandboxing.How do I switch models without wiping my config
Use model commands or edit only the model fields. Avoid full config replaces. Safe options:/modelin chat (quick, per-session)openclaw models set ...(updates just model config)openclaw configure --section model(interactive)- edit
agents.defaults.modelin~/.openclaw/openclaw.json
config.apply with a partial object unless you intend to replace the whole config.
If you did overwrite config, restore from backup or re-run openclaw doctor to repair.
Docs: Models, Configure, Config, Doctor.
What do OpenClaw, Flawd, and Krill use for models
- OpenClaw + Flawd: Anthropic Opus (
anthropic/claude-opus-4-6) - see Anthropic. - Krill: MiniMax M2.1 (
minimax/MiniMax-M2.1) - see MiniMax.
How do I switch models on the fly without restarting
Use the/model command as a standalone message:
/model, /model list, or /model status.
/model (and /model list) shows a compact, numbered picker. Select by number:
/model status shows which agent is active, which auth-profiles.json file is being used, and which auth profile will be tried next.
It also shows the configured provider endpoint (baseUrl) and API mode (api) when available.
How do I unpin a profile I set with profile
Re-run /model without the @profile suffix:
/model (or send /model <default provider/model>).
Use /model status to confirm which auth profile is active.
Can I use GPT 5.2 for daily tasks and Codex 5.3 for coding
是. Set one as default and switch as needed:- Quick switch (per session):
/model gpt-5.2for daily tasks,/model gpt-5.3-codexfor coding. - Default + switch: set
agents.defaults.model.primarytoopenai/gpt-5.2, then switch toopenai-codex/gpt-5.3-codexwhen coding (or the other way around). - Sub-agents: route coding tasks to sub-agents with a different default model.
Why do I see Model is not allowed and then no reply
Ifagents.defaults.models is set, it becomes the allowlist for /model and any
session overrides. Choosing a model that isn’t in that list returns:
agents.defaults.models, remove the allowlist, or pick a model from /model list.
1. 為什麼我會看到 Unknown model minimaxMiniMaxM21
This means the provider isn’t configured (no MiniMax provider config or auth profile was found), so the model can’t be resolved. 3. 這個偵測問題的修正在 2026.1.12(撰寫時尚未發布)。- 修正檢查清單:
-
- 升級到 2026.1.12(或從原始碼
main分支執行),然後重新啟動 gateway。
- 升級到 2026.1.12(或從原始碼
-
- 確認 MiniMax 已設定(精靈或 JSON),或在 env/auth profiles 中存在 MiniMax API key,讓提供者能被注入。
-
- 使用精確的模型 ID(區分大小寫):
minimax/MiniMax-M2.1或minimax/MiniMax-M2.1-lightning。
- 使用精確的模型 ID(區分大小寫):
-
Run:
- 並從清單中選擇(或在聊天中使用
/model list)。
- 並從清單中選擇(或在聊天中使用
Can I use MiniMax as my default and OpenAI for complex tasks
是. 11. 將 MiniMax 設為預設,需要時再 依工作階段切換模型。 Fallbacks are for errors, not “hard tasks,” so use/model or a separate agent.
- 選項 A:依工作階段切換
- Agent A default: MiniMax
- Agent B default: OpenAI
-
- 依 agent 路由,或使用
/agent來切換
- 依 agent 路由,或使用
21. opus、sonnet、gpt 是內建捷徑嗎
是. 22. OpenClaw 隨附一些預設簡寫(僅在模型存在於agents.defaults.models 時才會套用):
opus→anthropic/claude-opus-4-6-
sonnet→anthropic/claude-sonnet-4-5
-
gpt→openai/gpt-5.2
gpt-mini→openai/gpt-5-minigemini→google/gemini-3-pro-preview-
gemini-flash→google/gemini-3-flash-preview
- 如果你設定了同名的自訂別名,將以你的設定為準。
30. 我要如何定義/覆寫模型捷徑別名
Aliases come fromagents.defaults.models.<modelId>32. .alias`。 Example:
- 接著
/model sonnet(或在支援時使用/<alias>)會解析為該模型 ID。
35. 我要如何新增來自 OpenRouter 或 ZAI 等其他提供者的模型
- OpenRouter(按 token 計費;多種模型):
- Z.AI(GLM 模型):
No API key found for provider "zai")。
- 新增 agent 後找不到提供者的 API key
- 這通常表示 新的 agent 有空的驗證儲存。 43. 驗證是以 agent 為單位,並 儲存在:
-
- 執行
openclaw agents add <id>,並在精靈中設定驗證。
- 執行
-
- 或將主要 agent 的
agentDir中的auth-profiles.json複製到新 agent 的agentDir。
- 或將主要 agent 的
- 不要 在不同 agent 之間重用
agentDir;這會造成驗證/工作階段衝突。
47. 模型失敗切換與「All models failed」
48. 失敗切換如何運作
- 失敗切換分兩個階段進行:
-
- 同一提供者內的驗證設定檔輪替。
-
模型後備切換 到
agents.defaults.model.fallbacks中的下一個模型。
這個錯誤代表什麼意思
anthropic:default,但在預期的驗證儲存區中找不到其憑證。
Fix checklist for No credentials found for profile anthropicdefault
- Confirm where auth profiles live (new vs legacy paths)
- Current:
~/.openclaw/agents/<agentId>/agent/auth-profiles.json - Legacy:
~/.openclaw/agent/*(migrated byopenclaw doctor)
- Current:
- Confirm your env var is loaded by the Gateway
- If you set
ANTHROPIC_API_KEYin your shell but run the Gateway via systemd/launchd, it may not inherit it. Put it in~/.openclaw/.envor enableenv.shellEnv.
- If you set
- Make sure you’re editing the correct agent
- Multi-agent setups mean there can be multiple
auth-profiles.jsonfiles.
- Multi-agent setups mean there can be multiple
- Sanity-check model/auth status
- Use
openclaw models statusto see configured models and whether providers are authenticated.
- Use
-
Use a setup-token
- Run
claude setup-token, then paste it withopenclaw models auth setup-token --provider anthropic. - If the token was created on another machine, use
openclaw models auth paste-token --provider anthropic.
- Run
-
If you want to use an API key instead
-
Put
ANTHROPIC_API_KEYin~/.openclaw/.envon the gateway host. -
Clear any pinned order that forces a missing profile:
-
Put
-
Confirm you’re running commands on the gateway host
- In remote mode, auth profiles live on the gateway machine, not your laptop.
Why did it also try Google Gemini and fail
If your model config includes Google Gemini as a fallback (or you switched to a Gemini shorthand), OpenClaw will try it during model fallback. If you haven’t configured Google credentials, you’ll seeNo API key found for provider "google".
Fix: either provide Google auth, or remove/avoid Google models in agents.defaults.model.fallbacks / aliases so fallback doesn’t route there.
LLM request rejected message thinking signature required google antigravity
Cause: the session history contains thinking blocks without signatures (often from
an aborted/partial stream). Google Antigravity requires signatures for thinking blocks.
Fix: OpenClaw now strips unsigned thinking blocks for Google Antigravity Claude. If it still appears, start a new session or set /thinking off for that agent.
Auth profiles: what they are and how to manage them
Related: /concepts/oauth (OAuth flows, token storage, multi-account patterns)What is an auth profile
An auth profile is a named credential record (OAuth or API key) tied to a provider. Profiles live in:What are typical profile IDs
OpenClaw uses provider-prefixed IDs like:anthropic:default(common when no email identity exists)anthropic:<email>for OAuth identities- custom IDs you choose (e.g.
anthropic:work)
Can I control which auth profile is tried first
是. Config supports optional metadata for profiles and an ordering per provider (auth.order.<provider>). This does not store secrets; it maps IDs to provider/mode and sets rotation order.
OpenClaw may temporarily skip a profile if it’s in a short cooldown (rate limits/timeouts/auth failures) or a longer disabled state (billing/insufficient credits). To inspect this, run openclaw models status --json and check auth.unusableProfiles. Tuning: auth.cooldowns.billingBackoffHours*.
You can also set a per-agent order override (stored in that agent’s auth-profiles.json) via the CLI:
- 要鎖定特定代理:
3. OAuth 與 API 金鑰有什麼差別
OpenClaw supports both:- OAuth often leverages subscription access (where applicable).
- API keys use pay-per-token billing.
Gateway: ports, “already running”, and remote mode
What port does the Gateway use
gateway.port controls the single multiplexed port for WebSocket + HTTP (Control UI, hooks, etc.).
優先順序:
12. 為什麼 openclaw gateway status 顯示 Runtime running 但 RPC probe failed
Because “running” is the supervisor’s view (launchd/systemd/schtasks). The RPC probe is the CLI actually connecting to the gateway WebSocket and callingstatus.
- 使用
openclaw gateway status,並信任以下這些行:
-
Probe target:(探測實際使用的 URL)
-
Listening:(實際綁定在該連接埠上的內容)
Last gateway error:(common root cause when the process is alive but the port isn’t listening)
Why does openclaw gateway status show Config cli and Config service different
You’re editing one config file while the service is running another (often a--profile / OPENCLAW_STATE_DIR mismatch).
修復:
- 從你希望服務使用的相同
--profile/ 環境執行它。
What does another gateway instance is already listening mean
- OpenClaw 會在啟動時立即透過綁定 WebSocket 監聽器來強制執行執行期鎖(預設
ws://127.0.0.1:18789)。 If the bind fails withEADDRINUSE, it throwsGatewayLockErrorindicating another instance is already listening.
openclaw gateway --port <port>.
27. 我要如何以遠端模式執行 OpenClaw,讓客戶端連線到其他地方的 Gateway
- 設定
gateway.mode: "remote"並指向遠端 WebSocket URL,可選擇性設定 token/密碼:
-
- 只有在
gateway.mode為local(或你傳入覆寫旗標)時,openclaw gateway才會啟動。
- 只有在
- macOS 應用程式會監看設定檔,當這些值變更時即時切換模式。
Control UI 顯示未授權或一直重新連線,現在該怎麼辦
-
你的 gateway 啟用了驗證(
gateway.auth.*),但 UI 沒有送出相符的 token/密碼。 - 事實(來自程式碼):
-
- Control UI 會將 token 儲存在瀏覽器 localStorage 的鍵
openclaw.control.settings.v1。
- Control UI 會將 token 儲存在瀏覽器 localStorage 的鍵
- 最快方式:
openclaw dashboard(會輸出並複製儀表板 URL,嘗試開啟;若為無頭環境會顯示 SSH 提示)。 -
- 如果你還沒有 token:
openclaw doctor --generate-gateway-token。
- 如果你還沒有 token:
-
- 若為遠端,先建立通道:
ssh -N -L 18789:127.0.0.1:18789 user@host,然後開啟http://127.0.0.1:18789/。
- 若為遠端,先建立通道:
-
- 在 gateway 主機上設定
gateway.auth.token(或OPENCLAW_GATEWAY_TOKEN)。
- 在 gateway 主機上設定
-
- 在 Control UI 設定中貼上相同的 token。
-
- 還是卡住? 42. 執行
openclaw status --all,並依照 Troubleshooting。 43. 請參閱 Dashboard 以了解驗證細節。
- 還是卡住? 42. 執行
17. 我把 gateway bind 設為 tailnet,但無法綁定,什麼都沒有在監聽
tailnet綁定會從你的網路介面中選擇一個 Tailscale IP(100.64.0.0/10)。 19. 如果該機器未加入 Tailscale(或介面已停用),就沒有可綁定的位址。
-
- 在該主機上啟動 Tailscale(使其擁有 100.x 位址),或
-
- 切換為
gateway.bind: "loopback"/"lan"。
- 切換為
- 注意:
tailnet是明確指定的。 23.auto會偏好 loopback;當你想要僅限 tailnet 綁定時,請使用gateway.bind: "tailnet"。
Can I run multiple Gateways on the same host
- 通常不行——一個 Gateway 就能執行多個訊息通道與代理。 Use multiple Gateways only when you need redundancy (ex: rescue bot) or hard isolation.
- 可以,但你必須做隔離:
OPENCLAW_CONFIG_PATH(per-instance config)OPENCLAW_STATE_DIR(per-instance state)agents.defaults.workspace(workspace isolation)gateway.port(unique ports)
-
- 每個實例使用
openclaw --profile <name> …(會自動建立~/.openclaw-<name>)。
- 每個實例使用
- Set a unique
gateway.portin each profile config (or pass--portfor manual runs). -
- 安裝每個設定檔的服務:
openclaw --profile <name> gateway install。
- 安裝每個設定檔的服務:
bot.molt.<profile>; legacy com.openclaw.*, openclaw-gateway-<profile>.service, OpenClaw Gateway (<profile>)).
Full guide: Multiple gateways.
What does invalid handshake code 1008 mean
The Gateway is a WebSocket server, and it expects the very first message to be aconnect frame. 41. 必須是 connect frame。若收到其他內容,會以 code 1008(政策違反)關閉連線。
- 常見原因:
- You opened the HTTP URL in a browser (
http://...) instead of a WS client. -
- 你使用了錯誤的連接埠或路徑。
- A proxy or tunnel stripped auth headers or sent a non-Gateway request.
- 快速修正:
-
Use the WS URL:
ws://<host>:18789(orwss://...if HTTPS). - Don’t open the WS port in a normal browser tab.
-
- 若啟用了驗證,請在
connectframe 中包含 token/密碼。
- 若啟用了驗證,請在
Logging and debugging
Where are logs
File logs (structured):logging.file. File log level is controlled by logging.level. Console verbosity is controlled by --verbose and logging.consoleLevel.
Fastest log tail:
- macOS:
$OPENCLAW_STATE_DIR/logs/gateway.logandgateway.err.log(default:~/.openclaw/logs/...; profiles use~/.openclaw-<profile>/logs/...) - Linux:
journalctl --user -u openclaw-gateway[-<profile>].service -n 200 --no-pager - Windows:
schtasks /Query /TN "OpenClaw Gateway (<profile>)" /V /FO LIST
How do I startstoprestart the Gateway service
Use the gateway helpers:openclaw gateway --force can reclaim the port. See Gateway.
I closed my terminal on Windows how do I restart OpenClaw
There are two Windows install modes: 1) WSL2 (recommended): the Gateway runs inside Linux. Open PowerShell, enter WSL, then restart:The Gateway is up but replies never arrive What should I check
先做一次快速健康檢查:- 模型驗證未在 gateway 主機 上載入(檢查
models status)。 - Channel 配對 / 允許清單阻擋回覆(檢查 channel 設定與日誌)。
- WebChat / Dashboard 在沒有正確 token 的情況下開啟。
無故與 gateway 斷線 現在該怎麼辦
This usually means the UI lost the WebSocket connection. 檢查:- Is the Gateway running?
openclaw gateway status - Gateway 是否健康?
openclaw status - UI 是否使用正確的 token?
openclaw dashboard - 如果是遠端連線,tunnel / Tailscale 連結是否正常?
Telegram setMyCommands fails with network errors What should I check
先從日誌與 channel 狀態開始:TUI 沒有顯示任何輸出 我該檢查什麼
首先確認 Gateway 可連線,且 agent 可以執行:/status 查看目前狀態。 如果你預期在聊天
channel 中收到回覆,請確保已啟用傳送(/deliver on)。
文件: TUI, 斜線指令。
我要如何完全停止再啟動 Gateway
如果你安裝了服務:ELI5 openclaw gateway restart 與 openclaw gateway 的差別
openclaw gateway restart:重新啟動 背景服務(launchd/systemd)。openclaw gateway:在此終端機工作階段 以前景模式 執行 gateway。
openclaw gateway。
當某些事情失敗時,最快取得更多詳細資訊的方法是什麼
- 使用
--verbose啟動 Gateway 以取得更多主控台細節。 Then inspect the log file for channel auth, model routing, and RPC errors.
3. 媒體與附件
4. 我的技能產生了一個 imagePDF,但什麼都沒有送出
-
代理程式送出的外部附件必須包含一行
MEDIA:<path-or-url>(需獨立成行)。 6. 請參閱 OpenClaw assistant setup 與 Agent send。 - CLI 傳送:
-
- 目標頻道支援外傳媒體,且未被允許清單(allowlists)封鎖。
-
- 檔案大小在供應商的限制內(圖片會被調整至最大 2048px)。
- 請參閱 Images。
安全性與存取控制
將 OpenClaw 暴露於外部私訊是否安全?
- 將入站私訊視為不受信任的輸入。 16. 預設值的設計是為了降低風險:
- 在支援私訊的通道上,預設行為是配對(pairing):
- 未知的傳送者會收到一組配對碼;機器人不會處理其訊息。
-
- 透過以下指令核准:
openclaw pairing approve <channel> <code>
- 透過以下指令核准:
-
- 待處理的請求每個頻道上限為 3 個;若未收到代碼,請檢查
openclaw pairing list <channel>。
- 待處理的請求每個頻道上限為 3 個;若未收到代碼,請檢查
-
- 公開開放私訊需要明確的選擇加入(
dmPolicy: "open"並設定允許清單"*")。
- 公開開放私訊需要明確的選擇加入(
- 執行
openclaw doctor以揭示有風險的私訊政策。
23. 提示注入(prompt injection)是否只對公開機器人構成風險
否. 提示注入關乎的是不受信任的內容,而不只是誰能私訊機器人。 25. 如果你的助理會讀取外部內容(網路搜尋/擷取、瀏覽器頁面、電子郵件, 26. 文件、附件、貼上的日誌),那些內容可能包含試圖 最大的風險出現在啟用工具時:模型可能被誘導外洩上下文,或代表你呼叫工具。 28. 即使 只有你是唯一的傳送者,這種情況也可能發生。- 使用唯讀或停用工具的「reader」代理來摘要不受信任的內容。
-
- 外洩上下文或代表你呼叫工具。
-
- 透過以下方式降低影響範圍:
- 使用唯讀或停用工具的「reader」代理程式來摘要不受信任的內容
33. 對啟用工具的代理程式關閉 web_search / web_fetch / browser
- 沙箱化以及嚴格的工具允許清單 將機器人與獨立的帳號與電話號碼隔離,能在出問題時降低影響範圍。 36. 我的機器人是否應該擁有自己的電子郵件、GitHub 帳號或電話號碼
- 是的,對大多數設定而言如此。 38. 使用獨立的帳號與電話號碼來隔離機器人
- 若發生問題,可降低影響範圍。
40. 這也讓你更容易輪替
- 憑證或撤銷存取權,而不影響你的個人帳號。 42. 從小規模開始。
-
- 只授予你實際需要的工具與帳號存取權,並在需要時再
-
- 擴充。
- 讓它先起草,然後在送出前核准。
2. 我可以用較便宜的模型來處理個人助理任務嗎
- 可以,如果該代理僅用於聊天,且輸入是可信的。 4. 較小的等級 更容易受到指令劫持的影響,因此請避免將其用於啟用工具的代理 或在讀取不受信任的內容時使用。 5. 如果你必須使用較小的模型,請鎖定 工具並在沙箱中運行。 6. 請參閱 Security。
7. 我在 Telegram 中執行了 start,但沒有收到配對碼
-
配對碼僅在未知的發送者向機器人傳訊,且
dmPolicy: "pairing"已啟用時才會發送。 9. 單獨輸入/start不會產生配對碼。 - 檢查待處理的請求:
dmPolicy: "open"
for that account.
12. WhatsApp 會傳訊給我的聯絡人嗎?配對是如何運作的
否. Default WhatsApp DM policy is pairing. 14. 未知的發送者只會收到配對碼,他們的訊息不會被處理。 15. OpenClaw 只會回覆它收到的聊天,或你明確觸發的發送。- 以以下方式核准配對:
- 列出待處理的請求:
channels.whatsapp.selfChatMode。
22. 聊天指令、終止任務,以及「它停不下來」
23. 我要如何阻止內部系統訊息顯示在聊天中
- 大多數內部或工具訊息只會在該工作階段啟用 verbose 或 reasoning 時顯示。
verboseDefault set
to on in config.
30. 我要如何停止或取消正在執行的任務
- 將以下任一項作為獨立訊息發送(不要加斜線):
- 這些是中止觸發詞(不是斜線指令)。
- 對於背景程序(來自 exec 工具),你可以要求代理執行:
- 斜線指令總覽:請參閱 Slash commands。
-
大多數指令必須以
/開頭並作為獨立訊息發送,但少數捷徑(如/status)也可在行內使用,僅限於允許清單中的發送者。
38. 我要如何從 Telegram 發送 Discord 訊息?跨情境傳訊被拒絕
- OpenClaw 預設會封鎖跨提供者傳訊。 40. 如果工具呼叫綁定到 Telegram,除非你明確允許,否則它不會發送到 Discord。
- 為代理啟用跨提供者傳訊:
- 編輯設定後重新啟動 gateway。 44. 如果你只想為單一
代理啟用,請改在
agents.list[].tools.message下設定。
45. 為什麼感覺機器人會忽略連續快速發送的訊息
- 佇列模式控制新訊息如何與正在執行的任務互動。 Use
/queueto change modes:
-
steer- 新訊息會重新導向目前的任務
-
followup- 一次只執行一則訊息
-
collect- 將訊息批次收集後一次回覆(預設)
steer-backlog- 先進行 steer,然後處理積壓項目interrupt- 中止目前執行並重新開始
debounce:2s cap:25 drop:summarize。
回答截圖/聊天紀錄中的確切問題
Q:「使用 API key 時,Anthropic 的預設模型是什麼?」 A: 在 OpenClaw 中,憑證與模型選擇是分開的。 設定ANTHROPIC_API_KEY(或在 auth profiles 中儲存 Anthropic API key)只會啟用驗證,但實際的預設模型取決於你在 agents.defaults.model.primary 中的設定(例如 anthropic/claude-sonnet-4-5 或 anthropic/claude-opus-4-6)。 如果你看到 No credentials found for profile "anthropic:default",表示 Gateway 在執行中的代理所預期的 auth-profiles.json 中找不到 Anthropic 憑證。
還是卡住了? 6. 到 Discord 詢問,或開啟一個 GitHub discussion。