Nearhost
Open a dev server running on another machine at a local https://myapp.test, over the SSH you already have.
Nearhost is a terminal app that opens a dev server running on one of your other machines at a local address like https://myapp.test. It works over the SSH config you already have, you install nothing on the server, and cookies, OAuth redirects, WebSockets and hot reload behave as they do on localhost.
The problem
You write code on a laptop and run it somewhere else: a desktop under the desk, a home server, a VPS. The app listens on localhost over there, and your browser is over here.
Bridging that gap usually means an ssh -L per port, retyped after every reboot. You get a certificate warning, or plain HTTP that breaks secure cookies and service workers. The hot reload socket fails to connect because Vite told the browser to find it on a port your laptop doesn't have. OAuth callbacks point at whatever port you happened to forward today.
You can fix each of these in a few minutes, and then you fix them again the next morning, for each project, on each machine.
What Nearhost does differently
Each project gets a name and a stable .test address, so bookmarks, cookies and OAuth callbacks keep working. Nearhost creates its own local certificate authority on first run and signs a certificate for each address, so you get real HTTPS your browser trusts. It reads the port variables in a project's .env, Compose file and Vite config and proposes the routes itself. You pick which one is the web app, and Nearhost serves it at the project's address.
Add a project once and it's at https://myapp.test today, tomorrow and after a reboot. The same tool serves projects on your laptop too, so one address scheme covers every machine you use.
Requests travel over your own SSH connection, with no relay, account or public URL in between, and the only thing Nearhost creates on a server is a socket a coding agent there can use to add its project.
How it's built
Nearhost is a single Go binary. It embeds Caddy as the HTTPS proxy and local CA, routing each address to a forwarded port. I built the full-screen interface with Bubble Tea. Nearhost owns one marked block in /etc/hosts, and asks for your password when that block changes or when you trust its local CA.
For the connection itself, Nearhost runs your own ssh rather than an SSH library. One OpenSSH control master per server carries every forward and file read, so your ~/.ssh/config, agents, jump hosts and hardware keys all apply unchanged. If ssh <host> works, Nearhost works.
I wrote about that decision, and the parts of it that bite, in The best SSH library is ssh.
Why I built it
I write code on a laptop and run most of it on a Mac mini. I tried assembling this from existing tools: hand-written ssh -L lines, a reverse proxy, mkcert, a hosts file I edited by hand. Each piece did its job, and the combination kept breaking across reboots and new projects.
Nearhost is MIT licensed and free. Install it with Homebrew, npm or the shell script:
brew install nearhost/tap/nearhost