Automatic .localhost DNS names for every HTTP service
nameport is a daemon that watches your machine for HTTP services, gives them human-friendly names, and reverse-proxies them through .localhost domains. No config files, no /etc/hosts, no DNS server.
Scans for listening TCP ports every 2 seconds and verifies they speak HTTP.
17 built-in heuristics extract names from project directories, app bundles, and script paths.
Routes traffic through port 80 and 443 with .localhost domains. No DNS needed.
Real-time health status, inline rename, keep, and blacklist controls.
Full management: list, rename, keep, add, remove, blacklist, rules, notify.
Two-tier certificate authority with domain policy enforcement for local HTTPS.
Auto-detects containers with exposed ports and names them.
Desktop alerts for service discovery, offline, and rename events.
nameport runs a daemon that binds to ports 80 and 443. It continuously scans for listening TCP ports on your machine, probes each one to verify it speaks HTTP, then generates a human-readable .localhost domain using heuristics based on the process name, working directory, or app bundle.
Every discovered service gets a reverse proxy entry. Open http://myapp.localhost in your browser and traffic is forwarded to the right port. Collisions are handled automatically: myapp.localhost, myapp-1.localhost, myapp-2.localhost.
The .localhost TLD is reserved by IANA (RFC 6761) and resolves to 127.0.0.1 in all modern browsers without any DNS configuration.
nameport is the spiritual successor to dns-to-port by Florian Margaine, who saw the problem first and built the original solution. nameport shares dns-to-port's MIT license and community values while adding automatic discovery, zero configuration, and a web dashboard.
.localhost, .test, .internal; full IANA public TLD blocklist), but the potential for man-in-the-middle attacks remains if the CA key is compromised.make yourself. Read the code if you can.Requires Go 1.21+ and root access for port 80.
git clone https://github.com/OriPekelman/nameport.git
cd nameport
make
sudo ./nameport-daemon
Start any local HTTP server and it appears automatically:
cd ~/projects/myapp && python3 -m http.server 3000
# opens at http://myapp.localhost