this post was submitted on 21 Apr 2025
27 points (90.9% liked)

Selfhosted

46360 readers
691 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
 

Hi,

I've been trying to set up fail2ban for jellyfin both running in docker from compose and I'm doing something wrong.

Can someone tell me what path in the docker compose file you use for jellyfin logs and what path you use in the jail.d and the filter in filter.d?

Thanks

PS. Sorry for low detail, but I'm on phone and don't have my current conf readily available. Will provide if necessary.

top 22 comments
sorted by: hot top controversial new old
[–] [email protected] 30 points 6 days ago* (last edited 6 days ago) (5 children)

If you plan to use fail2ban, I assume you want to make your Jellyfin accessible from the public internet. Please be aware, that large parts of the Jellyfin Backend are not properly authenticated and allow unauthorized, potential mapping of your library and even unauthorized streams.

https://github.com/jellyfin/jellyfin/issues/5415

[–] [email protected] 3 points 5 days ago (1 children)

Wow, I tested out jellyfin every 6 months for the last few years to see if it was ready to replace plex yet, and I had no idea about such huge security issues. There should really be a big ass warning about making jellyfin publicly accessible in the app and in setup guides..

[–] [email protected] 5 points 5 days ago* (last edited 5 days ago)

The main issue for me is the way they react to it. Not only is there no warning about this, but they also refuse to fix it because it would break client support and they prefer backwards compatibility over security

[–] [email protected] 9 points 6 days ago

Thanks for sharing; I was unaware. Just closed off that network hole.

[–] [email protected] 5 points 6 days ago (1 children)

Thank you. I did see this list before. My jellyfin instance is not exposed to the net atm., but I'm thinking of exposing it in intervals and would like to have fail2ban working when/if I do.

[–] [email protected] 2 points 5 days ago

I'm just not sure if fail2ban can mitigate the unaouthorized api access or other issues

[–] Vendetta9076 2 points 6 days ago (1 children)

Would putting jellyfin behind authentik or googleSSO protect me? Trying to figure out how to replace plex for my extended family since theyre charging for external connections now

[–] [email protected] 3 points 5 days ago (1 children)

Just be aware that putting Jellyfin behind a Reverse Proxy that redirects to external auth services, breaks client support that is not in a browser.
Thus you either white-/blacklist specific server access paths or set up accounts that may relay the loging credentials.
Maybe something like LDAP may work but I can't say how well it works as I havent used that.

[–] [email protected] 1 points 4 days ago

It works as advertised.

[–] [email protected] -1 points 5 days ago (1 children)

The solution here is to use a wireguard (or similar technology) server and use it on all your devices. People already use VPNs for everything, so adding this layer isn't that much of a hassle !

[–] [email protected] 3 points 5 days ago

That depends entirely on your target audience as well as the devices you want to use it on. Smart TVs don't really support VPNs and my parents would not know how to even activate that let alone set it up on their end. I have a lot of non tech savvy users, so Plex is just way more convenient and accessible.

[–] [email protected] 1 points 3 days ago

I wouldn't setup fail2ban in a container. Install it on the host system.

[–] [email protected] 7 points 6 days ago (1 children)

Why? Fail2ban is best placed on the host closest to a network entrypoint. Unless you're intentionally avoiding a bridged network, this isn't going to do much for your security unless the containers are directly addressed by an attached interface and an open service.

I won't go into a whole diatribe, but you should be running containers as single-process instances of applications. You only cause issues by cramming other process to run inside a container.

What are you using it to block, exactly?

[–] [email protected] 1 points 6 days ago (2 children)

Oh I can see how my title could be misunderstood - what I meant is that both jellyfin and fail2ban are running in (separate) docker containers. Not both services crammed.into one.

[–] [email protected] 0 points 6 days ago

That's worse.

Fail2ban isn't an application like jellyfin, it's a security framework that should be built in to the gateway router.

[–] [email protected] 0 points 6 days ago (1 children)

But what are you trying to use fail2ban for?

[–] [email protected] 3 points 6 days ago (1 children)

To prevent brute force login attempts into my jellyfin service.

[–] [email protected] 1 points 3 days ago

These people seem...pretty stupid tbh. Maybe they don't understand what fail2ban is, or what it does, but you should absolutely use fail2ban. Security is objectively better by just having it enabled than not for any service, not just jellyfin.

[–] [email protected] 7 points 6 days ago (1 children)

I set up fail2ban together with Caddy which runs as a reverse proxy in front of Jellyfin. I've written down my setup and maybe this will help you https://codeberg.org/skjalli/jellyfin-vps-setup

[–] [email protected] 2 points 3 days ago (1 children)

Excellent setup. It's the one I use as well.

[–] [email protected] 1 points 3 days ago

Thank you. Took me quite some time to get it all running through the Wireguard tunnel.

[–] [email protected] 2 points 6 days ago

Are you using nginx proxy manager as reverse proxy? SWAG has one built in. I'd use that instead.