目标:从一台干净环境出发,完成 OpenClaw 初始化,并让一个 Agent 能正常收发一条测试消息。
建议在非生产环境先完整跑一遍。即便已经安装过 OpenClaw,也可以把本页当作 smoke test。
每一步都先执行命令,再记录结果和问题。
执行:
openclaw setup
openclaw setup --workspace ~/.openclaw/workspace
预期:
~/.openclaw/openclaw.json is created or updated.~/.openclaw/workspace (or the path you specified).openclaw setupopenclaw setup --workspace ~/.openclaw/workspace~/.openclaw/openclaw.json~/.openclaw/workspaceRun the interactive wizard:
openclaw onboard --flow quickstart
If you already know you want a remote gateway, use:
openclaw onboard --flow manual --mode remote --remote-url wss://gateway-host:18789
During the wizard:
If you need a fully non-interactive run (for CI or automation), adapt one of the examples in the official docs, e.g.:
openclaw onboard --non-interactive --auth-choice custom-api-key \
--custom-base-url "https://llm.example.com/v1" \
--custom-model-id "foo-large" \
--custom-api-key "$CUSTOM_API_KEY" \
--secret-input-mode plaintext --custom-compatibility openai
openclaw onboard --flow quickstartopenclaw onboard --flow manual --mode remote --remote-url wss://gateway-host:18789openclaw onboard --non-interactive --auth-choice custom-api-key \
--custom-base-url "https://llm.example.com/v1" \
--custom-model-id "foo-large" \
--custom-api-key "$CUSTOM_API_KEY" \
--secret-input-mode plaintext --custom-compatibility openai执行:
openclaw doctor
If issues are reported, let the CLI apply safe fixes:
openclaw doctor --repair
需要更深度检查时 (sandbox, channels, cron, secrets):
openclaw doctor --deep
You should continue only when doctor reports healthy status or warns only about items you understand and accept.
openclaw doctoropenclaw doctor --repairopenclaw doctor --deepList existing agents:
openclaw agents list
Create a new agent workspace:
openclaw agents add work --workspace ~/.openclaw/workspace-work
Inspect bindings (how channels map to agents):
openclaw agents bindings
If you already have a main workspace and just want to set identity:
openclaw agents set-identity --workspace ~/.openclaw/workspace --from-identity
openclaw agents listopenclaw agents add work --workspace ~/.openclaw/workspace-workopenclaw agents bindingsopenclaw agents set-identity --workspace ~/.openclaw/workspace --from-identity