> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pylon.to/llms.txt
> Use this file to discover all available pages before exploring further.

# doctor

> pylon doctor checks all Pylon dependencies and configuration, reports issues and recommendations, and can interactively fix some problems.

`pylon doctor` runs a full health check on your Pylon installation. It verifies Docker, your agent image, channel credentials, Git auth, port availability, and per-pylon webhook reachability -- then prints a summary of issues and recommendations.

## Usage

```bash theme={null}
pylon doctor
```

No arguments or flags.

## Checks performed

| Check                    | What it verifies                                                      |
| ------------------------ | --------------------------------------------------------------------- |
| **Config**               | `~/.pylon/config.yaml` exists and is valid                            |
| **Docker**               | Docker daemon is running; prints version                              |
| **Agent image**          | The configured agent Docker image is built                            |
| **Telegram bot**         | Bot token is set and valid; bot API responds                          |
| **Telegram chat**        | Chat ID is configured and bot has access                              |
| **Slack bot**            | Bot token is valid; bot is authenticated                              |
| **Slack channel**        | Bot is invited to the configured channel                              |
| **Git auth**             | SSH key for GitHub is configured, or `gh` CLI is authenticated        |
| **Agent auth**           | OAuth session (`~/.claude/`) or API key env var is set                |
| **Port**                 | Configured port (default 8080) is available or already owned by Pylon |
| **Pylons**               | Lists all constructed pipelines                                       |
| **Webhook reachability** | Per-pylon: sends a GET to the public webhook URL                      |
| **systemd service**      | Whether the Pylon user service is installed and active                |

## Status indicators

Each line shows one of four statuses:

| Indicator | Meaning                                            |
| --------- | -------------------------------------------------- |
| `ok`      | Check passed                                       |
| `FAIL`    | Blocking issue -- fix before running `pylon start` |
| `WARN`    | Non-blocking recommendation                        |
| `--`      | Not configured (optional feature)                  |

## Example output

```
Pylon Doctor

Config .............. ok    ~/.pylon/config.yaml found
Docker .............. ok    running (v27.1.1)
Agent image ......... ok    ghcr.io/pylonto/agent-claude:latest
Telegram bot ........ ok    connected (@MyPylonBot)
Telegram chat ....... ok    chat -1001234567890 accessible
Git (SSH) ........... ok    GitHub SSH key configured
OAuth session ....... ok    ~/.claude found
Port 8080 ........... ok    available
Pylons .............. 2 constructed (my-sentry, pr-review)
  my-sentry webhook ... ok    https://my-server.com/my-sentry reachable
systemd service ..... --    not installed (run `pylon service install`)

All checks passed. (1 recommendation)
```

## Interactive fixes

Doctor can fix some issues interactively:

* **No channel configured** -- prompts to set up Telegram or Slack on the spot
* **Telegram chat ID missing or inaccessible** -- offers to auto-detect it (add bot to group, send a message)

## When to run doctor

* After first installation, before `pylon start`
* When a pipeline stops receiving notifications
* When a webhook is not being triggered from an external service
* After changing bot tokens or rotating API keys
