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?

  • qjkxbmwvz@startrek.website
    link
    fedilink
    English
    arrow-up
    2
    ·
    7 hours ago

    My method:

    VPS with reverse proxy to my public facing services. This holds SSL certs, and communicates with home network through WireGuard link configured on my router.

    Local computer with reverse proxy for all services. This also has SSL certs, and handles the same services as the VPS, so I can have local/LAN speeds. Additionally, it serves as a reverse proxy for all my private services, such as my router/switches/access point config pages, Jellyfin, etc.

    No complaints, it mostly just works. I also have my router override DNS entries for my FQDN to resolve locally, so I use the same URL for accessing public services on my LAN.

  • tko@tkohhh.social
    link
    fedilink
    English
    arrow-up
    2
    ·
    12 hours ago

    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!

  • AbouBenAdhem@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    14 hours ago

    A typical use case is to forward a single port to the proxy, then set the proxy to map different subdomains to different machines/ports on your internal network. Anything not explicitly mapped by the reverse proxy isn’t visible externally.

  • Foster Hangdaan@lemmy.fosterhangdaan.com
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    14 hours ago

    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.

    • FarraigePlaisteach@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      12 hours ago

      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.

      • Max@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        4 hours ago

        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

      • tko@tkohhh.social
        link
        fedilink
        English
        arrow-up
        5
        ·
        10 hours ago

        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.

          • tko@tkohhh.social
            link
            fedilink
            English
            arrow-up
            2
            ·
            8 hours ago

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