Workers - Share local dev servers through Cloudflare Tunnel in Wrangler and Vite
Key Points
- Press t in Wrangler to open a tunnel
- Press t + Enter in the Vite plugin
- Supports quick random or named tunnels with Access
Summary
You can now expose local development servers through Cloudflare Tunnel directly from Wrangler or the Cloudflare Vite plugin to get a public URL for sharing previews, testing webhooks, or accessing your app from other devices.
Key Points
- Start a tunnel while your dev server is running: press
tin Wrangler, ortthenEnterwhen using the Cloudflare Vite plugin. - Two tunnel modes:
- Quick tunnel: temporary random hostname under
*.trycloudflare.comfor ad-hoc sharing. - Named tunnel: stable hostname and option to restrict access with Cloudflare Access (recommended for persistent previews).
- Quick tunnel: temporary random hostname under
- Common use cases: previewing work with stakeholders, receiving external webhooks during local development, or testing from remote devices.
- Practical notes for engineers:
- Tunnels are initiated interactively from the running dev tooling; ensure your dev server is already listening on the expected port.
- Use a named tunnel for predictable URLs and access controls; see the “Share a local dev server” docs for named tunnel setup and auth configuration.
- Quick tunnels are convenient for short-lived demos but are not suitable for long-term or controlled access.
Next steps
- For a stable setup and Access integration, follow the named tunnel setup in the Cloudflare docs.
- Try the new flow during local development to validate webhook flows or collect stakeholder feedback quickly.