2024-07-10, 05:14 PM
(2024-07-10, 04:27 PM)TheDreadPirate Wrote:(2024-07-10, 04:15 PM)jaiovi Wrote: Thank you. But even then, by default /etc/systemd/system/jellyfin.service appeared like this.
Code:GNU nano 6.2 /etc/systemd/system/jellyfin.service
[Unit]
Description=Jellyfin
After=network.target
[Service]
Type=simple
User=ubuntu
Restart=always
ExecStart=/opt/jellyfin/jellyfin.sh
[Install]
WantedBy=multi-user.target
ExecStart where should point at?
That file should not exist in a "one-liner" install. A package/one-liner install will create this file.
/etc/systemd/system/multi-user.target.wants/jellyfin.service
Which looks like this.
Code:[Unit]
Description = Jellyfin Media Server
After = network-online.target
[Service]
Type = simple
EnvironmentFile = /etc/default/jellyfin
User = jellyfin
Group = jellyfin
WorkingDirectory = /var/lib/jellyfin
ExecStart = /usr/bin/jellyfin $JELLYFIN_WEB_OPT $JELLYFIN_FFMPEG_OPT $JELLYFIN_SERVICE_OPT $JELLYFIN_NOWEBAPP_OPT $JELLYFIN_ADDITIONAL_OPTS
Restart = on-failure
TimeoutSec = 15
SuccessExitStatus=0 143
[Install]
WantedBy = multi-user.target
FIXED! The possible issue is that web restart changes .service configuration.
Writing the above configuration in /etc/systemd/system/jellyfin.service , then sudo systemctl daemon-reload
Also enable user and writing in the following directories:
Code:
sudo chown -R jellyfin:jellyfin /var/lib/jellyfin
sudo chmod -R u+rw /var/lib/jellyfin
sudo chown -R jellyfin:jellyfin /etc/default/jellyfin
sudo chmod -R u+rw /etc/default/jellyfin
sudo chmod 644 /etc/jellyfin/migrations.xml
sudo systemctl start jellyfin - It's up and running. Thanks!