Skip to content

Public tunnels

A Cloudflare quick tunnel gives a local site a public HTTPS URL — for a client review, a webhook that needs to reach you, or testing on a real phone.

Terminal window
rex tunnel start myshop.rex # prints the public URL
rex tunnel list
rex tunnel stop myshop.rex

cloudflared makes an outbound connection to Cloudflare and receives requests over it. Nothing listens on your machine, no port is opened, and no router configuration is involved — which is also why it works behind NAT and on a café network.

WordPress writes its own URL into the database and into generated markup, so a site reached at a tunnel URL would otherwise serve links pointing back at https://myshop.rex — which resolves to nothing on your client’s machine.

rexenv rewrites for the tunnel while it is up, so shared links work.

The site, as it is, to anyone with the URL. Quick tunnel URLs are unguessable but not secret — they are not access control.

Do not tunnel a site holding real customer data, real credentials, or an unprotected admin account with a weak password. Local sites are usually configured far more loosely than production, and a tunnel makes that configuration reachable.

The tunnel needs the site to be serving locally first. rex status for the stack, rex doctor if something looks wrong. A failed tunnel names its reason rather than reporting a generic error.