Cloudflare Quick Tunnels can now require a one-time code sent by email. The --allowed-mail option protects a demo, webhook or local server without requiring visitors to create a Cloudflare account.
The short answer
| Question | Answer |
|---|---|
| What needs to be added? | Pass --allowed-mail to the cloudflared tunnel command. |
| Can a whole domain be allowed? | Yes, with a value such as *@example.com. |
| Does access survive shutdown? | No. The Quick Tunnel and its access end with the process. |
Protection suited to temporary demos
A trycloudflare.com URL was previously open to anyone who knew it. Email filtering adds a simple barrier without configuring a domain or Zero Trust organization. It is useful for a quick review, but it does not turn a development server into production infrastructure.
Specific addresses or a complete domain
The option accepts one address, several values or a whole domain. Allowing a domain makes internal demos convenient but broadens the potential audience. Sensitive material should use a named list and an application that also has its own authentication.
Email codes have limits
Security depends on the mailbox and the recipient’s session protection. Forwarded messages or compromised accounts bypass the barrier. A tunnel should not expose secrets, an administration console or production data simply because a code is required.
A practical command for the right lifetime
This mechanism suits disposable environments: launch, share with a few people, then stop. Persistent access calls for Cloudflare Access policies, a controlled domain, logs and enterprise identities. Choose based on duration and risk.




Join the discussion
Comments
Loading comments…