Skip to content

Instantly share code, notes, and snippets.

@randyburden
Created July 27, 2022 20:54
Show Gist options
  • Save randyburden/cbda4da88bc4e6cd9e17d59ecf03dcf9 to your computer and use it in GitHub Desktop.
Save randyburden/cbda4da88bc4e6cd9e17d59ecf03dcf9 to your computer and use it in GitHub Desktop.

Revisions

  1. randyburden created this gist Jul 27, 2022.
    21 changes: 21 additions & 0 deletions Cloudflared Quick Tunnels.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    # Cloudflare Quick Tunnels

    ## Overview
    - 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.

    ## Links
    - [Documentation](https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/run-tunnel/trycloudflare/)
    - Download from [Cloudflare](https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/installation/) or download from the [GitHub repo](https://github.com/cloudflare/cloudflared/releases)

    ## Commands

    - 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`
    - 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`