I’m happily serving a few websites and services publicly. Now I would like to host my Navidrome server, but keep the contents private on the web to stay out of trouble. I’m afraid that when I install a reverse proxy, it’ll take my other stuff online offline and causes me various headaches that I’m not really in the headspace for at the moment. Is there a safe way to go about doing this selectively?
A reverse proxy is basically a landing place that acts as a middle man between the client and the server. Most people set it up so that all traffic on 80 or 443 go to the reverse proxy, and then the reverse proxy gets the correct website based on the host header of the request.
If you are currently serving multiple websites on your server, then that means you are serving each website on a different port.
So, just make sure that the reverse proxy is serving on a port that is not used by your other sites. It will only respond on it’s own port, and it will only serve the site(s) that you have configured in the proxy.
You’ll be fine!
Thanks, that’s a great explanation. I’m looking forward to being able to SSH in without port forwarding.
I agree that you would want a VPN for that. Look into something like tailscale.
First of all, doesn’t Navidrome have authentication? So, I don’t see why exposing it to the public is a problem.
Second, some reverse proxies support basic auth. This way, you can password-protect some services and is useful if the service does not have its own authentication. Here as an example snippet for Caddy:
example.com { basic_auth { # Username "Bob", password "hiccup" Bob $2a$14$Zkx19XLiW6VYouLHR5NmfOFU0z2GTNmpkT/5qqR7hx4IjWJPDhjvG } reverse_proxy myservice:8000 }
You’ll have to look up the docs for other reverse proxies.
Thanks. You’re right about Navidrome supporting authentication. I’m using HTTP instead of HTTPS, though. I was advised to use a reverse proxy to avoid potential legal issues.
What’s your reason for using HTTP? That seems like a really bad idea this day in age, ESPECIALLY if that’s something you’re going to make available on the internet.
They’re lightweight sites that exist to be accessed by vintage computers which aren’t powerful enough to run SSL.
Gotcha… as long as you understand that any device that receives that traffic can see exactly what’s in it! (no sarcasm intended at all… if you’re informed of the risk and OK with it, then all is well!)
I just don’t put the ports on the proxy config.
So those ports that I don’t put in the config remain publicly accessible? That would be perfect.
The ports you don’t put in are not publicly routed.
I use NPM and only have 3 services routed outside my network.