2026-01-15 06:12:54 +00:00
---
2026-01-27 12:19:58 +00:00
summary: "CLI reference for `moltbot 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
---
2026-01-27 12:19:58 +00:00
# `moltbot doctor`
2026-01-15 06:12:54 +00:00
Health checks + quick fixes for the gateway and channels.
Related:
- Troubleshooting: [Troubleshooting ](/gateway/troubleshooting )
- Security audit: [Security ](/gateway/security )
## Examples
```bash
2026-01-27 12:19:58 +00:00
moltbot doctor
moltbot doctor --repair
moltbot doctor --deep
2026-01-15 06:12:54 +00:00
```
2026-01-17 17:16:20 +00:00
Notes:
- 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-27 12:19:58 +00:00
- `--fix` (alias for `--repair` ) writes a backup to `~/.clawdbot/moltbot.json.bak` and drops unknown config keys, listing each removal.
2026-01-17 17:16:20 +00:00
2026-01-16 19:29:48 +00:00
## macOS: `launchctl` env overrides
If you previously ran `launchctl setenv CLAWDBOT_GATEWAY_TOKEN ...` (or `...PASSWORD` ), that value overrides your config file and can cause persistent “unauthorized” errors.
```bash
launchctl getenv CLAWDBOT_GATEWAY_TOKEN
launchctl getenv CLAWDBOT_GATEWAY_PASSWORD
launchctl unsetenv CLAWDBOT_GATEWAY_TOKEN
launchctl unsetenv CLAWDBOT_GATEWAY_PASSWORD
```