Quick Tunnels


目录

import { Steps } from "~/components";

Quick Tunnels create a temporary trycloudflare.com URL for a local service. You do not need a Cloudflare account or domain.

:::note Quick Tunnels are for testing and development. For production, create a Cloudflare Tunnel. :::

Prerequisites

Create a Quick Tunnel

  1. In a terminal, start a Quick Tunnel:

    cloudflared tunnel --url http://localhost:8080
    
  2. Open the trycloudflare.com URL printed by cloudflared.

Anyone with the URL can access your local service. The URL stops working when you stop the cloudflared process.

Restrict access by email

Use --allowed-mail to require email authentication. Visitors receive a one-time PIN before they can access your service.

  1. Start a Quick Tunnel with an allowed email address:

    cloudflared tunnel --url http://localhost:8080 --allowed-mail alice@example.com
    
  2. Share the generated URL with the allowed visitor.

  3. The visitor opens the URL and enters their email address.

  4. The visitor enters the one-time PIN sent to their email.

The visitor does not need a Cloudflare account.

Repeat the flag

Repeat --allowed-mail to allow multiple email addresses:

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

Use a comma-separated list

Separate multiple email addresses with commas:

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

Allow an email domain

Use *@example.com to allow every address from a domain. Enclose wildcard values in quotes to prevent shell expansion:

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

To change who can access the service, stop cloudflared and start a new Quick Tunnel. Access ends for everyone when the process stops.

Limitations

For stable hostnames and production traffic, create a Cloudflare Tunnel.


版本号 #2
由 壳壳虫 创建于 2026-11-01 04:56:55 UTC
由 壳壳虫 更新于 2026-11-01 04:56:57 UTC