Share apps from your Mac on your own web address

A step-by-step guide to Teitunnel and Cloudflare, from a fresh install to addresses like catalogue.yourname.dev. Tick each step as you go. Your progress stays in this browser.

0 of 9 steps done

How a visit reaches your Mac

Gather what you need

You need a Mac, Homebrew to install things from the Terminal, and a free Cloudflare account. Your own domain is optional. Without one you still get a random address.

Install Teitunnel

Teitunnel is the app that builds and runs the tunnel. Homebrew downloads it and puts it in an Applications folder.

Are you an administrator on this Mac (can you use sudo)?

brew install --cask --appdir=~/Applications teispace/tap/teitunnel

Without admin rights, Homebrew can't write to the main /Applications folder. That's what the error "is not in the sudoers file" means. This puts the app in your own ~/Applications instead.

To make every future install and upgrade go there too, run this once:

echo 'export HOMEBREW_CASK_OPTS="--appdir=~/Applications"' >> ~/.zprofile

Open Teitunnel. It's signed and notarised, so macOS lets it run, and it downloads and checks cloudflared, Cloudflare's tunnel program, for you.

Try a quick share

Before any setup, check it works. Teitunnel can give any app on your Mac a temporary public address.

  1. Start something on a port, such as a dev server on 3000.
  2. In Teitunnel, open Quick Share in the sidebar.
  3. Type the port, keep Random address, and choose Share.

You get an address ending in trycloudflare.com that anyone with the link can open. It changes every time, which is why the next steps set up your own domain.

Move your domain's DNS to Cloudflare

DNS is the internet's address book. A domain's nameservers decide which company keeps its page in that book. For your own addresses to reach a tunnel, Cloudflare has to keep it.

You don't transfer the domain

The company you bought it from stays the same, and so do renewal and billing. You change one setting there: the nameservers. What moves to Cloudflare is the list of DNS records.

Why the free plan means moving all of it

SetupWhat it meansPlan
FullCloudflare keeps the whole address bookFree and up
Partial (CNAME)Keep your current DNS host, point chosen names at CloudflareBusiness, Enterprise
SubdomainHand just one subdomain to CloudflareEnterprise

Do it

  1. In Cloudflare, use Add a domain, type your domain, choose Connect, then the Free plan. Leave DNS import on Automatic.
  2. Check the records it found. Keep anything still in use, especially MX records for email. Delete leftovers from old tools, such as a * record pointing at a Pinggy tunnel. If nothing on the domain is live, delete them all.
  3. Choose Continue to activation. Cloudflare shows two nameservers, for example mariah.ns.cloudflare.com and phil.ns.cloudflare.com. Use the two it gives you.
  4. At your registrar, turn DNSSEC off if it's on. With it on, the domain won't work through Cloudflare.
  5. Replace the registrar's nameservers (on Hover, ns1.hover.com and ns2.hover.com) with Cloudflare's two, and save.
  6. Wait for Cloudflare to mark the domain Active. It's usually within an hour and can take up to 24. Cloudflare emails you.
DNSSEC isn't transfer lockTransfer lock stops anyone moving your domain to another registrar. Leave it on. DNSSEC signs DNS answers and shows up as "DNSSEC" or "DS records". If your registrar shows neither, it's off.
Skip Cloudflare's "Create Tunnel" buttonTeitunnel creates its own tunnel and adds and removes DNS records for each share. You don't set anything up under Tunnels in the Cloudflare dashboard.

Connect Teitunnel to Cloudflare

Teitunnel needs a key, called an API token, that lets it build tunnels and write address-book entries for your domain, and nothing more.

  1. In Teitunnel, connect your Cloudflare account. In the connect sheet, Open Cloudflare opens the token page with the core permissions already ticked.
  2. Under the token's resources, include your account and your domain. A token with no resources can't reach anything.
  3. Create the token, copy it, and paste it into Teitunnel.
PermissionLevelLets Teitunnel
Cloudflare Tunnel · EditAccountCreate and run tunnels
DNS · EditZoneAdd and remove a record for each share
Zone · ReadZoneSee your domains
Account Settings · ReadAccountRead the account it's working in

If a permission is missing, Teitunnel shows a card titled "The token needs one more permission", for example in Doctor or under Settings ▸ Accounts. Edit adds it to your token in Cloudflare. Use a New Token Instead replaces the token.

Check: run Doctor in Teitunnel. "No problems found" means you're ready.

Share on your own address

Pick a name, such as catalogue, and Teitunnel makes catalogue.yourname.dev lead to your app.

An app on a port

  1. Open Quick Share in the sidebar.
  2. Type the port, or pick it under Running on this Mac.
  3. Under Address, choose On yourname.dev and type a subdomain.
  4. Choose Share. It answers within a few seconds.

A folder of web pages

Static HTML needs no server. Choose Share a Folder… in Quick Share, or drop the folder on its window, then set the address the same way.

The whole folder goes publicZip files, screenshots and test folders included. Teitunnel never shares hidden files, .env files, keys, .git or node_modules, but anyone who guesses a path can open everything else. Share a folder holding only what you mean to show, or add a login with --allow (step 8).

Pause, stop and run several at once

Each share is its own address, so you can run several side by side and switch each one off without touching the others.

ActionWhat happens
PauseKeeps the address and its DNS record. Visitors see a "paused" page.
Stop SharingRemoves the route and DNS record. Share again to bring it back.
Quit TeitunnelEvery share stops.
Menu bar iconShare a running service in one click, pause or stop shares.
Known issue in version 0.6.1Resuming a paused port share can leave Cloudflare's "502 Bad gateway" page showing. The route ends up pointing at a local port nothing is listening on. Stop Sharing and share again fixes it.

Share from Terminal optional

Handy for scripts. The address exists while the command runs and disappears when it ends.

If the Teitunnel app isn't open, the command runs the tunnel itself. For a one-word shortcut, add this to ~/.zshrc, then type share 3333 catalogue:

Let Claude run it optional

Teitunnel includes an MCP server, a plug that lets Claude list, start and check your shares.

teitunnel mcp install claude-desktop

Then quit the Claude app fully with ⌘Q, not just its window, and reopen it. For Claude Code, use claude-code instead of claude-desktop.

ModeWhat Claude can do
ask (default)Make changes only after you approve each one in a Teitunnel dialog
read-onlyLook at tunnels, shares and traffic, change nothing
fullMake changes without asking

To choose a mode, add it to the install command, such as --mode read-only.

When something goes wrong

"is not in the sudoers file" when installing

You're not an admin. Install into ~/Applications with the command in step 2.

The connector isn't connected, or error 1033

Nothing is carrying traffic to your Mac. Open the Teitunnel app, which runs the connector. Shares only work while it's open.

502 Bad gateway

Cloudflare reached your Mac but not your app. Check the app is running on that port. If you've just resumed a paused share, use Stop Sharing and share again (see step 7).

Doctor says the token can't manage routes

The token is missing a permission. Add the four in step 5, then choose Check Again.

The domain stays Pending in Cloudflare

Check the nameservers at your registrar match Cloudflare's two exactly and that DNSSEC is off. Allow up to 24 hours.

"cloudflared is running a tunnel outside Teitunnel"

It's probably left over from an old install. Stop it from Teitunnel's Tunnels page. If it comes back after a restart, run brew services list, and if cloudflared is listed, brew services stop cloudflared. Neither needs admin.

Claude can't see Teitunnel's tools

Check it's in the desktop app's config with grep teitunnel ~/Library/Application\ Support/Claude/claude_desktop_config.json. Quit Claude fully and reopen it. Startup errors appear in ~/Library/Logs/Claude/mcp*.log.