Assuming the user will not be connecting over vpn, but is both remote and non-technical, how would you expose Jellyfin to them securely?

  • Jul (they/she)@piefed.blahaj.zone
    link
    fedilink
    English
    arrow-up
    0
    ·
    14 days ago

    Reverse proxy with fail2ban or crowdsec. It’s possible to set up things like Pangolin which ultimately use a VPN between external and internal access points but not at the client, though it takes more setup if you want to use apps over pangolin instead of just the browser.

  • frongt@lemmy.zip
    link
    fedilink
    English
    arrow-up
    0
    ·
    14 days ago

    See if there are any apps that will handle the VPN tunneling transparently, then provide the web interface, all in one.

    If you can’t find any that work like you want, I would put an authenticating reverse proxy in front of jellyfin. But last time I tried that, it only half worked. I don’t know if that’s changed.

    Worst case, a reverse proxy that only exposes the necessary endpoints. Or a WAF that can block known attacks.

    In any case, you should have a firewall rule as narrow as possible to only limit access to them. Static IP address if possible, then subnet, then ASN. Whatever is the most restrictive but still works.

  • AllYourSmurf@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    14 days ago

    I agree with reverse proxy + middleware. I’d also suggest something like Jellyswarm as the front end. That way I can connect to other friends’ servers too.

  • slazer2au@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    14 days ago

    At the very minimum stick a reverse proxy in front like caddy, nginx, or Traefik. Then have some middleware like crowdsec to inspect what’s going on. Then whitelist the IP or the country IP block.

    There is much more but those would be the bare minimum.

    • NarrativeBear@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      14 days ago

      I too would like to know more. Jellyfin has been something that I am still heditating to expose online without a VPN.

      I have Plex behind a reverse proxy (HAproxy) with Crowdsec and firewall rules all behind Cloudflare. My firewall rules in HAproxy block access a few different ways, like if request are higher then 60 requests a second, or if there is strange path traversal. Used the following guide as a start.

      https://www.archy.net/building-a-native-fail2ban-with-haproxy-stick-tables/

    • irmadlad@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      14 days ago

      Didn’t down vote, and I get what you’re saying to a certain extent. I’m not touting my server as hack-proof in the least, but it would take some work. My concern wouldn’t be someone hacking in and listening to my personal music collection I’ve been working on for decades…it goes all the way back to 1937.

      I would be more concerned that my compromised server was used as a zombie attack on some other server. The first VPS server got ransacked and used over-nite to (unsuccessfully) DDoS another business site.I got a ton of nasty grams for that boner. I didn’t loose anything but time.

      Bitcoin miners are easy to spot. I’ve never really understood why someone would hack into a small server and deploy a nefarious miner. On a huge corporate server farm, sure. But not some small selfhost VPS somebody found on lowendbox.

      • frongt@lemmy.zip
        link
        fedilink
        English
        arrow-up
        0
        ·
        14 days ago

        Because they’re not mining on just one, they’re mining on thousands.

        • irmadlad@lemmy.world
          link
          fedilink
          English
          arrow-up
          0
          ·
          13 days ago

          I understand economy of scale, but how much could you actually mine over nite on a little droplet before junior sysadmin notices that there is an influx of nasty grams in his in box and his little 4 banger VPS is maxed out on resources.

          • frongt@lemmy.zip
            link
            fedilink
            English
            arrow-up
            0
            ·
            13 days ago

            Long enough to make it worth it. Most people aren’t paying that much attention.

      • ampersandrew@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        ·
        14 days ago

        I’m learning a lot of this as I go and have not exposed any services to the internet yet, but would VLANs not contain the damage to a limited portion of the network? Because that’s the plan I’m working toward. Not just for Jellyfin but a handful of other services.

        • LadyMeow@lemmy.blahaj.zone
          link
          fedilink
          English
          arrow-up
          0
          ·
          14 days ago

          That… might work. Do you have a different physical server for each service though?

          The issue is once someone is in, then they can try to jailbreak and move laterally to get to other things. Other devices, into the file system.

          Jellyfin might not be your concern, but are there other files on that server? Or services? Secrets passwords etc? If anything else is on that vlan, what security flaws might be there that an attacker could use?

          • ampersandrew@lemmy.world
            link
            fedilink
            English
            arrow-up
            0
            ·
            14 days ago

            There is no personal information on anything in that proposed VLAN currently, and in the future, the most personal stuff it will include is a chat program to replace Discord. In all, I’m assuming I can run the reverse proxy and most services (not even a dozen) on a mini PC, and then somewhere between 1-4 on a NAS. Two devices total on this VLAN, unless I learn of something that would change this plan.

            • FrederikNJS@piefed.zip
              link
              fedilink
              English
              arrow-up
              0
              ·
              13 days ago

              If Jellyfin gets compromised, you risk everything else on the same server getting compromised, as well as everything that server can reach.

              VLANs can certainly reduce what is at risk, but wouldn’t the machine running the Jellyfin client be reachable from the Jellyfin server? And if they manage to move laterally to the client machine, what could they then reach from there?

                • FrederikNJS@piefed.zip
                  link
                  fedilink
                  English
                  arrow-up
                  0
                  ·
                  13 days ago

                  That depends a lot on what you do with them…

                  VLANs work on a layer where devices can either reach each other or they cannot.

                  Let’s say you have your main desktop computer in the “main” VLAN, and your Jellyfin server in the “jellyfin” VLAN, and a third server for your home-assistant in the “home-assistant” VLAN, and finally some IOT devices in the “iot” VLAN.

                  You connect the VLANs as follows:

                  • “main” can reach the Internet, but you also want to access your jellyfin and home-assistant, so you connect it to those two VLANs (“jellyfin” and “home-assistant”)
                  • “Jellyfin” can reach the Internet (because you want updates), but Jellyfin doesn’t need to reach anything else on your local network… However since you already connected “main”, then “jellyfin” can reach it.
                  • “home-assistant” needs to reach the Internet, but also the “iot” VLAN where some of the devices it controls resides. You also already connected “main” because you wanted to access home-assistant from your computer.
                  • “iot” is blocked from reaching the internet, and it’s only connected to the “home-assistant” VLAN because home-assistant needs to reach it.

                  Remember that all connected VLANs much be bidirectional.

                  Now someone compromises your Jellyfin. They now control and has access to everything on the Jellyfin server, but they also have network reachability to your main computer, because your “main” and “home-assistant” VLANs are connected. They can now try to exploit your main computer.

                  If they are successful in exploiting your main computer, then they can use your main computer to jump to the home-assistant server because again, these two VLANs are connected. And you likely have the credentials for accessing home-assistant available on your main computer somewhere.

                  Now they are on your home-assistant server, and they can now start trying to exploit your IOT devices.

                  If VLANs are connected, they don’t care which direction the traffic flows.

                  If you want to control traffic flow directions you need a firewall. A firewall can sit between VLANs and block traffic coming from one to other, but not the other to the one.

    • N.E.P.T.R@lemmy.blahaj.zone
      link
      fedilink
      English
      arrow-up
      0
      ·
      14 days ago

      Remote code execution is a concern. Your server and your network as a whole (including other VLANs) are susceptible to attack if Jellyfin is compromised. If Jellyfin is running on the host, it would be trivial to hack your server (and anything else running/connected to it). If Jellyfin is in a Docker/Podman containers, it doesnt prevent attacks against the host (sandbox escape, kernel privilege escalation, etc), or against your network over some ports. Even if the server is on it’s own VLAN, a vulnerability or weakness in your router could still lead to a compromise, meaning that any devices that is in any way connected to your router (including personal devices) could be attacked.

      There is a lot of depth to this topic of course. And at some point you just calculate your risks and weigh your options. There is no such thing as perfect security of course.

    • BakedCatboy@lemmy.ml
      link
      fedilink
      English
      arrow-up
      0
      ·
      14 days ago

      How do you get apps through something like that? Do you have to open your browser and hit the URL periodically to handle auth there and it just remembers your IP?

      • halcyoncmdr@piefed.social
        link
        fedilink
        English
        arrow-up
        0
        ·
        14 days ago

        You can set pangolin to allow access to an entire resource or just certain paths without the front auth, instead relying on the built in auth.

        Your random plex/emby/jellyfin server isn’t going to be a huge target and the built in auth is good enough for the limited access your media system should have.

        • BakedCatboy@lemmy.ml
          link
          fedilink
          English
          arrow-up
          0
          ·
          14 days ago

          Wait so if you’re gonna allow access without authentication then why bother putting pangolin in front of jellyfin? Does it help in some other kind of way? I don’t really get how it helps without interfering with apps accessing jellyfin.

      • clb92@feddit.dk
        link
        fedilink
        English
        arrow-up
        0
        ·
        13 days ago

        If there was a Jellyfin app that supported adding a custom header to the server connection, you could set your reverse proxy to just let the connections with that secret key header through, and make everything else go through the extra auth middleware. But as far as I know, none of the Jellyfin apps have that feature, even though it has been requested. Lots of other selfhosted apps do have the feature though, and I use it in a few places as well.

        • BakedCatboy@lemmy.ml
          link
          fedilink
          English
          arrow-up
          0
          ·
          13 days ago

          Gotcha I see, just checking if I missed something since that was the issue last time I tried doing something like that. These days I just yolo it and expose jellyfin to the public Internet.

        • BakedCatboy@lemmy.ml
          link
          fedilink
          English
          arrow-up
          0
          ·
          13 days ago

          What do you mean viable? The web UI is just an app that is delivered to your browser, it makes more or less the same API requests as an app would make, so IDK why the risk would be lower with an app?

          If an attacker can access the login endpoint for example to brute force or dictionary attack, it doesn’t matter if the web UI is or isn’t accessible if the login endpoint it uses is exposed for an app. The attacker could serve their own copy of the web UI and proxy requests to the API your app connects to. Blocking the html from being served doesn’t make a difference.

            • BakedCatboy@lemmy.ml
              link
              fedilink
              English
              arrow-up
              0
              ·
              13 days ago

              That’s exactly the point I’m getting at. Putting an auth wall doesn’t work with many apps, and if you add exceptions to the API then you’re not really protecting anything.

                • BakedCatboy@lemmy.ml
                  link
                  fedilink
                  English
                  arrow-up
                  0
                  ·
                  13 days ago

                  Yes that’s what I would like to advocate for. I did something similar with LunaSea, but often people suggest doing that with Jellyfin and are not aware that almost no apps support it, and that adding exceptions for the API makes you basically as secure as not having it. But people tend to get very defensive when you try to tell them that something won’t work, so I try to phrase it as a question to see if I can get them to understand what the limitations are in a way that’s less confrontational.

  • Nomecks@lemmy.ca
    link
    fedilink
    English
    arrow-up
    0
    ·
    14 days ago

    How much access do you have to their system? I would set up a script on their end to poll https://ipv4.icanhazip.com/ and send you their IP. I would then trigger a firewall rule change on your end to that information. This keeps the access to only their IP, with maybe a few minutes between polls where it might be different.

    • halcyoncmdr@piefed.social
      link
      fedilink
      English
      arrow-up
      0
      ·
      14 days ago

      Yeah, let me just walk my normie friends and parents through setting up a VPN on their TV so they can stream their shows.

      • Fedegenerate@fedinsfw.app
        link
        fedilink
        English
        arrow-up
        0
        ·
        13 days ago

        I stuck a rPi in their houses that runs pihole+nginx+tailscale. As far as they’re concerned they go to https://jellyfin.example.domain/ and they’re there.

        Better yet, they go to http://homarr.notlocal/ and they have nice little icons to click on, that take them to all the front-end services I run.

        They get pihole goodness for free. Their homepage is attached to their pihole if they want to pause/stop it.

        I’d like to set them up to be more declarative than I have, setup/updating is a pain. Nix is interesting but the learning curve is too steep for the effort I’m willing to put in. As per usual, being lazy will end up being more work for me in the long run.

  • INeedMana@piefed.zip
    link
    fedilink
    English
    arrow-up
    0
    ·
    14 days ago

    If they could be using web UI (I’m not sure how a client would work with auth like that) then it kind of depends on how much hassle they can live with and how secure you want to be

    Simplest would be to use https://doc.traefik.io/traefik/reference/routing-configuration/http/middlewares/basicauth/
    You set up username and password and share those with the user. But it can be brute-forced

    Something more secure but also a bit more demanding would be some kind of email otp
    https://docs.goauthentik.io/add-secure-apps/flows-stages/stages/authenticator_email/
    Set up authentik to send time-limited link to their email that well let them through. But they would have to authenticate every time they access

  • Decronym@lemmy.decronym.xyzB
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    14 days ago

    Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I’ve seen in this thread:

    Fewer Letters More Letters
    HTTP Hypertext Transfer Protocol, the Web
    IP Internet Protocol
    Plex Brand of media server package
    VPN Virtual Private Network
    nginx Popular HTTP server

    4 acronyms in this thread; the most compressed thread commented on today has 13 acronyms.

    [Thread #311 for this comm, first seen 23rd May 2026, 22:30] [FAQ] [Full list] [Contact] [Source code]

  • skeevy_scallops@feddit.online
    link
    fedilink
    English
    arrow-up
    0
    ·
    14 days ago

    call me crazy but I just use a couldflare tunnel since my domain is already provided through them. They make it really easy to add sub-domains attached to specific ports on the local machine and automatically adds the proper DNS entries. Additionally they have a ton of domain security/anti-bot measures you can set up.

  • katy ✨@piefed.blahaj.zone
    cake
    link
    fedilink
    English
    arrow-up
    0
    ·
    14 days ago

    if theyre close, add them to your tailscale, if not and you have a web serve, use a reverse proxy.

    for tailscale, you’d probably have to walk them through setting it up but then its one and done

    • WeirdGoesPro@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      0
      ·
      14 days ago

      That’s basically the VPN solution but with a little more flexibility.

      If you want to actually expose the service, you can use Tailscale to connect it to a VPS and then expose that port to the web with Nginx, but if you do that, be prepared on the security front because…you know…open internet be full of hazards.

  • anon_8675309@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    13 days ago

    Another way:

    Expose using caddy. Use basic auth for the web UI only. This exempts the Jellyfin app clients from basic auth that they don’t support but requires it before anyone even gets to the Jellyfin UI. This obfuscates the fact that your endpoint is even a Jellyfin end point.

    • strifegroove@ani.social
      link
      fedilink
      English
      arrow-up
      0
      ·
      12 days ago

      How can I do that? I’d love to have better security for my jellyfin but I risk breaking the apps.

  • SteveTech@aussie.zone
    link
    fedilink
    English
    arrow-up
    0
    ·
    14 days ago

    Possibly mTLS, which you’d configure in your reverse proxy. You could email them the certificate and instructions on installing it. I believe for Chromium browsers on Windows you basically just double click the cert and click through the wizard. Firefox I know has a thing in the settings for importing the cert. Android you just tap on the cert and make sure it opens with ‘Certificate Installer’ if it gives you the option.

    • purplemonkeymad@programming.dev
      link
      fedilink
      English
      arrow-up
      0
      ·
      12 days ago

      I recently did exactly this. Only works with the web UI, no apps support it, but working well and those without the cert just get a 400 error. Not sure if non technical tbh, since you will get warnings when adding your root certificates to any device, and that might scare some who don’t understand what it does.

      Also set it up through wireguard, so can punch out of double NAT.

      • SteveTech@aussie.zone
        link
        fedilink
        English
        arrow-up
        0
        ·
        11 days ago

        Only works with the web UI, no apps support it

        Yeah that’s true.

        you will get warnings when adding your root certificates to any device

        It’s not a root certificate, and I’ve never seen any warnings.

        • purplemonkeymad@programming.dev
          link
          fedilink
          English
          arrow-up
          0
          ·
          11 days ago

          You need the web site to use a certificate from the same root authority as your client certificate. Otherwise browsers won’t present the certificate to the server. That means either warnings on connect or adding the root cert.

          I do think if you are doing it with them in person it is doable to add it.