this post was submitted on 31 Mar 2025
203 points (98.1% liked)

Selfhosted

45381 readers
460 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 2 years ago
MODERATORS
 

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

top 50 comments
sorted by: hot top controversial new old
[–] dan@upvote.au 51 points 2 days ago* (last edited 2 days ago) (1 children)

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 15 points 2 days ago (15 children)

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 14 points 2 days ago (2 children)

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 9 points 2 days ago (16 children)

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

load more comments (16 replies)
[–] paequ2@lemmy.today 3 points 2 days ago (1 children)

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 10 points 2 days ago* (last edited 2 days 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

[–] Byter@lemmy.one 7 points 2 days ago (1 children)

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.

[–] paequ2@lemmy.today 4 points 1 day ago

Holy moly, I did not know this existed! Thanks! Just turned this on!

[–] loutr@sh.itjust.works 7 points 2 days ago

Look up your phone on dontkillmyapp.com and make sure tailscale is excluded from battery and network "optimization".

load more comments (12 replies)
[–] skoell13@feddit.org 32 points 2 days ago* (last edited 1 day ago) (11 children)

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.

Edit: Here the link to the setup description. Please tell me if something is not clear or you find an error. https://codeberg.org/skjalli/jellyfin-vps-setup

[–] CarlosSpicyWiener@lemmy.world 11 points 2 days ago (2 children)

I am interested in your docker compose

[–] skoell13@feddit.org 12 points 2 days ago

Will share this evening after work.

[–] skoell13@feddit.org 5 points 1 day ago (2 children)

https://codeberg.org/skjalli/jellyfin-vps-setup here you go, took me longer than expected and I hope it's helpful, might contain a few errors since I had to remove some settings but I guess this should work.

load more comments (2 replies)
load more comments (10 replies)
[–] Rookeh@startrek.website 27 points 2 days ago* (last edited 2 days ago) (1 children)

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.

[–] lambda@programming.dev 6 points 2 days ago (1 children)

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.

[–] Rookeh@startrek.website 3 points 1 day ago

Right now none of the native clients support SSO. It is a frequently requested feature but, unfortunately, it doesn't look like it will be implemented any time soon. As with many OSS projects it is probably a case of "you want it, you build it" - but nobody has actually stepped up.

[–] borax7385@lemmy.world 17 points 2 days ago (1 children)

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

[–] nullPointer@programming.dev 10 points 2 days ago

also have jellyfin disable the account after a number of failed logins.

[–] drmoose@lemmy.world 16 points 2 days ago (4 children)

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.

[–] irmadlad@lemmy.world 6 points 2 days ago

Love tailscale. The only issue I had with it is making it play nice with my local, daily driver VPN. Got it worked out tho. So, now everything is jippity jippity.

load more comments (3 replies)
[–] SpaceCadet@feddit.nl 7 points 1 day ago

What I used to do was: I put jellyfin behind an nginx reverse proxy, on a separate vhost (so on a unique domain). Then I added basic authentication (a htpasswd file) with an unguessable password on the whole domain. Then I added geoip firewall rules so that port 443 was only reachable from the country I was in. I live in small country, so this significantly limits exposure.

Downside of this approach: basic auth is annoying. The jellyfin client doesn't like it ... so I had to use a browser to stream.

Nowadays, I put all my services behind a wireguard VPN and I expose nothing else. Only issue I've had is when I was on vacation in a bnb and they used the same IP range as my home network :-|

[–] gagootron@feddit.org 7 points 1 day ago (5 children)

I use good ol' obscurity. My reverse proxy requires that the correct subdomain is used to access any service that I host and my domain has a wildcard entry. So if you access asdf.example.com you get an error, the same for directly accessing my ip, but going to jellyfin.example.com works. And since i don't post my valid urls anywhere no web-scraper can find them. This filters out 99% of bots and the rest are handled using authelia and crowdsec

Are you using HTTPS? It's highly likely that your domains/certificates are being logged for certificate transparency. Unless you're using wildcard domains, it's very easy to enumerate your sub-domains.

load more comments (4 replies)
[–] Batman@lemmy.world 7 points 1 day ago (1 children)

I am using tailscale but I went a little further to let my family log in with their Gmail( they will not make any account for 1 million dollars)

Tailscale funneled Jellyfin Keycloak (adminless)

Private Tailscale Keycloak admin Postgres dB

I hook up jellyfin to Keycloak (adminless) using the sso plugin. And hook Keycloak up (using the private instance) to use Google as an identity provider with a private app.

[–] lambda@programming.dev 3 points 1 day ago (2 children)

SSO plugin is good to know about. Does that address any of the issues with security that someone was previously talking about?

load more comments (2 replies)
[–] Kusimulkku@lemm.ee 6 points 1 day ago

I've put it behind WireGuard since only my wife and I use it. Otherwise I'd just use Caddy or other such reverse proxy that does https and then keep Jellyfin and Caddy up to date.

[–] jagged_circle@feddit.nl 5 points 2 days ago (1 children)

I have another site on a different port that sits behind basic auth and adds the IP to a short ipset whitelist.

So first I have to auth into that site with basic auth, then I load jellyfin on the other port.

[–] Overboard8171@startrek.website 3 points 1 day ago (1 children)

I don't understand how that isn't widely deployed. I call it poor man's Zero Trust.

load more comments (1 replies)
[–] GreenKnight23@lemmy.world 3 points 1 day ago (2 children)

setup a WAF appliance and forward traffic through it to your current installation.

load more comments (2 replies)
[–] ocean@lemmy.selfhostcat.com 3 points 2 days ago (1 children)

You could put authentik in front of it too

[–] exu@feditown.com 11 points 2 days ago (4 children)

I think that breaks most clients

load more comments (4 replies)
[–] fennec@lemm.ee 3 points 1 day ago

Whats your setup? I just Ngnix Proxy Manager, Jellyfin etc in Docker. Modify ufw rules and also install this on the server (linux) https://github.com/friendly-bits/geoip-shell

load more comments
view more: next ›