First steps
開始使用
安裝 OpenClaw、執行入門設定,並與你的 AI 助理聊天,全程約 5 分鐘。完成後,你將擁有執行中的 Gateway、已設定的驗證,以及可用的聊天工作階段。
你需要準備
- Node.js — 建議使用 Node 24(也支援 Node 22.16+)
- 模型供應商的 API 金鑰(Anthropic、OpenAI、Google 等)— 入門設定會提示你輸入
快速設定
安裝 OpenClaw
macOS / Linux
curl -fsSL https://openclaw.ai/install.sh | bash
Windows (PowerShell)
iwr -useb https://openclaw.ai/install.ps1 | iex
執行入門設定
openclaw onboard --install-daemon
精靈會引導你選擇模型供應商、設定 API 金鑰,並設定 Gateway。大約需要 2 分鐘。
如需完整參考,請參閱入門設定(CLI)。
確認 Gateway 正在執行
openclaw gateway status
你應該會看到 Gateway 正在連接埠 18789 上監聽。
開啟儀表板
openclaw dashboard
這會在瀏覽器中開啟 Control UI。如果能載入,就表示一切正常。
傳送你的第一則訊息
在 Control UI 聊天中輸入訊息,你應該會收到 AI 回覆。
進階:掛載自訂 Control UI 建置
如果你維護在地化或自訂的儀表板建置,請將
gateway.controlUi.root 指向包含已建置靜態
資產與 index.html 的目錄。
mkdir -p "$HOME/.openclaw/control-ui-custom"
# Copy your built static files into that directory.
接著設定:
{
"gateway": {
"controlUi": {
"enabled": true,
"root": "$HOME/.openclaw/control-ui-custom"
}
}
}
重新啟動 Gateway 並重新開啟儀表板:
openclaw gateway restart
openclaw dashboard
接下來做什麼
連接頻道
Discord、Feishu、iMessage、Matrix、Microsoft Teams、Signal、Slack、Telegram、WhatsApp、Zalo,以及更多。
配對與安全性
控制誰可以傳訊息給你的代理。
設定 Gateway
模型、工具、沙盒與進階設定。
瀏覽工具
瀏覽器、exec、網頁搜尋、Skills 與 Plugins。
進階:環境變數
如果你以服務帳號執行 OpenClaw,或想使用自訂路徑:
OPENCLAW_HOME— 內部路徑解析的主目錄OPENCLAW_STATE_DIR— 覆寫狀態目錄OPENCLAW_CONFIG_PATH— 覆寫設定檔路徑
完整參考:環境變數。