cloudflared tunnel diag Guide
Generate and interpret a local cloudflared diagnostic bundle before changing Tunnel or origin settings.
What this usually means
cloudflared tunnel diag collects connector state, configuration, logs, metrics, system information and connectivity pre-check results into a local diagnostic bundle. It is useful when a Tunnel is Healthy but requests still fail, or when failures are intermittent and one log line is not enough. If diagnostics stalls while collecting large Docker logs, a reported cloudflared collector bug can block on stderr and cancel later steps; inspect bounded logs separately while investigating.
What it does not mean
A successful diagnostic collection does not prove the origin is healthy. The bundle can show a connected Tunnel while the configured origin is unreachable, uses the wrong scheme or port, or fails TLS validation. Conversely, a timeout while gathering Docker logs does not prove that the Tunnel itself is down.
Typical redacted log
cloudflared tunnel diag Diagnostic file written: cloudflared-diag-YYYY-MM-DDThh-mm-ss.zip
Check in this order
These are baseline command examples. For Windows Service or Kubernetes, open the analyzer and select the actual environment to get platform-native commands.
cloudflared versioncloudflared tunnel diagdocker logs --tail 200 <cloudflared-container> 2>&1cloudflared tunnel listcloudflared tunnel info <TUNNEL_NAME_OR_UUID>Common false diagnoses
- Treating Tunnel Healthy as proof that the application origin is reachable.
- Changing DNS, TLS or ingress settings before preserving diagnostic evidence.
- Sharing the diagnostic ZIP publicly without reviewing configuration, logs and system information for sensitive values.
How to verify recovery
- The diagnostic run completes and the relevant task results are available for review, or a bounded and redacted connector log excerpt is collected separately if diagnostics is blocked.
- Origin reachability is tested from the same network environment as cloudflared.
- A fresh public request succeeds after the identified origin, network, DNS or TLS issue is corrected.
Docker diagnostic collection stalls
If cloudflared tunnel diag stops after roughly 45 seconds of Docker log collection and subsequent tasks report context deadline exceeded, do not assume the Tunnel is disconnected. Read a small excerpt with docker logs --tail 200, redact it before sharing, and separately check connector and public-route health. An upstream issue reports stderr pipe blocking; this is not proof that every timeout has the same cause.
Still unsure?
Paste the relevant cloudflared log into the local analyzer. Redaction is on by default and the log is not uploaded to a TRACER RECART backend.
Open analyzer