46 lines
1.4 KiB
SYSTEMD
46 lines
1.4 KiB
SYSTEMD
|
[Unit]
|
||
|
Description=Jellyfin Media Server
|
||
|
After=network-online.target
|
||
|
|
||
|
[Service]
|
||
|
WorkingDirectory=/var/lib/jellyfin
|
||
|
ExecStart=/usr/lib/jellyfin/jellyfin ${JELLYFIN_WEB_OPT} ${JELLYFIN_RESTART_OPT} ${JELLYFIN_FFMPEG_OPT} ${JELLYFIN_SERVICE_OPT} ${JELLYFIN_NOWEBAPP_OPT}
|
||
|
TimeoutSec=15
|
||
|
Restart=on-failure
|
||
|
User=jellyfin
|
||
|
Group=jellyfin
|
||
|
|
||
|
# Environment variables
|
||
|
# To override these variables, use a drop-in systemd file.
|
||
|
# See `man 5 systemd.unit` for details.
|
||
|
|
||
|
# Program directories
|
||
|
Environment="JELLYFIN_DATA_DIR=/var/lib/jellyfin"
|
||
|
Environment="JELLYFIN_CONFIG_DIR=/etc/jellyfin"
|
||
|
Environment="JELLYFIN_LOG_DIR=/var/log/jellyfin"
|
||
|
Environment="JELLYFIN_CACHE_DIR=/var/cache/jellyfin"
|
||
|
|
||
|
# [OPTIONAL] Web client path
|
||
|
#Environment="JELLYFIN_WEB_OPT=--webdir=/usr/share/jellyfin-web"
|
||
|
|
||
|
# [OPTIONAL] In-App service control
|
||
|
#Environment="JELLYFIN_RESTART_OPT=--restartpath=/usr/lib/jellyfin/restart.sh"
|
||
|
|
||
|
# [OPTIONAL] ffmpeg binary paths, overriding the UI-configured values
|
||
|
#Environment="JELLYFIN_FFMPEG_OPT=--ffmpeg=/usr/bin/ffmpeg"
|
||
|
|
||
|
# [OPTIONAL] run Jellyfin as a headless service
|
||
|
#Environment="JELLYFIN_SERVICE_OPT=--service"
|
||
|
|
||
|
# [OPTIONAL] run Jellyfin without the web app
|
||
|
#Environment="JELLYFIN_NOWEBAPP_OPT=--noautorunwebapp"
|
||
|
|
||
|
# [OPTIONAL] run Jellyfin with ASP.NET Server Garbage Collection (uses more RAM and less CPU than Workstation GC)
|
||
|
# 0 = Workstation
|
||
|
# 1 = Server
|
||
|
#Environment="COMPlus_gcServer=1"
|
||
|
|
||
|
[Install]
|
||
|
WantedBy=multi-user.target
|
||
|
|