- Cloudflare Tunnels has a feature named "Quick Tunnels" that allows you to expose localhost ports to the internet via a dynamically generating unique URL.
- Cloudflare Quick Tunnels is a free alternative to ngrok, which is a popular developer tool with more features, but does not allow you to have more than 1 instance running at a time without paying, whereas with Cloudflare Quick Tunnels there is no such limit.
- Documentation
- Download from Cloudflare or download from the GitHub repo
- Commands Overview
- After downloading, rename the executable to "cloudflared", then simply execute it from the command-line.
- Basic Command
- This command will start a quick tunnel that exposes whatever app you are running on port 8080 to the internet via a dynamically generated URL such as https://some-random-subdomain.trycloudflare.com
cloudflared tunnel --url http://localhost:8080
- This command will start a quick tunnel that exposes whatever app you are running on port 8080 to the internet via a dynamically generated URL such as https://some-random-subdomain.trycloudflare.com
- Host Header Command
- Use this command if you run into an "Invalid Host Header" error:
cloudflared tunnel --url http://localhost:8080 --http-host-header localhost:8080
- Use this command if you run into an "Invalid Host Header" error: