Cloudflare Quick Tunnels: Restrict a Local Demo Before Sharing Its URL

To share a temporary Cloudflare Quick Tunnel with specific people, start it with --allowed-mail and list their exact email addresses. Visitors use an emailed one-time PIN. Without the flag, anyone with the generated URL can reach the service. Before sharing, use separate browser sessions to check that an approved visitor can open the demo and an unlisted visitor cannot.

Cloudflare’s October 2, 2026 announcement adds email restrictions to Quick Tunnels through --allowed-mail. This guide explains how to choose an appropriately limited demo, check the connector, verify access and shut the session down. It also explains when this feature is the wrong tool.

Evidence boundary: This is a documentation-based guide checked on October 7, 2026. CoreSecTech has not independently tested the feature, measured its security or reproduced the authentication flow. The verification steps below are instructions for your own authorized environment, not reported test results. The featured image is an original conceptual illustration, not a product screenshot.

1. Decide whether the demo should leave your machine

Before running any sharing command, identify the exact application and local port. Ask what an invited person could read, download or change once admitted. If you cannot answer, stop and inspect the application first. Access to the front page does not necessarily describe access to every route behind it.

  • Use a disposable demo with synthetic data. Keep customer records, production credentials and internal documents out of it.
  • Disconnect write-capable production integrations or replace them with a dedicated test environment before sharing.
  • Remove debug consoles, directory listings and administration tools that are not needed for the demonstration.
  • Confirm that you have permission to expose the app. Employer or client policies may require a managed staging environment instead.

CoreSecTech recommendation: Treat the allowed visitor as someone who can explore the exposed application, not merely watch your intended click-through. If that level of access is unacceptable, an email gate alone is not enough.

2. Check cloudflared before relying on the flag

Cloudflare’s feature explanation identifies cloudflared 2026.9.3 as the first version supporting --allowed-mail. For current builds, see the official latest release.

cloudflared --version

Check the executable in the same terminal that will start the tunnel. An old binary earlier in your command search path can undermine an otherwise successful update. If the flag is rejected, do not remove it just to get a working URL.

Use Cloudflare’s official download instructions for your operating system and architecture. Its documentation warns that Windows installations do not automatically update. Avoid repackaged binaries or installation commands from unverified sources.

Follow the update instructions appropriate to your installation method: package-manager installations should be updated through that manager. Updates can interrupt traffic, so finish an existing demo before updating rather than experimenting during someone’s session.

3. Start with one explicitly allowed visitor

First open your app locally and confirm that it is the intended demo. The following example assumes an HTTP app already running at http://localhost:8080. Substitute its actual address and an email address you have intentionally approved. alice@example.com is illustrative and will not deliver a usable invitation.

cloudflared tunnel --url http://localhost:8080 --allowed-mail alice@example.com

The Quick Tunnel documentation describes a generated trycloudflare.com address. The visitor authenticates using an emailed one-time PIN; no Cloudflare account is required. Without the restriction flag, anyone with the generated URL can reach the service.

For two specific visitors, the announcement documents repeated flags:

cloudflared tunnel --url http://localhost:8080 --allowed-mail alice@example.com --allowed-mail bob@example.com

A domain-wide rule such as --allowed-mail "*@example.com" is broader: it permits addresses across that domain rather than only your chosen colleague. Keep wildcard values quoted. CoreSecTech recommends starting with explicit addresses unless the wider audience is genuinely necessary.

4. Verify a one-reviewer demo before sharing

Illustrative example based on Cloudflare documentation. CoreSecTech did not run this tunnel or test the sign-in flow.

Suppose you have a disposable localhost demo with synthetic data and a read-only /preview page. Confirm that page opens locally. Start the Quick Tunnel using the single-address command above, substituting one approved mailbox you control. Confirm the launch command and check the connector output for email authentication and the intended rule count. Use a second mailbox you control for the denial check, and leave it off the allowlist.

Cloudflare describes two separate checks: its Access service verifies control of the email address, while your local connector decides whether that identity matches the allowed rules. Successfully receiving a PIN is therefore not, by itself, proof that the visitor should be admitted.

Browser checkExpected result
Fresh signed-out visitorOpen the generated URL’s /preview page directly. The demo content stays behind email sign-in.
Approved visitorSign in with the listed mailbox and complete the PIN flow. The intended preview opens.
Unlisted visitorAttempt sign-in with the unlisted mailbox in a separate fresh session. The preview stays inaccessible.
Tunnel shutdownStop cloudflared and reopen the old preview URL in a fresh session. The preview is no longer reachable through that URL.

Judge each result by whether the intended app content is served. If a signed-out or unlisted visitor can see the preview, stop the tunnel before sharing the link. Check any other routes the demo exposes, and record the command, connector version and observed access results without saving PINs or session tokens.

If a coding agent starts the tunnel, specify the email restriction in its instructions. Inspect the command it actually ran and verify the session’s permissions before sharing. See how to verify a coding agent’s sandbox boundary.

5. Diagnose the symptom without weakening the restriction

ObservationPossible explanationWhat to check next
The flag is not recognizedThe running binary may be too old or different from the updated one.Check its version and installation path. Update through the official method; do not drop the restriction.
A visitor sees the app immediatelyAn authenticated browser session may already exist, or the wrong URL/command may be in use.Repeat in a fresh session. Confirm the launch output and exact destination; stop sharing if unclear.
An invited visitor cannot enterThe approved address may not match the mailbox used for sign-in.Compare the intended address and command. Avoid widening to an entire domain as a shortcut.
Sign-in succeeds but the app failsAuthentication and application reachability are different checks.Verify the local app and correct port first, then review connector/app errors without exposing secrets.
A webhook or CLI cannot complete loginEmail authentication needs an interactive browser session.Use a deliberately designed machine-authentication approach instead of removing protection from sensitive data.
A streaming feature failsQuick Tunnels do not support Server-Sent Events.Check the transport the app actually uses. Choose suitable hosting rather than assuming an authentication failure.

Quick Tunnel email authentication requires an interactive browser session. An unattended webhook sender needs an authentication method it can actually use. Check the sender’s capabilities when choosing how to host and protect the endpoint.

6. Understand the limits of the protection

Quick Tunnels are temporary development tools, with no uptime guarantee, a limit of 200 in-flight requests and HTTP 429 responses above that limit. The hostname changes when a new tunnel is created. These constraints are not a capacity plan for a production application.

The email rule controls admission through this Quick Tunnel. Keep the application’s own permissions in place so an admitted visitor can only read or change what you intend. Review its database and third-party service access separately.

A separate route to the same app needs its own review. Existing port forwarding, another public tunnel or a public deployment does not become protected merely because this particular URL has an email gate. Inventory those paths rather than claiming that the whole application is now private.

Use a managed Cloudflare Tunnel when you need a stable hostname, ongoing access, or production hosting. A public hostname can be reachable by anyone until you protect it. For a restricted application, create the Cloudflare Access application and appropriate policies before publishing the tunnel route.

7. End the session and verify shutdown

The documented way to change allowed visitors is to stop the connector and create a new Quick Tunnel. Stopping its process ends access through that tunnel. For a foreground session you started in a terminal, use Ctrl+C, then confirm that the process has exited.

Check the old address again rather than assuming the terminal action succeeded. If you need to restart, use the revised restriction and repeat the access checks before sharing the new URL. Do not leave the earlier connector running alongside the replacement.

Stopping a tunnel does not undo information a visitor already saw, copied or downloaded. If you exposed real secrets, handle that as an exposure incident; restricting a later session is not a remedy for previously disclosed credentials. If the exposed material was a GitHub-tracked API key, follow our revoke-first API-key response guide and confirm containment with its issuer rather than relying on tunnel shutdown.

Pre-sharing checklist

  • The demo contains synthetic data and no unnecessary sensitive routes.
  • The running connector supports the feature and was obtained from an official source.
  • The command identifies the right local app and explicit approved addresses.
  • A fresh session requires authentication; allowed and non-allowed visitor checks behave as intended.
  • The application’s own permissions and any alternative exposure paths have been reviewed.
  • The demo does not depend on unsupported transports or unattended clients.
  • A person is responsible for stopping the connector and verifying shutdown.