this post was submitted on 02 Oct 2024
31 points (91.9% liked)

Selfhosted

39446 readers
438 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

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?

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 1 day ago* (last edited 1 day ago) (2 children)

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.

[–] [email protected] 5 points 1 day ago (1 children)

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.

[–] [email protected] 2 points 1 day ago (1 children)

They’re lightweight sites that exist to be accessed by vintage computers which aren’t powerful enough to run SSL.

[–] [email protected] 3 points 1 day ago (1 children)

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!)

[–] [email protected] 2 points 15 hours ago

I have a general idea. I appreciate the info :). I’ve made a point of having nothing sensitive in the contents or the requests (I don’t have any forms, for example. It’s all static pages).

[–] [email protected] 2 points 1 day ago* (last edited 1 day ago) (1 children)

How will a reverse proxy help?

Things that a reverse proxy is often used for:

  • making multiple services hosted on the same IP and port
  • SSL termination so that the wider world speaks https and the proxy speaks http to the server. This means the server doesn't have to do its own key management
  • load balancing services so multiple servers can serve the same request (technically a load balancer but I believe some reverse proxies do basic load balancing)
  • adding authentication in front of services that don't have their own (note that some of the protections/utility is lost if you use http. Anyone who can see your traffic will also be able to authenticate. It's not zero protection though because random internet users probably can't see your traffic)
  • probably something I'm forgetting

Do any of these match what you're trying to accomplish? What do you hope to gain by adding a reverse proxy (or maybe some other software better suited to your need)?

Edit: you say you want to keep this service 'private from the web'. What does that mean? Are you trying to have it so only clients you control can access your service? You say that you already have some services hosted publicly using port forwarding. What do you want to be different about this service? Assuming that you do need it to be secured/limited to a few known clients, you also say that these clients are too weak to run SSL. If that's the case, then you have two conflicting requirements. You can't simultaneously have a service that is secure (which generally means cryptographically) and also available to clients which cannot handle cryptography.

Apologies if I've misunderstood your situation

[–] [email protected] 1 points 15 hours ago (1 children)

Thank you for the very informative reply.

The HTTP and Gemini services are for vintage clients, but I would like the reverse proxy to keep my media collection private (and maybe SSH and SMB too). So I’m serving to modern clients in the case of reverse proxy. I was told that port forwarding is no longer considered secure enough and that if my media gets publicly exposed I could be liable for damages to license holders.

[–] [email protected] 2 points 6 hours ago* (last edited 6 hours ago) (1 children)

Reverse proxies don't keep anything private. That's not what they are for. And if you do use them, you still have to do port forwarding (assuming the proxy is behind your router).

For most home hosting, a reverse proxy doesn't offer any security improvement over just port forwarding directly to the server, assuming the server provides the access controls you want.

If you're looking to access your services securely (in the sense that only you will even know they exist), then what you want is a VPN (for vpns, you also often have to port forward, though sometimes the forwarding/router firewall hole punching is setup automatically). If the service already provides authentication and you want to be able to easily share it with friends/family etc then a VPN is the wrong tool too (but in this case setting up HTTPS is a must, probably through something like letsencrypt)

Now, there's a problem because companies have completely corrupted the normal meaning of a VPN with things like nordvpn that are actually more like proxies and less like VPNs. A self hosted VPN will allow you to connect to your hone network and all the services on it without having to expose those services to the internet.

In a way, VPNs often function in practice like reverse proxies. They both control traffic from the outside before it gets to things inside. But deeper than this they are quite different. A reverse proxy controls access to particular services. Usually http based and pretty much always TCP/IP or UDP/IP based. A VPN controls access to a network (hence the name virtual private network). When setup, it shows up on your clients like any other Ethernet cable or WiFi network you would plug in. You can then access other computers that are on the VPN, or given access to to the VPN though the VPN server.

The VPN softwares usually recommended for this kind of setup are wireguard/openvpn or tailscale/zerotier. The first two are more traditional VPN servers, while the second two are more distributed/"serverless" VPN tools.

I'm sorry if this is a lot of information/terminology. Feel free to ask more questions.

[–] [email protected] 1 points 2 hours ago

That is such a clear explanation and makes a lot of sense, thank you again.

Since the services I’m interested in serving are authenticated then it sounds like HTTPS is what I need (which is what originally made the most sense to me). That’s a relief. I just need to figure out how to have separate HTTP and HTTPS services hosted from the one ARM service.