Quick Tunnels: publish a localhost project on the web with invitation-only access
Korben revisits a Cloudflare command that many developers already use: cloudflared tunnel --url. It publishes a server running on your machine at a trycloudflare.com address, with no account, no domain name, and above all no port to open on your router. For someone hosting services at home, it is a simple way to show a project to someone for a quick test.
The newest addition is the --allowed-mail option. Until now, anyone with the link could connect to the service. Now access can be limited to a few email addresses you specify, with a one-time code sent through Cloudflare Access.
The tutorial starts with a small local web server on port 8080, serving a test page via Python. cloudflared is the open source connector that opens an outbound connection to the Cloudflare network. On a Mac, installation goes through Homebrew. On Debian or Ubuntu, you need Cloudflare's official repository, whose signing key recently changed, so the author advises using the current commands rather than those in older tutorials.
One point stood out to me: if you have AI agents work with this tool, Cloudflare recommends a PreToolUse hook that blocks any command lacking --allowed-mail, so that an agent does not expose a public tunnel by mistake.
For a homelab, this is a lightweight alternative to opening ports or running a VPN, as long as you remember that a public tunnel is still an exposure to the Internet, even a temporary one.
Source: Korben
The newest addition is the --allowed-mail option. Until now, anyone with the link could connect to the service. Now access can be limited to a few email addresses you specify, with a one-time code sent through Cloudflare Access.
The tutorial starts with a small local web server on port 8080, serving a test page via Python. cloudflared is the open source connector that opens an outbound connection to the Cloudflare network. On a Mac, installation goes through Homebrew. On Debian or Ubuntu, you need Cloudflare's official repository, whose signing key recently changed, so the author advises using the current commands rather than those in older tutorials.
One point stood out to me: if you have AI agents work with this tool, Cloudflare recommends a PreToolUse hook that blocks any command lacking --allowed-mail, so that an agent does not expose a public tunnel by mistake.
For a homelab, this is a lightweight alternative to opening ports or running a VPN, as long as you remember that a public tunnel is still an exposure to the Internet, even a temporary one.
Source: Korben
Comments 0
Leave the first comment, in any language.
Log in to comment