
cloudflare-tunnels
by stephenwinters81
SKILL.md
name: cloudflare-tunnels description: Use when the user asks to manage Cloudflare tunnels, start/stop tunnels, configure tunnel routing, check tunnel status, or expose local services via Cloudflare. Covers cloudflared CLI operations for tunnel management on curatest.xyz domain.
Cloudflare Tunnel Management
Account Details
- Domain: curatest.xyz
- Cloudflared path:
C:\Program Files (x86)\cloudflared\cloudflared.exe - Config directory:
C:\Users\User\.cloudflared\ - Auth certificate:
C:\Users\User\.cloudflared\cert.pem
Existing Tunnels
| Tunnel | UUID | Hostname | Local Port | Config File |
|---|---|---|---|---|
| synaptum6 | deafbe30-a821-4f45-a396-6a380489d26e | s6.curatest.xyz | 3000 | config-synaptum6.yml |
| synaptum6-api | eb11f87e-b013-4f46-b515-b4ae95681ad7 | api.s6.curatest.xyz | 8890 | config-synaptum6-api.yml |
Authentication Setup (New Machine)
If cert.pem doesn't exist, authenticate first:
"C:\Program Files (x86)\cloudflared\cloudflared.exe" login
This opens a browser to authenticate with Cloudflare and saves the certificate.
Creating a New Tunnel
Step 1: Create the tunnel
"C:\Program Files (x86)\cloudflared\cloudflared.exe" tunnel create <tunnel-name>
This creates a credentials JSON file in the config directory.
Step 2: Create config file
Create C:\Users\User\.cloudflared\config-<name>.yml:
tunnel: <tunnel-uuid-from-step-1>
credentials-file: C:\Users\User\.cloudflared\<tunnel-uuid>.json
ingress:
- hostname: <subdomain>.curatest.xyz
service: http://127.0.0.1:<PORT>
- service: http_status:404
Note: Use 127.0.0.1 not localhost on Windows (see Troubleshooting section).
Step 3: Add DNS route
"C:/Program Files (x86)/cloudflared/cloudflared.exe" tunnel route dns <tunnel-name> <subdomain>.curatest.xyz
Step 4: Start the tunnel
"C:/Program Files (x86)/cloudflared/cloudflared.exe" tunnel --config "C:/Users/User/.cloudflared/config-<name>.yml" run <tunnel-name>
Common Commands
List all tunnels
"C:\Program Files (x86)\cloudflared\cloudflared.exe" tunnel list
Get tunnel info
"C:\Program Files (x86)\cloudflared\cloudflared.exe" tunnel info <tunnel-name>
Delete a tunnel
"C:\Program Files (x86)\cloudflared\cloudflared.exe" tunnel delete <tunnel-name>
Stop all tunnels
taskkill /F /IM cloudflared.exe
Starting Existing Synaptum6 Tunnels
Start frontend tunnel (port 3000)
"C:/Program Files (x86)/cloudflared/cloudflared.exe" tunnel --config "C:/Users/User/.cloudflared/config-synaptum6.yml" run synaptum6
Start API tunnel (port 8890)
"C:/Program Files (x86)/cloudflared/cloudflared.exe" tunnel --config "C:/Users/User/.cloudflared/config-synaptum6-api.yml" run synaptum6-api
Start both (run each in background)
Use run_in_background: true in Claude Code for each command.
Verifying Tunnel Status
Check if services are running locally
curl -s http://localhost:3000 # Frontend
curl -s http://localhost:8890/api/v1/health # API
Check DNS resolution
nslookup <subdomain>.curatest.xyz 8.8.8.8
Test tunnel endpoint
curl -s https://<subdomain>.curatest.xyz
Flush local DNS cache (after adding new DNS routes)
ipconfig //flushdns
Troubleshooting
SSL/TLS handshake errors
New DNS routes take 1-5 minutes for Cloudflare to provision SSL certificates. Test with HTTP first:
curl -s http://<subdomain>.curatest.xyz
Tunnel not connecting
- Verify local service is running on the configured port
- Check config file has correct port
- Ensure tunnel credentials JSON file exists
- Check tunnel logs for errors
Finding running tunnel processes
tasklist | findstr cloudflared
Check listening ports
netstat -ano | grep ":<port>"
Config File Template
IMPORTANT: On Windows, use 127.0.0.1 instead of localhost to avoid IPv6 resolution issues.
tunnel: <uuid>
credentials-file: C:\Users\User\.cloudflared\<uuid>.json
ingress:
- hostname: <app>.curatest.xyz
service: http://127.0.0.1:<PORT>
- service: http_status:404
Why 127.0.0.1?
On Windows, localhost resolves to IPv6 ::1 first. If the origin service only listens on IPv4, cloudflared will get "connection refused" and return 502 Bad Gateway. Using 127.0.0.1 explicitly forces IPv4.
Naming Conventions
- Tunnel name:
<appname>for frontend,<appname>-apifor backend - Config file:
config-<appname>.yml - Hostname:
<appname>.curatest.xyzorapi.<appname>.curatest.xyz
スコア
総合スコア
リポジトリの品質指標に基づく評価
SKILL.mdファイルが含まれている
ライセンスが設定されている
100文字以上の説明がある
GitHub Stars 100以上
3ヶ月以内に更新がある
10回以上フォークされている
オープンIssueが50未満
プログラミング言語が設定されている
1つ以上のタグが設定されている
レビュー
レビュー機能は近日公開予定です