What’s your go too (secure) method for casting over the internet with a Jellyfin server.

I’m wondering what to use and I’m pretty beginner at this

  • @[email protected]
    link
    fedilink
    English
    812 days ago

    Tailscale, with nginx for https.

    Very easy, very simple, just works, and i can share my jellyfin server with my friends

  • @[email protected]
    link
    fedilink
    English
    45
    edit-2
    12 days ago

    Jellyfin isn’t secure and is full of holes.

    That said, here’s how to host it anyway.

    1. Wireguard tunnel, be it tailscale, netbird, innernet, whatever
    2. A vps with a proxy on it, I like Caddy
    3. A PC at home with Jellyfin running on a port, sure, 8096

    If you aren’t using Tailscale, make your VPS your main hub for whatever you choose, pihole, wg-easy, etc. Connect the proxy to Jellyfin through your chosen tunnel, with ssl, Caddy makes it easy.

    Since Jellyfin isn’t exactly secure, secure it. Give it its own user and make sure your media isn’t writable by the user. Inconvenient for deleting movies in the app, but better for security.

    more…

    Use fail2ban to stop intruders after failed login attempts, you can force fail2ban to listen in on jellyfin’s host for failures and block ips automatically.

    More!

    Use Anubis and yes, I can confirm Anubis doesn’t intrude Jellyfin connectivity and just works, connect it to fail2ban and you can cook your own ddos protection.

    MORE!

    SELinux. Lock Jellyfin down. Lock the system down. It’s work but it’s worth it.

    I SAID MORE!

    There’s a GeoIP blocking plugin for Caddy that you can use to limit Jellyfin’s access to your city, state, hemisphere, etc. You can also look into whitelisting in Caddy if everyone’s IP is static. If not, ddns-server and a script to update Caddy every round? It can get deep.

    Again, don’t do any of this and just use Jellyfin over wireguard like everyone else does(they don’t).

      • @[email protected]
        link
        fedilink
        English
        4
        edit-2
        11 days ago

        If you aren’t already familiarized with the Docker Engine - you can use Play With Docker to fiddle around, spin up a container or two using the docker run command, once you get comfortable with the command structure you can move into Docker Compose which makes handling multiple containers easy using .yml files.

        Once you’re comfortable with compose I suggest working into Reverse Proxying with something like SWAG or Traefik which let you put an domain behind the IP, ssl certificates and offer plugins that give you more control on how requests are handled.

        There really is no “guide for dummies” here, you’ve got to rely on the documentation provided by these services.

      • @[email protected]
        link
        fedilink
        English
        311 days ago

        I figured infodump style was a bit easier for me at the time so anyone could take anything I namedropped and go search to their heart’s content.

        • @[email protected]
          link
          fedilink
          English
          911 days ago

          I don’t want to be an asshole but after checking a couple of those out they all appear to be post-authorization vulnerabilities? Like sure if you’re just passing out credentials to your jellyfin instance someone could use the device log upload to wreck your container, but shouldn’t most people be more worried about vulnerabilities that have surface for unauthorized attackers?

          • @[email protected]
            link
            fedilink
            English
            311 days ago

            A while back there was a situation where outsiders could get the name of the contents of your Jellyfin server, which would incriminate anyone. I believe it’s patched now, but I don’t think Jellyfin is winning any security awards. It’s a selfhosted media server. I have no frame of reference for knowing whether or not any of my information was overkill and I’m sure there are even some out there that would say I didn’t go far enough, even.

          • Ryan
            link
            fedilink
            English
            310 days ago

            plus, most of the mentioned cve’s state “versions before …”. Exposing a service to the internet always has a risk to it, keeping your service up-to-date is mandatory. Running behind a vpn can protect you, sure. But it also has to be practical. I don’t get why Jellyfin especially gets this kind of slaming. You’ll find similar records for any other software.

      • @[email protected]
        link
        fedilink
        English
        211 days ago

        I’ve recently been working on my own server and a lot of this stuff can be accomplished by just chatting with chatgpt/gemini or any ai agent of your choosing. One thing to note tho is that they have some outdated information due to their training data so you might have to cross reference with the documentation.

        Use docker as much as you can, this will isolate the process so even if somehow you get hacked, the visibility the hackers get into your server is limited to the docker container.

  • fmstrat
    link
    fedilink
    English
    2311 days ago

    I used to do all the things mentioned here. Now, I just use Wireguard. If a family member wants to use a service, they need Wireguard. If they don’t want to install it, they dont get the service.

    • @[email protected]
      link
      fedilink
      English
      511 days ago

      I started my homelab with a couple exposed services, but frankly the security upkeep and networking headaches weren’t worth the effort when 99% of this server’s usage is at home anyway.

      I’ve considered going the Pangolin route to expose a handful of things for family but even that’s just way too much effort for very little added value (plus moving my reverse proxy to a VPS doesn’t sound ideal in case the internet here goes down).

      Getting 2 or 3 extra folks on to wireguard as necessary is just much easier.

  • @[email protected]
    link
    fedilink
    English
    2111 days ago

    for me the easiest option was to set up tailscale on the server or network where jellyfin runs and then on the client/router where you want to watch the stream.

    • Q The Misanthrope
      link
      fedilink
      English
      811 days ago

      This is also what I do, however, each user creates their own tailnet, not an account on mine and I share the server to them.

      This way I keep my 3 free users for me, and other people still get to see jellyfin.

      Tailscale and jellyfin in docker, add server to tailnet and share it out to your users emails. They have to install tailscale client in a device, login, then connect to your jellyfin. My users use Walmart Onn $30 streaming boxes. They work great.

      I struggled for a few weeks to get it all working, there’s a million people saying “I use this” but never “this is how to do it”. YouTube is useless because it’s filled with “jellyfin vs Plex SHOWDOWN DEATH FIGHT DE GOOGLE UR TOILET”.

      • @[email protected]
        link
        fedilink
        English
        111 days ago

        For the users you have using Onn TVs, is Tailscale just installed on a device on the network or on the Onn TVs?

        • Q The Misanthrope
          link
          fedilink
          English
          1
          edit-2
          11 days ago

          The onn boxes run android so it’s just installed as an app from play store. The users connect with their own tailscale account. My server is shared so they see it. Then they install jellyfin on the device, punch in the hostname of the server given by tailscale and the port and then it connects.

          I could not get my reverse proxy to let them use my local domain… I’m not smart enough and couldn’t figure it out but they are only using jellyfin so typing one address was fine.

  • Encrypt-Keeper
    link
    fedilink
    English
    15
    edit-2
    11 days ago

    If you’re a beginner and you’re looking for the most secure way with least amount of effort, just VPN into your home network using something like WireGuard, or use an off the shelf mesh vpn like Tailscale to connect directly to your JF server. You can give access to your VPN to other people to use. Tailscale would be the easiest to do this with, but if you want to go full self-hosted you can do it with WireGuard if you’re willing to put in a little extra leg work.

    What I’ve done in the past is run a reverse proxy on a cloud VPS and tunnel that to the JF server. The cloud VPS acts as a reverse proxy and a web application firewall which blocks common exploits, failed connection attempts etc. you can take it one step beyond that if you want people to authenticate BEFORE they reach your server by using an oauth provider and whatever forward Auth your reverse proxy software supports.

  • Porco
    link
    fedilink
    English
    811 days ago

    I use a wire guard tunnel into my Fritz box and from there I just log in because I’m in my local network.

  • @[email protected]
    link
    fedilink
    English
    1512 days ago

    Use a reverse proxy (caddy or nginx proxy manager) with a subdomain, like myservice.mydomain.com (maybe even configure a subdir too, so …domain.com/guessthis/). Don’t put anything on the main domain / root dir / the IP address.

    If you’re still unsure setup Knockd to whitelist only IP addresses that touch certain one or two random ports first.

    So security through obscurity :) But good luck for the bots to figure all that out.

    VPN is of course the actually secure option, I’d vote for Tailscale.

      • @[email protected]
        link
        fedilink
        English
        512 days ago

        Not at hand no, but I’m sure any of the LLMs can guide you through the setup if googling does not give anything good.

        Nothing very special about all this, well maybe the subdir does require some extra spells to reverse proxy config.

      • @[email protected]
        link
        fedilink
        English
        412 days ago

        Nice, but the bots may not understand the joke.

        And not only that but they will tag the domain with ”there is something here”, and maybe some day someone will take a closer look and see if you are all up-to-date or would there maybe be a way in. So better to just drop everything and maybe also ban the IP if they happen to try poke some commonly scanned things (like /wp-admin, /git, port 22 etc.) GoAccess is a pretty nice tool to show you what they are after.

        • @[email protected]
          link
          fedilink
          English
          112 days ago

          Yeah that’s a good point. The joke is mostly for my own enjoyment or any random user who happens to forget the jellyfin. subdomain.

          I have had a few hits to /wp-admin, but cloudflare actually blocks those for me (I don’t use a tunnel but I do use them for the domain name which helps a bit). I might just shut down the main page then.

  • @[email protected]
    link
    fedilink
    English
    812 days ago

    I’m just using caddy and a cheap $2 a year .top domain with a $4 a month VPS. Works for my users, I only have 3 users on my server.

  • @[email protected]
    link
    fedilink
    English
    911 days ago

    If it’s just so you personally can access it away from home, use tailscale. Less risky than running a publicly exposed server.

  • @[email protected]
    link
    fedilink
    English
    3211 days ago

    I host it publicly accessible behind a proper firewall and reverse proxy setup.

    If you are only ever using Jellyfin from your own, wireguard configured phone, then that’s great; but there’s nothing wrong with hosting Jellyfin publicly.

    I think one of these days I need to make a “myth-busting” post about this topic.

  • @[email protected]
    link
    fedilink
    English
    911 days ago

    We have it open to the public, behind a load balancer URL filtering incomming connection, https proxied through cloudflare with a country filter in place

  • r00ty
    link
    fedilink
    1312 days ago

    Wireguard vpn into my home router. Works on android so fire sticks etc can run the client.

  • Gravitywell
    link
    fedilink
    English
    1512 days ago

    I rent a cheap $5/mo VPS and use it to run a wireguard server with wgeasy and nginx proxy manager. Everything else runs on my home server connected by wireguard.

    • @[email protected]
      link
      fedilink
      English
      212 days ago

      I was just trying to get a setup like this going yesterday. I used standard Wiregaurd and got that working between the VPS and home server, but I was trying to set up Caddy as a reverse proxy to direct the incoming traffic through the WG VPN to my services. I wasnt able to figure it out yesterday. Everyone online says Caddy is so simple, but I’m such a noob I just have no idea what it’s doing or how to troubleshoot.

      • @[email protected]
        link
        fedilink
        English
        212 days ago

        I’ve also really struggled with Caddy despite everyone saying its so simple. I’m pretty new to all this, but I had better luck with Traefik - I now actually have a reverse proxy up and running correctly, which I haven’t been able replicate with Caddy.

        Traefik labels make sense to me in a way Caddy does not.

        • @[email protected]
          link
          fedilink
          English
          212 days ago

          I appreciate this response. I’ll try booting up traefik later.

          I think Caddy just abstracts things to such a great degree that if you dont already know what it’s supposed to do, it’s harder to learn what you’re doing with it. I’m sure plenty of others have stepped right up and loved the “two line config” without already understanding the basics, but it’s not clicking for me.

      • Gravitywell
        link
        fedilink
        English
        2
        edit-2
        12 days ago

        I havent tried with caddy but i might be able to help you get it working if you wanna chat some time. My contact info is on my website.

    • @[email protected]
      link
      fedilink
      English
      112 days ago

      This is 99% my setup, just with a traefik container attached to my wifeguard container.

      Can recommend especially because I can move apartments any time, not care about CGNAT (my current situation which I predicted would be the case), and easily switch to any backup by sticking my boxes on any network with DHCP that can reach the Internet (like a 4G hotspot or a nanobeam pointed at a public wifi down the road) in a pinch without reconfiguring anything.

    • Machinist0938
      link
      fedilink
      English
      212 days ago

      Is Nginx Proxy Manager running on the VPS itself and then the proxy routes across the wireguard to your home server? Or is the VPS just port forwarding to your home server which runs the proxy?

      • Gravitywell
        link
        fedilink
        English
        312 days ago

        My goal was to have no ports exposed on my home network so the proxy is on the VPS. My home server connects over wireguad to the vps, then all the traffic is routed over wireguard to the home server which only listens on wireguard.

  • @[email protected]
    link
    fedilink
    English
    8212 days ago

    Nginx in front of it, open ports for https (and ssh), nothing more. Let’s encrypt certificate and you’re good to go.

    • @[email protected]
      link
      fedilink
      English
      7012 days ago

      I would not publicly expose ssh. Your home IP will get scanned all the time and external machines will try to connect to your ssh port.

      • @[email protected]
        link
        fedilink
        English
        1012 days ago

        Sorry, misunderstanding here, I’d never open SSH to the internet, I meant it as “don’t block it via your server’s firewall.”

      • drkt
        link
        fedilink
        English
        1412 days ago

        They can try all they like, man. They’re not gonna guess a username, key and password.

          • drkt
            link
            fedilink
            English
            3612 days ago

            If you’re going to open something, SSH is far, far more battle-tested than much other software, even popular software. Pragmatically, If someone is sitting on a 0-day for SSH, do you genuinely think they’re gonna waste that on you and me? Either they’re gonna sell it to cash out as fast as possible, or they’ll sit on it while plotting an attack against someone who has real money. It is an unhealthy level of paranoia to suggest that SSH is not secure, or that it’s less secure than the hundreds of other solutions to this problem.

            Here is my IP address, make me eat my words.
            2a05:f6c7:8321::164 | 89.160.150.164

            • @[email protected]
              link
              fedilink
              English
              1312 days ago

              You got balls to post you public addresses like that… I mean I agree with you wholeheartedly and I also have SSH port forwarded on my firewall, but posting your public IP is next-level confidence.

              Respect.

                • @[email protected]
                  link
                  fedilink
                  English
                  211 days ago

                  Well, those won’t typically have ssh exposed on them. But we could argue what is more risky to have exposed, ssh or http. Any publicly available server could be vulnerable, it’s just very unlikely these days (with up to date software).

            • @[email protected]
              link
              fedilink
              English
              512 days ago

              I linked a relevant vulnerability, but even ignoring that, pragmatically, you feel they’d be targeting specific targets instead of just what they currently do? (That, by the way, is automating the compromise of vulnerable clients in mass scale to power botnets). Any service you open on your device to the internet is inherently risky. Ssh best practices are, and have been since the early days, not to expose it to the internet directly.

              • drkt
                link
                fedilink
                English
                7
                edit-2
                11 days ago

                You did link a vulnerability! That is true. I didn’t claim SSH had a clean track record, I claimed it had a better track record than most other software. That vulnerability is hard to exploit, and generates a lot of noise if you were to try, which nobody has because it’s never been found in the wild.

                People who sit on 0-days for critical software like SSH don’t go out and try to mass-exploit it because it will be found within the day and patched within the week once they start making noise. This is not a quiet exploit. If they’re smart, they sell it. If they’re ambitious, they build an elaborate multi-chain attack against a specific target. Only 0.14% of devices vulnerable to this exploit are EoL versions of OpenSSH, so once this was patched, it was no longer a useful attack vector.

                It would also have been completely negated by fail2ban, which is prominently deployed on internet facing SSH, as it required thousands and thousands of connection attempts to trigger the condition. It could also have been mitigated by not running sshd as root, though I understand that most people don’t want to deal with that headache even though it is possible.

                There are thousands of independent honeypots that sit quietly and sniff all the mass-attacks and they earn their daily bread by aggregating and reporting this data. If you run a mass exploit, you will be found within the day. Trust me, I burned an IP address by regularly scanning the whole IPv4 space. You are going to end up on blacklists real fuckin’ fast and whatever you were doing will be noticed and reported.

                If you’re going to open something, SSH is a very safe choice. But yes, don’t open it if you don’t need it. We are discussing how to open a service to the internet safely, though, so we need it.

                • @[email protected]
                  link
                  fedilink
                  English
                  311 days ago

                  🤔🤔🤔🤔🤔

                  https://arstechnica.com/information-technology/2022/02/after-lying-low-ssh-botnet-mushrooms-and-is-harder-than-ever-to-take-down/

                  Are we living in the same universe? In mine software doesn’t get patched all the time, in fact it’s usually a lack of patches that lead to any significant system compromise… Which happens time and time again. Also you’re on a thread that is advising hobbiests on how to configure and maintain their personal server, not the engineering meeting for a fortune 500. Yes, you can make ssh very secure. Yes, it’s very secure even by default. In the same regard, new vulnerabilities/exploits will be found, and it remains best practice not to expose ssh to raw internet unless absolutely necessary and with the considerations required to mitigate risk. Ssh isn’t even implemented identically on every device, so you literally cannot talk about it like you are. Idk why you’re arguing against the industry standard for best practices decided by people who have far more experience and engineering time than you or I.

          • @[email protected]
            link
            fedilink
            English
            111 days ago

            I remember that one. Those are pretty rare and usually involve a specific configuration that is often not the default, though, right? When such a vulnerability is found, is it rightly so major news.

            • @[email protected]
              link
              fedilink
              English
              211 days ago

              “This race condition affects sshd in its default configuration.” direct quote from the linked article, paragraph like… 3. I linked it so people could read, not speculate.

                • @[email protected]
                  link
                  fedilink
                  English
                  211 days ago

                  Agreed, but best practices are meant to deal with the very rare. They didn’t put the vulnerabilities in the software due to negligence or malice, it’s just an ever evolving arms race with cracks that show up due to layer upon layer of abstraction. Again I’m not saying to never expose ssh to the net, quite the opposite, but as a best practice you should never do it unless you fully understand the risk and are prepared to deal with any potential consequences. That’s just a core tenant of understanding security posture.

        • adr1an
          link
          fedilink
          English
          311 days ago

          Only the failed attempts could be a Denial Of Service and throw you out. So, at least add an ever increasing delay to those. Fail2ban is important.

      • Lucy :3
        link
        fedilink
        English
        5412 days ago

        fail2ban with endlessh and abuseipdb as actions

        Anything that’s not specifically my username or git gets instantly blocked. Same with correct users but trying to use passwords or failing authentication in any way.

      • @[email protected]
        link
        fedilink
        English
        111 days ago

        Ssh has nothing to do with scanning. Your IP and everyone else up is being scanned constantly. In ipv4 space at least.

          • @[email protected]
            link
            fedilink
            English
            1212 days ago

            In 3 years I haven’t had a single attempted connection that wasn’t me. Once you get to the ephemeral ports nobody is scanning that high.

            I’m not saying run no security or something. Just nobody wants to scan all 65k ports. They’re looking for easy targets.

      • troed
        link
        fedilink
        512 days ago

        So? Pubkey login only and fail2ban to take care of resource abuse.

      • @[email protected]
        link
        fedilink
        English
        211 days ago

        i have ssh on a random port and only get so many scan, so low that fail2ban never banned anyone that was not myself (accidentally).

    • @[email protected]
      link
      fedilink
      English
      312 days ago

      Why would you need to expose SSH for everyday use? Or does Jellyfin require it to function?

      Maybe leave that behind some VPN access.

    • @[email protected]OP
      link
      fedilink
      English
      512 days ago

      Cool if I understand only some of things that you have said. So you have a beginner guide I could follow?

      • Dataprolet
        link
        fedilink
        English
        912 days ago

        Take a look at Nginx Proxy Manager and how to set it up. But you’ll need a domain for that. And preferably use a firewall of some sort on your server and only allow said ports.

        • @[email protected]OP
          link
          fedilink
          English
          512 days ago

          I’ve look a little on it, didn’t understand most of it. I’m looking for a comprehensive beginner guide before going foward

          • Midnight Wolf
            link
            fedilink
            English
            10
            edit-2
            12 days ago

            This isn’t a guide, but any reverse proxy allows you to limit open ports on your network (router) by using subdomains (thisPart.website.com) to route connections to an internal port.

            So you setup a rev proxy for jellyfin.website.com that points to the port that jf wants to use. So when someone connects to the subdomain, the reverse proxy is hit, and it reads your configuration for that subdomain, and since it’s now connected to your internal network (via the proxy) it is routed to the port, and jf “just works”.

            There’s an ssl cert involved but that’s the basic understanding. Then you can add Some Other Services at whatever.website.com and rinse and repeat. Now you can host multiple services, without exposing the open ports directly, and it’s easy for users as there is nothing “confusing” like port numbers, IP addresses, etc.

            • @[email protected]
              link
              fedilink
              English
              112 days ago

              So I’m another newbie dummy to reverse proxies. I’ve got my jellyfin accessible at jellyfin.mydomain.com but I can only access it through the web. How do I share with other people who want to use the apps? I can’t get my apps to find my instance.

                • @[email protected]
                  link
                  fedilink
                  English
                  110 days ago

                  That was the problem, I couldn’t access anything away from my LAN. I finally figured it out though. I’m using Pangolin to access my services outside of my LAN and by default it adds a SSO option. Once I turned that off, my iPhone app was able to find my server through my domain name just fine. Thanks!

      • @[email protected]
        link
        fedilink
        English
        212 days ago

        Honestly you can usually just static ip the reverse proxy and open up a 1:1 port mapping directly to that box for 80/443. Generally not relevant to roll a whole DMZ for home use and port mapping will be supported by a higher % of home routing infrastructure than DMZs.

        • @[email protected]
          link
          fedilink
          English
          212 days ago

          It’s beginner level, the hard part is the reverse proxy, once you have a grasp on that just having it on a dedicated box in a segmented portion on your firewall designated as the DMZ is easy. Id even go so far as to say its the bare minimum if you’re even considering exposing to the internet.

          It doesn’t even need to be all that powerful since its just relaying packets as a middleman