77
submitted 15 hours ago by kiol@discuss.online to c/selfhosted@lemmy.world

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

top 50 comments
sorted by: hot top new old
[-] NeryK@sh.itjust.works 1 points 9 minutes ago

For a remote and non-technical user I would say IP whitelisting offers a decent tradeoff.

On your end you expose your jellyfin port to internet, but restrict at the router level to your user's client IP address as soon as you have it. Obviously in practice this works best if the address does not change often.

[-] kcweller@feddit.nl 1 points 42 minutes ago

Set up a reverse proxy with https always on. And get a good (physical) firewall, preferably something akin to opnsense, pfsense, openwrt. Exposing is always a risk, and if you do want it, you have to bear the responsibility for your own security. Keep things up to date, set up monitoring and a good logging system (Wazuh) comes to mind.

Exposure means a security risk. How you deal with that security risk is your choice.

Cloudflare and the likes forbid usage of their stuff for these things.

[-] DecentM@lemmy.blahaj.zone 1 points 50 minutes ago

Not at all, there's legal risk if you're hosting your blurays. Cloudflare even explicitly forbids such use. VPN or nothing imo.

[-] sturmblast@lemmy.world 1 points 56 minutes ago

Tailscale or cloudflare

[-] njordomir@lemmy.world 2 points 3 hours ago* (last edited 3 hours ago)

I toyed with the idea of exposing ports and decided against it. I don't understand networking well enough yet. For me specifically, VPN access has been perfectly workable in the US with both speed and ease of access.

Can you use fail2ban on Jellyfin? That might be a wise step.

[-] skoell13@feddit.org 1 points 3 hours ago

I use a Wireguard tunnel to a VPS and fail2ban with geoblocking: https://codeberg.org/skjalli/jellyfin-vps-setup

[-] Nibodhika@lemmy.world 6 points 7 hours ago

Secure is relative, you should be aware that jellyfin itself has security issues https://github.com/jellyfin/jellyfin/issues/5415 most of which are harmless, but at least one is fairly serious and allows people to watch your media without authentication, and adding an extra layer of authentication on the proxy would likely cause issues with clients.

That being said, if you're okay with those security issues what I would do is have a cheap VPS, connect both machines to tailscale, and have something like Caddy on the VPS to do the forwarding.

[-] exu@feditown.com 22 points 6 hours ago

Just leaving this here

Now, let's address this clearly once and for all. What is possible is unauthenticated streaming. Each item in a Jellyfin library has a UUID generated which is based on a checksum of the file path. So, theoretically, if someone knows your exact media paths, they could calculate the item IDs, and then use that ItemID to initiate an unauthenticated stream of the media. As far as we know this has never actually been seen in the wild. This does not affect anything else - all other configuration/management endpoints are behind user authentication. Is this suboptimal? Yes. Is this a massive red-flag security risk that actively exposes your data to the Internet? No.

https://github.com/jellyfin/jellyfin/issues/5415#issuecomment-2825240290

[-] Nibodhika@lemmy.world 3 points 3 hours ago

Except most people have almost the same structure because of media organizers like radarr/sonarr. At the very least they should hide that behind a setting to not require auth (since the header should be there for most clients) so only people running an old client would be affected. They could also add an extra salt to that hash or something similar.

I agree, it's not critical, but it shouldn't be hand waved either. And like I said, security is relative, I would argue for most people this is fine, but I still think this should be taken more seriously.

[-] BakedCatboy@lemmy.ml 1 points 1 hour ago

Yeah not only would a lot of people have the same media name, because of docker mounts, probably a lot of people have the same path to the media inside of the docker container even if the external location is different. I bet you could make a rainbow table of sorts of the most popular movie/TV torrents combined with the most common place in the container for media to be mounted, then use shodan to get a list of hundreds of instances that you could scan for the common hashes.

I'm just seeing the issue for the first time and noticed it was raised 5 years ago - surely that was enough time to at least put forward a changeover date and give clients time to update.

[-] Appoxo@lemmy.dbzer0.com 3 points 3 hours ago

It really seems overblown of an issue...

[-] androidul@lemmy.world 2 points 5 hours ago

afaik but I’m not sure, Jellyfin lacks support for OIDC AuthN which is a clear sign that you cannot expose this publicly.

[-] IratePirate@feddit.org 3 points 4 hours ago* (last edited 3 hours ago)

~~There's a plugin for that.~~ Plugin is arrived and will become outdated (and unsafe to use) over time. Don't use it.

[-] androidul@lemmy.world 3 points 4 hours ago
[-] IratePirate@feddit.org 2 points 3 hours ago* (last edited 3 hours ago)

Oops. I tried it in the past and just linked to quickly without taking a close look at the repo. I've updated the above posting. Thanks for pointing this out.

[-] Appoxo@lemmy.dbzer0.com 1 points 3 hours ago

If that is the same as oAuth, that can be done with a plugin.
But yes, that's not native.

[-] 8j1obzlb@piefed.social 9 points 10 hours ago

I agree with the folks saying reverse proxy of some kind + WAF. That way end users don’t have to deal with the VPN, but your home system is not directly exposed.

I’ve been doing something similar with SSH local port forwarding and a $5/month VPS. Haven’t come anywhere close to my network quotas, and performance has not been an issue for home use with 2-5 concurrent users most of the time. I forward the local caddy ports to unprivileged ports/user on the VPS, then use the firewall on the VPS to forward that port to 443 and lock down the rest.

[-] 8j1obzlb@piefed.social 3 points 10 hours ago

That said, VPN would be much more manageable if I was trying to really push performance or scale out the network.

[-] blah3166@piefed.social 6 points 10 hours ago

best practice states security through obscurity is not to be relied upon, but compare ssh logs after one year on the default port vs a non-standard port and you'll immediately see why you want to use a non-standard https port for non-professional services. it cuts 99.9% of the noise/attempts.

[-] slazer2au@lemmy.world 59 points 15 hours 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 14 points 15 hours 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/

Depends on what you mean by "secure." My personal setup is Jellyfin LXC on proxmox --> Wireguard to VPS -> Nginx reverse proxy on VPS.

This setup relies somewhat on Jellyfin's auth, but I'm comfortable with that risk. The LXC is blocked from sending local traffic on my network by firewall rules. Yes, someone could exploit a vulnerability in Jellyfin (though looking through the CVEs I'm not overly worried about that), then escape the LXC and fuck with my server. But that's a lot of work for no profit.

For more protection (in sense of reducing traffic that even interacts with your server), I'd recommend getting a wildcard cert for the domain so that the actual subdomain jellyfin is on is undisclosed to anyone not using your service.

Security isn't about making everything impregnable, it's about making attacks more trouble than they're worth. Otherwise, we'd all live in fortified bunkers surrounded by landmines. 🙃

[-] atzanteol@sh.itjust.works 5 points 8 hours ago

Your vps isn't doing anything useful security wise.. it's just sending traffic directly to jellyfin.

You'd get the same protection with just port forwarding to a local proxy in front of jellyfin. Or you could even leave out the proxy if you didn't need it.

I'm aware of this (that's why I described a potential breach as Jellyfin -> LXC escape). What it does provide me is a static IP to point my domain at that I don't have to worry about updating via whatever DDNS service and that isn't tied to my home address. That and the wireguard tunnel gives me plausible deniability should my ISP ever decide to enforce its rules against hosting servers. 😀

load more comments (2 replies)
[-] cupcakezealot@piefed.blahaj.zone 9 points 12 hours 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

load more comments (1 replies)
[-] prenatal_confusion@feddit.org 22 points 15 hours ago

Reverse proxy with auth in front of the actual jellyfin login. Like pangolin.

[-] BakedCatboy@lemmy.ml 10 points 13 hours 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?

[-] clb92@feddit.dk 1 points 34 minutes ago* (last edited 34 minutes 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 1 points 9 minutes ago* (last edited 8 minutes ago)

Gotcha yeah, I did this for LunaSea with traefik forward auth for the arrs, but the lack of support in jellyfin clients is annoying. Though personally I've been waiting 5 years for Findroid to support transcoded streams / adjusting video quality so personally that's higher on my list of priorities.

[-] prenatal_confusion@feddit.org 1 points 1 hour ago
[-] BakedCatboy@lemmy.ml 1 points 1 hour 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.

load more comments (3 replies)
[-] SteveTech@aussie.zone 10 points 13 hours 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.

[-] eutampieri@feddit.it 2 points 5 hours ago* (last edited 5 hours ago)
[-] timbuck2themoon@sh.itjust.works 1 points 1 hour ago

Not a terrible idea but im not sure rokus or fire sticks or whatever even have this capability.

[-] skeevy_scallops@feddit.online 7 points 13 hours 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.

[-] darcmage@lemmy.dbzer0.com 4 points 11 hours ago
[-] skeevy_scallops@feddit.online 3 points 10 hours ago

I haven't had any issues like that. It's been pretty plug and play and I have it set up for some family that are accessing it from out of town. No problems except for the big cloudflare outage that happened a while ago.

[-] irotsoma@piefed.blahaj.zone 5 points 12 hours 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.

[-] INeedMana@piefed.zip 6 points 13 hours 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

load more comments
view more: next ›
this post was submitted on 23 May 2026
77 points (97.5% liked)

Selfhosted

59417 readers
3022 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.

  7. No low-effort posts. This is subjective and will largely be determined by the community member reports.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 3 years ago
MODERATORS