mirror of
https://github.com/navidrome/navidrome.git
synced 2024-09-11 20:12:54 +02:00
![Paul TREHIOU](/assets/img/avatar_default.png)
Applied suggestions from `systemd-analyze` and also using StateDirectory to ensure /var/lib/navidrome exists and is writeable
56 lines
1.5 KiB
Desktop File
56 lines
1.5 KiB
Desktop File
# This file ususaly goes in /etc/systemd/system
|
|
|
|
[Unit]
|
|
Description=Navidrome Music Server and Streamer compatible with Subsonic/Airsonic
|
|
After=remote-fs.target network.target
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
|
|
[Service]
|
|
User=navidrome
|
|
Group=navidrome
|
|
Type=simple
|
|
ExecStart=/usr/bin/navidrome
|
|
StateDirectory=navidrome
|
|
WorkingDirectory=/var/lib/navidrome
|
|
TimeoutStopSec=20
|
|
KillMode=process
|
|
Restart=on-failure
|
|
|
|
EnvironmentFile=-/etc/sysconfig/navidrome
|
|
|
|
# See https://www.freedesktop.org/software/systemd/man/systemd.exec.html
|
|
CapabilityBoundingSet=
|
|
DevicePolicy=closed
|
|
NoNewPrivileges=yes
|
|
LockPersonality=yes
|
|
PrivateTmp=yes
|
|
PrivateUsers=yes
|
|
ProtectControlGroups=yes
|
|
ProtectKernelModules=yes
|
|
ProtectKernelTunables=yes
|
|
ProtectClock=yes
|
|
ProtectHostname=yes
|
|
ProtectKernelLogs=yes
|
|
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
|
|
RestrictNamespaces=yes
|
|
RestrictRealtime=yes
|
|
SystemCallFilter=@system-service
|
|
SystemCallFilter=~@privileged @resources
|
|
SystemCallArchitectures=native
|
|
UMask=0066
|
|
|
|
# You can uncomment the following line if you're not using the jukebox This
|
|
# will prevent navidrome from accessing any real (physical) devices
|
|
#PrivateDevices=yes
|
|
|
|
# You can change the following line to `strict` instead of `full` if you don't
|
|
# want navidrome to be able to write anything on your filesystem outside of
|
|
# /var/lib/navidrome.
|
|
ProtectSystem=full
|
|
|
|
# You can comment the following line if you don't have any media in /home/*.
|
|
# This will prevent navidrome from ever reading/writing anything there.
|
|
ProtectHome=true
|