Self-hosted HTTP tunnels with only SSH and nginx
Self-hosted HTTP tunnels with SSH and Nginx

Vincent Bernat shows how to expose a local web service through a self-hosted tunnel using only OpenSSH and nginx. A remote port forward with ssh -R 0:localhost:8080 gets an ephemeral port, and nginx proxies a wildcard subdomain to it. Access is protected by a secure link hash in the URL, with a helper script that finds the allocated port and prints a shareable URL.
With this solution, I only rely on OpenSSH and nginx, two pieces of software already running on this server. One short command gives me a self-hosted tunnel and a URL to share.