From 25ecb12060effb71f40df1050f22707e2dcd9416 Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Thu, 29 Jan 2026 13:40:32 +0100 Subject: [PATCH] feat(jellyfin): add logrotate instead of reducing log level (#11326) --- frontend/public/json/jellyfin.json | 4 ++++ install/jellyfin-install.sh | 15 +++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/frontend/public/json/jellyfin.json b/frontend/public/json/jellyfin.json index 9d7725d45..7bcfab60e 100644 --- a/frontend/public/json/jellyfin.json +++ b/frontend/public/json/jellyfin.json @@ -43,6 +43,10 @@ { "text": "For NVIDIA graphics cards, you'll need to install the same drivers in the container that you did on the host. In the container, run the driver installation script and add the CLI arg --no-kernel-module", "type": "info" + }, + { + "text": "Log rotation is configured in /etc/logrotate.d/jellyfin. To reduce verbosity, change MinimumLevel in /etc/jellyfin/logging.json to Warning or Error (disables fail2ban auth logging).", + "type": "info" } ] } diff --git a/install/jellyfin-install.sh b/install/jellyfin-install.sh index 2a9b3c16a..e32e383c6 100644 --- a/install/jellyfin-install.sh +++ b/install/jellyfin-install.sh @@ -39,8 +39,19 @@ EOF $STD apt update $STD apt install -y jellyfin -sed -i 's/"MinimumLevel": "Information"/"MinimumLevel": "Error"/g' /etc/jellyfin/logging.json - +# Configure log rotation to prevent disk fill (keeps fail2ban compatibility) (PR: #1690 / Issue: #11224) +cat </etc/logrotate.d/jellyfin +/var/log/jellyfin/*.log { + daily + rotate 3 + maxsize 100M + missingok + notifempty + compress + delaycompress + copytruncate +} +EOF chown -R jellyfin:adm /etc/jellyfin sleep 10 systemctl restart jellyfin