Run it anywhere.
Open it here.
Nearhost is a terminal app that opens a project running on one of your other machines at a local https://myapp.test, over the SSH config you already have. You install nothing on the server, and your usual dev tooling works as it does locally, hot reload included.
curl -fsSL https://nearhost.dev/install.sh | shOpen source under MIT, for macOS and Linux. Also brew install nearhost/tap/nearhost or npx @nearhost/cli.
Set up in three steps without touching the server.
If ssh mini works in your terminal, Nearhost works. It reuses your SSH config, including ProxyJump, agents and keychain identities, and writes nothing to the remote machine.
Add a server
Pick a host alias from ~/.ssh/config or type user@host. Nearhost checks that it connects without a prompt and shows OpenSSH's own output if it doesn't.
Add a project
Point at a path. Nearhost reads .env, Compose and Vite config over SFTP and proposes the ports: which one is the web app, which ones need a loopback forward, which to ignore.
Open it
Press o. Nearhost adds a hosts entry, issues a certificate from its local CA and routes https://myapp.test through the SSH tunnel. WebSockets and Vite HMR pass through the same tunnel.
What the tunnel handles for you.
Real HTTPS, trusted once
Nearhost creates a local CA on first run and adds it to your keychain with one prompt. Each alias gets its own certificate, and the binary ships no shared wildcard key.
HMR and WebSockets pass through
Nearhost forwards Vite's port to the same number on your laptop, so public/hot resolves and hot reload works with the remote config untouched.
Port discovery
Nearhost reads .env, Compose files and vite.config, and knows the Laravel Sail port variables. It flags port clashes and a missing allowedHosts before you start the project.
Runs on your SSH config
Nearhost shells out to OpenSSH, so Include, Match, ProxyJump, agent forwarding and keychain identities apply. It stores nothing but the host name.
Local projects too
The local server needs no setup. Projects on your laptop get the same alias and certificate, so one tool covers the laptop and the servers.
Headless when you want it
nearhost up starts projects without the UI. nearhost doctor checks ports, trust, hosts and each server. Config is one YAML file you can edit by hand.
Your traffic stays between your machines.
Nearhost has no relay, no account and no public hostname. Your .test names resolve from a marked block in /etc/hosts that Nearhost owns, and requests travel over your own SSH connection to the server.
- →Runs in the foreground. Quit it and the tunnels close.
- →One sudo prompt per hosts change, and it tells you why first.
- →
nearhost untrustandhosts cleanundo the keychain and hosts changes.
# /etc/hosts 127.0.0.1 localhost ::1 localhost … # nearhost:start 127.0.0.1 myapp.test 127.0.0.1 website.test 127.0.0.1 otherapp.test # nearhost:end
Install Nearhost.
One static binary for macOS and Linux, Apple silicon and Intel. The first run installs the local CA and lands you on Home.
curl -fsSL https://nearhost.dev/install.sh | shbrew install nearhost/tap/nearhostnpx @nearhost/cliLinux needs permission to bind ports 80 and 443. The installer offers to set cap_net_bind_service, and nearhost doctor will tell you if it's missing.