plain tunnels break modern Laravel
ngrok and friends forward one port. A modern Laravel dev setup is three servers whose URLs are baked in at boot — so the page loads, and everything else silently dies:
HMR pins to localhost:5173
Vite bakes its HMR host when the dev server starts. Through a tunnel, the websocket dials your visitor's own machine — hot reload is dead and the console fills with connection errors.
Echo pins to localhost:8080
Laravel Echo reads the Reverb host from import.meta.env,
frozen at boot. On any other device, websockets never connect —
no broadcasts, no presence, no realtime.
APP_URL disagrees with reality
Signed URLs 403, redirects bounce to localhost, asset origins break. Laravel generates URLs for the host it thinks it has — not the tunnel your phone is visiting.
✔ localhoist fixes all three in-flight, as the responses stream through the tunnel.
how it works
A single Go binary. No agents, no dashboard, no YAML.
-
detects your project
Reads
.envand finds your app, Vite, and Reverb — Sail, Herd, or Valet. No flags needed. -
starts a smart mux
One public hostname, routed to all three local servers with websocket upgrades. HMR sockets are recognized by their
vite-hmrsubprotocol on any path. -
opens the tunnel
Drives the ngrok you already have, prints the public URL — and a QR code, so it's on your phone in seconds.
-
rewrites in-flight
The baked HMR host in
/@vite/client, Echo's Reverb config, and@vitescript-tag origins are fixed as they pass through. Stockvite.config.js, no dev-server restart.
With the composer package installed, a trusted-proxy
middleware derives every URL from the tunnel's forwarded headers —
your .env is never touched at all.
install
Then cd into any Laravel app and run
localhoist — or php artisan share.
$ brew install xPapay/tap/localhoist
$ composer require --dev localhoist/laravel
$ php artisan share
$ go install github.com/xPapay/localhoist/cmd/localhoist@latest
Transport is your own ngrok today — free, and your traffic stays between your machine and theirs. A hosted relay with stable subdomains is on the roadmap.