Lesson 0002 · Public URLs for lab guides

No account, anywhere: the Cloudflare quick tunnel

One binary, one command, zero signup. cloudflared dials out from your Codespace and hands back a public trycloudflare.com URL that needs no login — not even a Cloudflare one.

In Lesson 1 the URL came from GitHub, so it only works inside a Codespace and an org owner can switch it off. A Cloudflare quick tunnel (a.k.a. TryCloudflare) is the opposite kind of tool: it makes an outbound connection from wherever your app runs to Cloudflare's edge, and Cloudflare publishes a random public URL pointing back through it. No inbound ports, no GitHub token, and — the part you asked for — no Cloudflare account. [Cloudflare Docs]

The one fact that matters cloudflared tunnel --url http://localhost:PORT with no login creates a throwaway tunnel and prints a fresh https://<random>.trycloudflare.com URL that anyone can open, no auth.

Why reach for this inside a Codespace?

Do it now (≈ 2 minutes)

  1. Install cloudflared in the Codespace (Ubuntu base — the direct .deb is the most reliable one-shot):
    $ curl -L -o cloudflared.deb \
        https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb
    $ sudo dpkg -i cloudflared.deb
    $ cloudflared --version          # confirm it's there
  2. Start your web app on a port (throwaway example):
    $ python3 -m http.server 8080
  3. In a second terminal, open the tunnel:
    $ cloudflared tunnel --url http://localhost:8080
  4. Read the boxed line in the output — your public URL:
    +----------------------------------------------------+
    |  Your quick Tunnel has been created! Visit it at:  |
    |  https://random-words-1234.trycloudflare.com       |
    +----------------------------------------------------+
  5. Open that URL in an incognito window. It loads with no login. Paste it into your guide.
Your win A public, auth-free URL to a Codespace web app created without ever signing in to Cloudflare — portable to any machine that can run one binary.

Make it paste-friendly for a guide

The command runs in the foreground and holds the terminal. For a lab guide, capture the URL without babysitting a second terminal:

$ cloudflared tunnel --url http://localhost:8080 \
    --logfile tunnel.log &            # run in background
$ grep -o 'https://.*trycloudflare.com' tunnel.log | head -1

Stop it later with kill %1 (or close the Codespace).

Free-tier limits to write into the guide

Check yourself

What does a trainee need to sign in to before this URL works for them?
Compared with the Lesson 1 Codespaces URL, the quick-tunnel URL mainly differs because it…
I'm your teacher — ask me. Hitting a dpkg permission error, a config.yaml conflict, or wondering how to keep the tunnel alive when the Codespace idles? Ask in chat and we'll sort it before Lesson 3.

Read next (primary source): Cloudflare Docs — TryCloudflare (Quick Tunnels). The authoritative reference for the command, the URL, and every limit above.