$ localhoist

artisan share that actually works.

One command puts your local Laravel app online — Vite HMR, Reverb websockets, and signed URLs all working through a single tunnel. Open it on your phone, send it to a client, test a webhook.

✔ zero config✔ zero restarts✔ zero .env mutation

$ brew install xPapay/tap/localhoist
Terminal recording: running the localhoist command in a Laravel project prints the route table, a public https URL, and a QR code to open the app on a phone

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.

  1. detects your project

    Reads .env and finds your app, Vite, and Reverb — Sail, Herd, or Valet. No flags needed.

  2. starts a smart mux

    One public hostname, routed to all three local servers with websocket upgrades. HMR sockets are recognized by their vite-hmr subprotocol on any path.

  3. 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.

  4. rewrites in-flight

    The baked HMR host in /@vite/client, Echo's Reverb config, and @vite script-tag origins are fixed as they pass through. Stock vite.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.

macOS — Homebrew
$ brew install xPapay/tap/localhoist
Laravel — Composer
$ composer require --dev localhoist/laravel
$ php artisan share
anywhere — Go
$ 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.

Laravel 11–13Vite 5–8ReverbSail · Herd · ValetmacOS · Linux