Earlier this year, I moved into a new place with internet that doesn’t give me port forwarding ability. That broke my ability to run a local web server on standard ports… oh well! It’s a good time to set up a reverse-proxy.
I rented a VPS from a local provider for around $5 a month and installed caddy, which handles the internet-facing connection handling. Then, I installed Tailscale on that VPS and my web server at home. Tailscale is a fast, zero-configuration VPN that punches through NAT / a firewall automatically. So the VPS and my web server can talk to each other, even if they move IP addresses. Pointed the DNS entry to the new VPS, and now you can access a copyparty server running on Vakt from the web.
This setup has proved durable through dynamic DNS swaps and outages at home. Now, even if I have to move again, getting the server back online will be as simple as connecting it to the internet. Even swapping Vakt onto a mobile hotspot automatically makes the server available on the web again within >10 seconds. Nice.
(Does this degrade the performance of the web server? By locating the VPS in my city, the added latency is minimal. However, the most affordable VPS in my city is only capable of moving ~150Mbps over a Tailscale VPN. This is just fine for streaming 320kbps MP3 files, and it naturally makes the VPS soak bandwidth saturation attacks.)
Without login credentials necessary, I’m happy to share my modest music collection with you at cp.bnjmn.id. Send me new tracks you think I’ll like to @bnjmn@blog.bnjmn.id on the Fediverse.
