mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-04 13:07:36 +03:00
Add a systemd startup unit
This commit is contained in:
parent
0d8a2b310f
commit
ad63b8b1b4
2 changed files with 44 additions and 0 deletions
|
@ -135,6 +135,12 @@ user.
|
||||||
|
|
||||||
For more options, run `navidrome --help`
|
For more options, run `navidrome --help`
|
||||||
|
|
||||||
|
### Running as a service
|
||||||
|
|
||||||
|
Check the [contrib](https://github.com/deluan/navidrome/tree/master/contrib)
|
||||||
|
folder for startup files for your init system.
|
||||||
|
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
|
|
38
contrib/navidrome.service
Normal file
38
contrib/navidrome.service
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
# This file ususaly goes in /etc/systemd/system
|
||||||
|
|
||||||
|
[Unit]
|
||||||
|
Description=Navidrome Daemon
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
User=navidrome
|
||||||
|
Group=navidrome
|
||||||
|
Type=simple
|
||||||
|
ExecStart=/opt/navidrome/navidrome
|
||||||
|
WorkingDirectory=/opt/navidrome
|
||||||
|
TimeoutStopSec=20
|
||||||
|
KillMode=process
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
# See https://www.freedesktop.org/software/systemd/man/systemd.exec.html
|
||||||
|
DevicePolicy=closed
|
||||||
|
NoNewPrivileges=yes
|
||||||
|
PrivateTmp=yes
|
||||||
|
PrivateUsers=yes
|
||||||
|
ProtectControlGroups=yes
|
||||||
|
ProtectKernelModules=yes
|
||||||
|
ProtectKernelTunables=yes
|
||||||
|
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
|
||||||
|
RestrictNamespaces=yes
|
||||||
|
RestrictRealtime=yes
|
||||||
|
SystemCallFilter=~@clock @debug @module @mount @obsolete @privileged @reboot @setuid @swap
|
||||||
|
ReadWritePaths=/opt/navidrome/
|
||||||
|
PrivateDevices=yes
|
||||||
|
ProtectSystem=full
|
||||||
|
ProtectHome=true
|
||||||
|
|
||||||
|
MemoryDenyWriteExecute=yes
|
||||||
|
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
Loading…
Add table
Add a link
Reference in a new issue