I already host multiple services via caddy as my reverse proxy. Jellyfin, I am worried about authentication. How do you secure it?

  • dan@upvote.au
    link
    fedilink
    English
    arrow-up
    39
    arrow-down
    1
    ·
    edit-2
    6 months ago

    Is it just you that uses it, or do friends and family use it too?

    The best way to secure it is to use a VPN like Tailscale, which avoids having to expose it to the public internet.

    This is what I do for our security cameras. My wife installed Tailscale on her laptop and phone, created an account, and I added her to my Tailnet. I created a home screen icon for the Blue Iris web UI on her phone and mentioned to her, “if the cameras don’t load, open Tailscale and make sure it’s connected”. Works great - she hasn’t complained about anything at all.

    If you use Tailscale for everything, there’s no need to have a reverse proxy. If you use Unraid, version 7 added the ability to add individual Docker containers to the Tailnet, so each one can have a separate Tailscale IP and subdomain, and thus all of them can run on port 80.

    • paequ2@lemmy.today
      link
      fedilink
      English
      arrow-up
      12
      ·
      6 months ago

      if the cameras don’t load, open Tailscale and make sure it’s connected

      I’ve been using Tailscale for a few months now and this is my only complaint. On Android and macOS, the Tailscale client gets randomly killed. So it’s an extra thing you have to manage.

      It’s almost annoying enough to make me want to host my services on the actual internet… almost… but not yet.

      • Lem453@lemmy.ca
        link
        fedilink
        English
        arrow-up
        11
        ·
        6 months ago

        I use plain wireguard on me phone, always on essentially with no issues. I wonder why tailscale app can’t stay open.

        • beerclue@lemmy.world
          link
          fedilink
          English
          arrow-up
          7
          ·
          6 months ago

          Same, wireguard with the 'WG Tunnel" app, which adds conditional Auto-Connect. If not on home wifi, connect to the tunnel.

          • Lem453@lemmy.ca
            link
            fedilink
            English
            arrow-up
            2
            ·
            6 months ago

            I just stay connected to wireguard even at home, only downside is the odd time I need to chromecast, it needs to be shut off.

          • dan@upvote.au
            link
            fedilink
            English
            arrow-up
            1
            arrow-down
            2
            ·
            6 months ago

            conditional Auto-Connect. If not on home wifi, connect to the tunnel.

            You don’t need this with Tailscale since it uses a separate IP range for the tunnel.

        • paequ2@lemmy.today
          link
          fedilink
          English
          arrow-up
          3
          ·
          6 months ago

          I suspect that it goes down and stays down whenever there is an app update, but I haven’t confirmed it yet.

          Does the plain wireguard app stay up during updates?

          • Lem453@lemmy.ca
            link
            fedilink
            English
            arrow-up
            8
            ·
            edit-2
            6 months ago

            Android wireguard all hasn’t been updated in 18mo. Its extremely simple with a small code base. There basically isn’t anything to update. It uses wireguard kernel module which is itself is only like 700 lines of code. It so simple that it basically became stable very quickly and there is nothing left of update right now.

            https://git.zx2c4.com/wireguard-android/about/

            I personally get the from obtainium to bypass play store

        • ladfrombrad 🇬🇧@lemdro.id
          link
          fedilink
          English
          arrow-up
          3
          ·
          edit-2
          6 months ago

          It loses its foreground notification I’ve found that kills it for me

          even thou the Quick Toggle and the app itself, shows as running

          If I disconnect/reconnect the notification comes back, and I’ve found something even more weird on my device (A Xiaomi with its infamous OOM / background app killer…) is Tailscale still actually works fine most of the time without the foreground notification. I’m hazarding a 70% of the time for me?

          A lot of us a while back found v1.5.2 fugged around with the persistent notification going RIP

          https://github.com/tailscale/tailscale/issues/10104

          • LiveLM@lemmy.zip
            link
            fedilink
            English
            arrow-up
            2
            ·
            6 months ago

            Oh the Quick Toggle has never, ever worked correctly. I hoped they fixed it after the UI refresh update but unfortunately not yet.

            • ladfrombrad 🇬🇧@lemdro.id
              link
              fedilink
              English
              arrow-up
              2
              ·
              edit-2
              6 months ago

              What device/ROM are you using?

              It’s been very iffy for me on and off from Miui > HyperHyperOS, but just checking now?

              Works fine

              Like I say, the foreground notification seemed to be the lifeline to some of us using it and keeping it alive, even after IIRC some more restrictions came in with future versions of Android (forgive me, I’m very lazy these days and just skim Mishaal’s TG feed 😇)?

              e: also dupe comment ;)

                • ladfrombrad 🇬🇧@lemdro.id
                  link
                  fedilink
                  English
                  arrow-up
                  2
                  ·
                  edit-2
                  6 months ago

                  Huh. The nearest I have to an actual “AOSP” device is my King Kong Cubot phone that has probably the cleanest version of “stock Android” I’ve ever seen, and I’m going to presume you mean like a Google Pixel / Graphene etc?

                  Tailscale and the QS tile / notification was solid on that Cubot but to be honest, I’ve barely turned it on these days and is now one of those drawer phones.

                  Miui / HyperHyperOS though is a different kettle of fish and exempting Tailscale from its App lel Killer does seem to work. 70-80%ish…

                  But there is something that just fuggs up and turn it off/on like most thingys I own 🙈

                • dai@lemmy.world
                  link
                  fedilink
                  English
                  arrow-up
                  1
                  ·
                  6 months ago

                  Works great and has been for some time on my P7P.

                  Ensure you’ve allowed background usage and turn off manage app if unused.

                  Keep the notification on and allow notifications.

          • LiveLM@lemmy.zip
            link
            fedilink
            English
            arrow-up
            1
            ·
            6 months ago

            Oh the Quick Toggle has never, ever worked correctly. I hoped they fixed it after the UI refresh update but unfortunately not yet.

      • Byter@lemmy.one
        link
        fedilink
        English
        arrow-up
        2
        ·
        6 months ago

        If you make Tailscale your VPN in Android it will never be killed. Mileage may vary depending on flavor of Android. I’ve used this on stock Pixel and GrapheneOS.

        Under Settings > Network and internet > VPN

        Tap the Cog icon next to Tailscale and select Always-on VPN.

  • skoell13@feddit.org
    link
    fedilink
    English
    arrow-up
    22
    ·
    edit-2
    6 months ago

    My setup: Locally (all in docker):

    • JF for managing and local access
    • JF with read only mounted volumes that uses the network of my Wireguard client container
    • Wireguard client opening a tunnel to Wireguard server on VPS ** Ping container regularly doing pings to Wireguard Server so the connection stays up (didn’t manage it otherwise)

    VPS (Oracle Cloud free tier, also everything in docker):

    • Caddy as a reverse proxy with https enabled and geolocking (only certain countries are allowed to connect to)
    • fail2ban to block IPs that try to bruteforce credentials
    • Wireguard server

    Usernames are not shown in the frontend and have to be entered. Passwords are generated by a password manager and can’t be changed by the user.

    So my clients just get the URL of my reverse proxy and can access the read only JF through my Wireguard tunnel. Didn’t have to open any ports on my side. If someone is interested I can share the docker compose files later.

  • Rookeh@startrek.website
    link
    fedilink
    English
    arrow-up
    20
    ·
    edit-2
    6 months ago

    For web access, stick it behind a reverse proxy and use something like Authentik/Authelia/SSO provider of your choice to secure it.

    For full access including native clients, set up a VPN.

    • λλλ@programming.devOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      6 months ago

      I use Tailscale right now. Which, in fairness, I didn’t state in the post. However, I was hoping to share it more similarly to how I used to with Plex. But, it would appear, I would have to share it through Tailscale only at this point.

  • borax7385@lemmy.world
    link
    fedilink
    English
    arrow-up
    18
    arrow-down
    1
    ·
    6 months ago

    I use fail2ban to ban IPs that fall to login and also IPs that perform common scans in the reverse proxy

    • Evil_Shrubbery@lemm.ee
      link
      fedilink
      English
      arrow-up
      6
      arrow-down
      1
      ·
      edit-2
      6 months ago

      Or wireguard, depending where & how they want to implement it might be simpler or better/worse on hardware.

  • Dr. Moose@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    6 months ago

    Tailscale is awesome. Alternatively if you’re more technically inclined you can make your own wireguard tailscale and all you need is to get a static IP for your home network. Wireguard will always be safer than each individual service.

  • geography082@lemm.ee
    link
    fedilink
    English
    arrow-up
    3
    arrow-down
    2
    ·
    6 months ago

    My setup is: Proxmox - restricted LXC running docker which runs jellyfin, tailscale funnel as reverse proxy and certificate provider. So so don’t care about jellyfin security, it can get hacked / broken , its an end road. If so i will delete the LXC and bring it up again using backups. Also i dont think someone will risk or use time to hack a jellyfin server. My strategy is, with webservices that don’t have critical personal data, i have them isolated in instances. I don’t rely on security on anything besides the firewall. And i try not to have services with personal sensitive data, and if i do, on my local lan with the needed protections. If i need access to it outside my local lan, vpn.

  • CapitalNumbers@lemm.ee
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    6 months ago

    So i’ve been trying to set this up this exact thing for the past few weeks - tried all manner of different Nginx/Tailscale/VPS/Traefik/Wireguard/Authelia combos, but to no avail

    I was lost in the maze

    However, I realised that it was literally as simple as setting up a CloudFlare Tunnel on my particular local network I wanted exposed (in my case, the Docker network that runs the JellyFin container) and then linking that domain/ip:port within CloudFlare’s Zero Trust dashboard

    Cloudflare then proxies all requests to your public domain/route to your locally hosted service, all without exposing your private IP, all without exposing any ports on your router, and everything is encrypted with HTTPS by default

    And you can even set up what looks like pretty robust authentication (2FA, limited to only certain emails, etc) for your tunnel

    Not sure what your use case is, but as mine is shared with only me and my partner, this worked like a charm

    • chriscrutch@lemm.ee
      link
      fedilink
      English
      arrow-up
      0
      ·
      6 months ago

      I’m pretty sure that using Jellyfin over Cloudflare tunnels is against their TOS, just FYI. I’m trying to figure out an alternative myself right now because of that.

      • nk@thebrainbin.org
        link
        fedilink
        arrow-up
        0
        ·
        5 months ago

        I just moved from that. I now have Traefik on aVPS with a Wireguard server that my home router connects to (Immich IP forwarded in the config of WG).

        • chriscrutch@lemm.ee
          link
          fedilink
          English
          arrow-up
          1
          ·
          5 months ago

          Thanks for mentioning. I ended up using a Tailscale funnel and everything is running swimmingly so far.

    • vodka@lemm.ee
      link
      fedilink
      English
      arrow-up
      0
      ·
      6 months ago

      Pay attention to your email, when cloudflare decides to warn you for this (they will, it’s very very much against TOS) they’ll send you an email, if you don’t remove the tunnel ASAP, your entire account will be terminated.

      • CapitalNumbers@lemm.ee
        link
        fedilink
        English
        arrow-up
        0
        ·
        6 months ago

        Why would Cloudflare warn me against a service they themselves offer? The email authentication is all managed by them

  • Mubelotix@jlai.lu
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    4
    ·
    edit-2
    6 months ago

    Jellyfin is secure by default, as long as you have https. Just chose a secure password

    • doeknius_gloek@discuss.tchncs.de
      link
      fedilink
      English
      arrow-up
      23
      ·
      edit-2
      6 months ago

      No, it isn’t.

      EDIT: I quickly want to add that Jellyfin is still great software. Just please don’t expose it to the public web, use a VPN (Wireguard, Tailscale, Nebula, …) instead.

      • Flipper@feddit.org
        link
        fedilink
        English
        arrow-up
        7
        ·
        6 months ago

        Some of these are bonkers. The argument not to fix them because of backwards compatibility is even wilder. Which normal client would need the ability to get data for any other account that it hasn’t the Auth token for.

        • sugar_in_your_tea@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          2
          ·
          6 months ago

          Just make a different API prefix that’s secure and subject to change, and once the official clients are updated, deprecate the insecure API (off by default).

          That way you preserve backwards compatibility without forcing everyone to be insecure.

          • merthyr1831@lemmy.ml
            link
            fedilink
            English
            arrow-up
            1
            ·
            6 months ago

            Even just basic API versioning would be sufficient. .NET offers a bunch of ways to handle breaking changes in APIs

      • LiveLM@lemmy.zip
        link
        fedilink
        English
        arrow-up
        3
        ·
        6 months ago

        Oh boy. Nope. My friends gonna have to fiddle with a VPN, forget exposing JF to the outside…

        • merthyr1831@lemmy.ml
          link
          fedilink
          English
          arrow-up
          1
          ·
          6 months ago

          Cloudflare is known for being unreliable with how and when it enforces the ToS (especially for paying customers!). Just because they haven’t cracked down on everyone doesn’t mean they won’t arbitrarily pick out your account from thousands of others just to slap a ban on. There’s inherent risk to it

      • Dave@lemmy.nz
        link
        fedilink
        English
        arrow-up
        3
        arrow-down
        3
        ·
        6 months ago

        No, they removed that clause some 2 or 3 years back.

    • ftbd@feddit.org
      link
      fedilink
      English
      arrow-up
      6
      arrow-down
      1
      ·
      6 months ago

      I hate the cloudflare stuff making me do captchas or outright denying me with a burning passion. My fault for committing the heinous crime of using a VPN!

  • SplashJackson@lemmy.ca
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    7
    ·
    edit-2
    6 months ago

    Mostly via empty threats, but occaisonally I have had to whip out the soccer ball