Skip to Content
Teitunnel

Getting started

Share a local service

Get a free public HTTPS URL for anything running on your computer with Cloudflare Tunnel, in one click and without a Cloudflare account.

A Quick Share gives a service on your computer, such as a dev server on localhost:3000, a public HTTPS address like https://quiet-river-lamp-orbit.trycloudflare.com. Anyone with the link can open it until you stop sharing. It needs no Cloudflare account, no domain, no port forwarding and no configuration.

Use it to show work in progress to a colleague or client, open your site on a phone, or point a webhook at your laptop for a few minutes. Use something else when the address has to stay the same or stay up: a share on your own domain keeps its name, a route runs for as long as you like, and a Snapshot stays online when your computer is off. See choose how to share for all of them side by side.

Share in the app

Open Quick Share

Choose Quick Share in the sidebar (⌘3 on macOS, Ctrl+3 on Windows and Linux) or New Quick Share (⌘⇧N, Ctrl+Shift+N). From the menu bar or tray icon, Share a Local Port… opens the same thing.

Pick what to share

Click Port or address: Teitunnel lists what's Running on this Mac (this PC on Windows): dev servers such as Vite, Next.js, Astro, Django, Rails and Laravel, and Docker containers, with their project names. Pick one, or type a port or an address such as 3000, localhost:5173 or https://localhost:8443.

Choose when it stops

Keep running (until you stop it or quit Teitunnel), Stop after 15 min, Stop after 1 hour or Stop after 8 hours.

Share

Choose Share. Teitunnel first runs the exposure check, which looks for a .env file, a .git folder or debug pages the service would hand out. If it finds one, choose Share Anyway or Cancel. The card then shows Getting a URL…, and Live with the address a few seconds later.

Quick Share: a live share with its trycloudflare.com URL, request count and log

Each share's card has:

  • the address, with the copy button and Open in browser,
  • Show QR code, to open it on a phone,
  • request and error counts, Stops in … when it has a time limit, and the connector's Log,
  • Pause (when Inspect requests is on, the default), which keeps the address but shows visitors a paused page until you Resume,
  • Publish a Snapshot, which turns the shared site into a static copy that stays online,
  • Stop Sharing.

Quitting Teitunnel stops every Quick Share, and Cloudflare forgets the address. Sharing again gives a new one.

From the terminal

teitunnel share 3000                  # a random trycloudflare.com URL
teitunnel share 3000 --for 30m        # stops by itself after 30 minutes
teitunnel share ./dist                # a folder of files, no server needed
teitunnel share 3000 --json           # {"url": …, "hostname": …} for scripts
$ teitunnel share 3000 --here
https://quiet-river-lamp-orbit.trycloudflare.com

█▀▀▀▀▀█ ▄▀▄ ▀▄█ █▀▀▀▀▀█
…
http://localhost:3000 is public at https://quiet-river-lamp-orbit.trycloudflare.com for anyone with the link. Press Ctrl-C to stop.

Where the share runs depends on whether the app is open:

  • The app is running: the command hands the share to the app (the app may ask you to allow it the first time) and returns. The share keeps running in the app: It runs in the Teitunnel app: stop it there or with teitunnel shares --stop <url>.
  • The app isn't running, or you pass --here: the share runs in the terminal until you press Ctrl-C or its --for time is up.

share needs no Cloudflare account, only cloudflared (the app's copy, or one on your system). Every option is in Sharing and the command reference.

On your own domain

With a Cloudflare account connected (see your first route), the Address menu next to the service also offers your domains. Choose On yourhost.com, type a Subdomain such as demo (Teitunnel suggests names from the project), and Share. You get https://demo.yourhost.com, the same address every time you share under that name.

Quick Share with the Address menu set to a domain, the subdomain demo typed in, suggested names from the project and the Host header option under Advanced

It's a temporary route on this computer's tunnel, planned and applied like any other change, and removed with its DNS record when you stop it, when its time is up, or when you quit Teitunnel (if Teitunnel crashes, it's removed the next time it starts). It never takes over a hostname that has a DNS record Teitunnel didn't create. While it runs, it shows in Routes with a Temporary badge.

teitunnel share 3000 --on demo.yourhost.com
teitunnel share 3000 --on demo.yourhost.com --allow ana@yourhost.com   # behind a login

A share on your domain always runs in the terminal that started it, until Ctrl-C.

Random addressOn your domain
NeedsNothingA Cloudflare account and a domain on it (free plan is fine)
AddressNew every timeThe one you choose, every time
Cloudflare's limitsQuick Tunnel limits (below)Your plan's, like any route
Logins, schedulesNoYes: require a login, schedules

Limits

Random trycloudflare.com addresses are Cloudflare's free Quick Tunnels, meant for testing and demos. Cloudflare doesn't guarantee their uptime, they carry at most 200 requests in flight at once, and they don't carry server-sent events. For anything lasting, or for event streams, share on your own domain. See limits and Cloudflare's Quick Tunnels documentation.

Anyone who has the link can open the service while it's shared. To limit who, share on your domain with a login, or put a password page or a secret link in front of it from the shield on the share's card (protect a Quick Share).

If it doesn't work

  • "Cloudflare didn't provide a URL in time. Check your internet connection and try again." Quick Tunnels are sometimes busy. Try again, or share on your own domain.
  • The page says "Blocked request" or "Invalid Host header". Vite, webpack, Angular, Django and Rails refuse hostnames they don't know. Teitunnel sends dev servers their own address by default; if yours still refuses, see share a dev server.
  • 502 Bad Gateway, or nothing loads. Check the service answers at http://localhost:<port> on your own machine, and that the port is right. See troubleshooting.
  • "This Quick Share hit its limit of 200 requests at once. Share on your own domain for more." Quick Tunnels have that cap; a share on your domain doesn't.

Next

Edit on GitHub

Last updated on

On this page