Skip to content

Instantly share code, notes, and snippets.

@lonormaly
Created March 14, 2026 10:07
Show Gist options
  • Select an option

  • Save lonormaly/4ded3c6c3114ec8d95405ce9c2ce506f to your computer and use it in GitHub Desktop.

Select an option

Save lonormaly/4ded3c6c3114ec8d95405ce9c2ce506f to your computer and use it in GitHub Desktop.
cloudflared-tunnel-skill.md

Cloudflare Tunnel - Share Your localhost Instantly

Expose your local development server to the internet via Cloudflare Quick Tunnel.

Steps

  1. Check if cloudflared is installed. If not, install it:

  2. Detect which port the app is running on automatically (check running processes, recent terminal output, config files like package.json scripts, docker-compose.yml, etc.). Only ask the user if you genuinely can't determine it.

  3. Start the tunnel:

    cloudflared tunnel --url http://localhost:${PORT}
  4. Extract the generated public URL from the cloudflared output (it will be a *.trycloudflare.com URL).

  5. Present the URL to the user clearly:

    Your app is now live at: https://xxxxx.trycloudflare.com
    
    Share this URL with anyone -- it works on any device, any network.
    
  6. Print a celebrative ASCII art banner with the public URL prominently displayed in the center. Make it feel like a "launch moment" -- something the user will want to screenshot and share. Example vibe:

    ╔══════════════════════════════════════════════════════╗
    ║                                                      ║
    ║   🚀  YOUR APP IS LIVE ON THE INTERNET  🚀            ║
    ║                                                      ║
    ║   https://xxxxx.trycloudflare.com                    ║
    ║                                                      ║
    ║   Share this URL with anyone, anywhere.              ║
    ║                                                      ║
    ╚══════════════════════════════════════════════════════╝
    
  7. Remind the user:

    • The tunnel stays alive as long as this terminal is open
    • The URL changes if you restart the tunnel
    • For a permanent setup, see Part 2 of Ship It Free

Notes

  • No Cloudflare account needed for Quick Tunnels
  • HTTPS is automatic -- no certificate setup
  • Works behind firewalls and NAT
  • 200 concurrent request limit (fine for demos and feedback)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment