80 lines
3.5 KiB
INI
80 lines
3.5 KiB
INI
# Quadlet unit: Jellyfin media server (rootless, boot-persistent).
|
|
#
|
|
# Install path on dankserver: ~/.config/containers/systemd/jellyfin.container
|
|
# Unit name: jellyfin.service (podman 5.x drops the container- prefix)
|
|
#
|
|
# Data roots migrated from /opt/jellyfin to /home/dank/Containers/jellyfin at
|
|
# cutover. The library is seen through /var/lib/media-meta/view, the SSD-backed
|
|
# overlay view (scripts/media-view.sh): the array stays read-only and untouched,
|
|
# while the sidecars this server writes land on the NVMe. Every
|
|
# creation-time environment variable of the compose-era container is kept as
|
|
# an Environment= line (zero drift); none of them are secrets, so this unit
|
|
# needs no EnvironmentFile.
|
|
|
|
[Unit]
|
|
Description=Jellyfin media server container
|
|
After=network.target
|
|
|
|
[Container]
|
|
ContainerName=jellyfin
|
|
Image=ghcr.io/jellyfin/jellyfin:latest@sha256:fea863d0cd9ec445985d9c75fc6ed64e38a1d2766cf0c250a33d553f4fc1b771
|
|
Network=dankserver_appnet
|
|
Environment=DEBIAN_FRONTEND=noninteractive
|
|
Environment=DOTNET_SYSTEM_IO_DISABLEFILELOCKING=true
|
|
Environment=JELLYFIN_CACHE_DIR=/cache
|
|
Environment=JELLYFIN_CONFIG_DIR=/config/config
|
|
Environment=JELLYFIN_DATA_DIR=/config
|
|
Environment=JELLYFIN_FFMPEG=/usr/lib/jellyfin-ffmpeg/ffmpeg
|
|
Environment=JELLYFIN_LOG_DIR=/config/log
|
|
Environment=JELLYFIN_PublishedServerUrl=http://192.168.0.235:8096
|
|
Environment=JELLYFIN_WEB_DIR=/jellyfin/jellyfin-web
|
|
Environment=LANG=en_US.UTF-8
|
|
Environment=LANGUAGE=en_US:en
|
|
Environment=LC_ALL=en_US.UTF-8
|
|
Environment=LD_PRELOAD=/usr/lib/jellyfin/libjemalloc.so.2
|
|
Environment=MALLOC_TRIM_THRESHOLD_=131072
|
|
Environment=NVIDIA_DRIVER_CAPABILITIES=compute,video,utility
|
|
Environment=NVIDIA_VISIBLE_DEVICES=all
|
|
Environment=XDG_CACHE_HOME=/cache
|
|
PublishPort=8096:8096
|
|
PublishPort=8920:8920
|
|
PublishPort=7359:7359/udp
|
|
PublishPort=1900:1900/udp
|
|
Volume=/home/dank/Containers/jellyfin/config:/config
|
|
Volume=/home/dank/Containers/jellyfin/cache:/cache
|
|
# The view, writable: Jellyfin is the metadata writer (movie.nfo / tvshow.nfo /
|
|
# episode.nfo + artwork) and those bytes belong on the SSD. The gate in [Service]
|
|
# is the guard: started against a plain, unmounted view directory a scan decides
|
|
# the library is empty and deletes what it cannot see.
|
|
Volume=/var/lib/media-meta/view:/data
|
|
# Big-screen theme for the TV. The repo file replaces the container's "Media
|
|
# Center" theme slot; the upstream dark palette stays live because the file
|
|
# @imports it, so an image bump cannot strand a vendored CSS snapshot. Read-only
|
|
# — the web app only fetches it. A client opts in with
|
|
# Display Settings -> Theme -> "Media Center".
|
|
Volume=/home/dank/serverAppConfigs/dankserver/jellyfin/theme/wmc/theme.css:/jellyfin/jellyfin-web/themes/wmc/theme.css:ro
|
|
AddDevice=/dev/dri
|
|
GroupAdd=keep-groups
|
|
HealthCmd=curl -f http://localhost:8096/health
|
|
HealthInterval=30s
|
|
HealthTimeout=10s
|
|
HealthRetries=3
|
|
|
|
[Service]
|
|
# Refuse to start until the bind source is a real mount — see the header of
|
|
# scripts/wait-for-mount.sh for the blind-boot incident this prevents.
|
|
ExecStartPre=/home/dank/serverAppConfigs/scripts/wait-for-mount.sh /var/lib/media-meta/view /mnt/entropy
|
|
Restart=always
|
|
RestartSec=5
|
|
|
|
# A library scan reads the array for minutes on end. Weighted LOW (default is
|
|
# 100) so that when the array is contended a scan loses to playback and to every
|
|
# other container this user runs. Proportional share, not a cap: it changes
|
|
# nothing while the disk is idle. 10 is a convention — the requirement is only
|
|
# that it sit far below 100 — and it is inert until user@1000.service is
|
|
# delegated the io controller ([[Quadlet Lifecycle]]).
|
|
IOWeight=10
|
|
|
|
[Install]
|
|
WantedBy=default.target
|