Files
openclaw/docs/cli/doctor.md

42 lines
1.2 KiB
Markdown
Raw Normal View History

2026-01-15 06:12:54 +00:00
---
2026-01-30 03:15:10 +01:00
summary: "CLI reference for `openclaw doctor` (health checks + guided repairs)"
2026-01-15 06:12:54 +00:00
read_when:
- You have connectivity/auth issues and want guided fixes
- You updated and want a sanity check
title: "doctor"
2026-01-15 06:12:54 +00:00
---
2026-01-30 03:15:10 +01:00
# `openclaw doctor`
2026-01-15 06:12:54 +00:00
Health checks + quick fixes for the gateway and channels.
Related:
2026-01-31 21:13:13 +09:00
2026-01-15 06:12:54 +00:00
- Troubleshooting: [Troubleshooting](/gateway/troubleshooting)
- Security audit: [Security](/gateway/security)
## Examples
```bash
2026-01-30 03:15:10 +01:00
openclaw doctor
openclaw doctor --repair
openclaw doctor --deep
2026-01-15 06:12:54 +00:00
```
Notes:
2026-01-31 21:13:13 +09:00
- Interactive prompts (like keychain/OAuth fixes) only run when stdin is a TTY and `--non-interactive` is **not** set. Headless runs (cron, Telegram, no terminal) will skip prompts.
2026-01-30 03:15:10 +01:00
- `--fix` (alias for `--repair`) writes a backup to `~/.openclaw/openclaw.json.bak` and drops unknown config keys, listing each removal.
## macOS: `launchctl` env overrides
2026-01-30 03:15:10 +01:00
If you previously ran `launchctl setenv OPENCLAW_GATEWAY_TOKEN ...` (or `...PASSWORD`), that value overrides your config file and can cause persistent “unauthorized” errors.
```bash
2026-01-30 03:15:10 +01:00
launchctl getenv OPENCLAW_GATEWAY_TOKEN
launchctl getenv OPENCLAW_GATEWAY_PASSWORD
2026-01-30 03:15:10 +01:00
launchctl unsetenv OPENCLAW_GATEWAY_TOKEN
launchctl unsetenv OPENCLAW_GATEWAY_PASSWORD
```