配置参考

配置参考

OpenClaw 读取可选的 JSON5 配置文件:~/.openclaw/openclaw.json

如果文件不存在,会使用安全默认值。

推荐流程

  1. 先跑一次向导:openclaw onboard --install-daemon
  2. 改配置前先采集快照:openclaw doctor

编辑方式

  • 交互式:openclaw configure(或直接运行 openclaw config
  • 一行命令:openclaw config get|set|unset …
  • Control UI:运行 openclaw dashboard,然后打开 http://localhost:18789/Config 标签

示例(单键修改):

openclaw config get agents.defaults.workspace
openclaw config set agents.defaults.heartbeat.every "2h"
openclaw config unset tools.web.search.apiKey

配置校验失败时

  • Gateway 可能会因为 schema 校验失败而拒绝启动(未知键/类型不匹配等)。
  • 使用 openclaw doctor --fix(或 --yes)应用迁移/修复。

相关链接