dawiddutoit/custom-claude/cloudflare-tunnel-troubleshoot
Claude Code and agent skill by dawiddutoit/custom-claude
- community
Checking that the SKILL.md file is still in the repository.
Diagnoses and fixes Cloudflare Tunnel connectivity issues including stuck tunnels, failed connections, Error 1033, and tunnel registration problems. Use when remote access not working, tunnel shows disconnected in dashboard, Error 1033 on tunnel connection, or cloudflared container restarting. Triggers on "tunnel not connecting", "tunnel down", "Error 1033", "remote access broken", "fix tunnel", or "cloudflared not working". Works with Cloudflare Tunnel (cloudflared), QUIC connection health, and tunnel registration verification.
Install
npx vskill@latest install dawiddutoit/custom-claude/cloudflare-tunnel-troubleshootSKILL.md
Troubleshoot Cloudflare Tunnel Skill
Systematic diagnosis and resolution of Cloudflare Tunnel connectivity issues that prevent remote access to services.
Quick Start
Quick diagnostic for tunnel issues:
Table of Contents
- 3.1 Check Cloudflared Container Status
- 3.2 Verify Tunnel Token Configuration
- 3.3 Check Recent Tunnel Registrations
- 3.4 Analyze Tunnel Logs for Errors
- 3.5 Verify Tunnel in Cloudflare Dashboard
- 3.6 Test Remote Access
- 3.7 Apply Fix
When to Use This Skill
Explicit Triggers:
- "Tunnel not connecting"
- "Tunnel down"
- "Error 1033"
- "Remote access not working"
- "Fix Cloudflare Tunnel"
- "Cloudflared not working"
Implicit Triggers:
- Services work locally but not remotely
- Cloudflare dashboard shows tunnel as disconnected
- 502 Bad Gateway when accessing from internet
- Cloudflared container in restart loop
Debugging Triggers:
- "Why isn't remote access working?"
- "Why is tunnel disconnected?"
- "What is Error 1033?"
What This Skill Does
- Checks Container - Verifies cloudflared container is running
- Validates Token - Confirms CLOUDFLARE_TUNNEL_TOKEN is set
- Checks Registrations - Verifies tunnel has registered recently (within 10 min)
- Analyzes Logs - Searches for Error 1033, QUIC issues, connection failures
- Checks Dashboard - Verifies tunnel status in Cloudflare Zero Trust
- Tests Access - Attempts remote connection to verify tunnel routing
- Provides Fix - Gives specific recovery commands
Instructions
3.1 Check Cloudflared Container Status
Expected: Container status "Up" with uptime > 1 minute
Check container health:
If not running or unhealthy:
If in restart loop:
- Token likely invalid or missing
- Network connectivity issue
- Proceed to step 3.2
3.2 Verify Tunnel Token Configuration
Check token is set in environment:
Expected: Shows long base64-encoded token
If empty or missing:
- Check .env file:
- Verify docker-compose.yml passes it:
- Get new token from Cloudflare dashboard:
- Go to: https://one.dash.cloudflare.com → Access → Tunnels
- Click on tunnel → Configure
- Copy token from command
- Update .env and recreate container:
3.3 Check Recent Tunnel Registrations
Healthy tunnel registers connections every few minutes:
Expected: Registration within last 10 minutes
If no recent registrations (older than 10 minutes):
- Tunnel is stuck or disconnected
- QUIC connection may have failed
- Network connectivity issue
Check QUIC connection health:
3.4 Analyze Tunnel Logs for Errors
Search for common error patterns:
Common error patterns:
| Error | Meaning | Fix | |
|---|---|---|---|
| Error 1033 | Tunnel disconnected/stuck | Restart cloudflared container | |
context deadline exceeded | Network timeout | Check internet connectivity | |
unauthorized | Invalid tunnel token | Get new token from dashboard | |
failed to connect to edge | Can't reach Cloudflare | Check firewall/network | |
no such host | DNS resolution failure | Check DNS settings |
3.5 Verify Tunnel in Cloudflare Dashboard
Check tunnel status in Cloudflare Zero Trust:
- Go to: https://one.dash.cloudflare.com
- Navigate to: Access → Tunnels
- Find your tunnel in list
Expected status: "Healthy" with green indicator
If "Down" or "Unhealthy":
- Tunnel not connected from server side
- Proceed to restart (step 3.7)
Check tunnel routes:
- Click tunnel name → Configure
- Verify Public Hostname routes are configured
- Expected routes:
- pihole.temet.ai → https://caddy:443
- ha.temet.ai → https://caddy:443
- jaeger.temet.ai → https://caddy:443
- etc.
3.6 Test Remote Access
Test accessing a service from internet (not local WiFi):
From mobile (using cellular data, not WiFi):
Expected: Cloudflare Access login page appears (or service if already authenticated)
Alternatively, use external proxy:
If connection fails:
- 502 Bad Gateway → Tunnel not routing correctly
- Timeout → Tunnel not connected
- Connection refused → Cloudflared not running
- SSL error → Certificate issue (different skill)
3.7 Apply Fix
Fix A: Stuck Tunnel (most common)
Restart cloudflared container:
Wait 30 seconds, then verify:
Expected: Fresh registrations appearing
Fix B: Invalid Token
Get new token and recreate container:
Fix C: Network Connectivity Issue
Check internet connectivity:
If network issues found, may need to recreate Docker network (see Docker network troubleshooting).
Fix D: Complete Tunnel Reset
If all else fails, full reset:
Watch for "Registered tunnel" messages appearing.
Supporting Files
| File | Purpose | |
|---|---|---|
references/reference.md | Cloudflare Tunnel architecture, Error 1033 details, QUIC protocol | |
examples/examples.md | Example log outputs, common scenarios |
Expected Outcomes
Success:
- Cloudflared container running and healthy
- Recent tunnel registrations (within 10 minutes)
- Tunnel shows "Healthy" in Cloudflare dashboard
- Remote access works with OAuth prompt
- No Error 1033 in logs
Partial Success:
- Tunnel connecting but routes not configured (add routes in dashboard)
- Tunnel working but intermittent (network instability)
Failure Indicators:
- Cloudflared container not running or restarting
- No tunnel registrations in logs
- Error 1033 persists after restart
- Remote access returns 502 Bad Gateway
Requirements
- Docker running with cloudflared container
- Valid Cloudflare Tunnel token
- Internet connectivity from server
- Cloudflare Zero Trust account
- Tunnel configured in Cloudflare dashboard
Red Flags to Avoid
- [ ] Do not delete tunnel in Cloudflare dashboard (creates orphaned token)
- [ ] Do not expose ports 80/443 if tunnel not working (security risk)
- [ ] Do not skip checking logs before restart (miss root cause)
- [ ] Do not restart tunnel repeatedly (causes rate limiting)
- [ ] Do not test remote access from local WiFi (use cellular/external)
- [ ] Do not confuse tunnel token with API token (different credentials)
- [ ] Do not modify tunnel routes without updating Caddyfile
Notes
- Tunnel registrations should occur every few minutes (QUIC keep-alive)
- Error 1033 typically indicates stuck/stale tunnel process
- Tunnel uses outbound QUIC connection (no inbound ports needed)
- Maximum tunnel downtime before auto-disconnect: ~10 minutes
- Automated monitoring (infrastructure-monitor.sh) detects stuck tunnels
- Tunnel routes are configured in Cloudflare dashboard, not locally
- Use
infrastructure-health-checkskill for comprehensive diagnostics
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/cloudflare-tunnel-troubleshoot/SKILL.md
Popularity
- Repository stars
- 1
- 7-day trend score
- 3
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 5 Apr 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/dawiddutoit/custom-claude/cloudflare-tunnel-troubleshoot)