Debian Codegraph @

packaging/systemd/miniflux.service

raw
1 # Changing the systemd config can be done like this:
2 # 1) Edit the config file: systemctl edit --full miniflux
3 # 2) Restart the process: systemctl restart miniflux
4 # All your changes can be reverted with `systemctl revert miniflux.service`.
5 # See https://wiki.archlinux.org/index.php/Systemd#Editing_provided_units.
6 # Also see https://www.freedesktop.org/software/systemd/man/systemd.service.html
7 # for available configuration options in this file.
8
9 [Unit]
10 Description=Miniflux
11 Documentation=man:miniflux(1) https://miniflux.app/docs/index.html
12 After=network.target postgresql.service
13
14 [Service]
15 ExecStart=/usr/bin/miniflux
16 User=miniflux
17
18 # Load environment variables from /etc/miniflux.conf.
19 EnvironmentFile=/etc/miniflux.conf
20
21 # Miniflux uses sd-notify protocol to notify about it's readiness.
22 Type=notify
23
24 # Enable watchdog.
25 WatchdogSec=60s
26 WatchdogSignal=SIGKILL
27
28 # Automatically restart Miniflux if it crashes.
29 Restart=always
30 RestartSec=5
31
32 # Allocate a directory at /run/miniflux for Unix sockets.
33 RuntimeDirectory=miniflux
34
35 # Allow Miniflux to bind to privileged ports.
36 AmbientCapabilities=CAP_NET_BIND_SERVICE
37
38 # Make the system tree read-only.
39 ProtectSystem=strict
40
41 # Allocate a separate /tmp.
42 PrivateTmp=yes
43
44 # Ensure the service can never gain new privileges.
45 NoNewPrivileges=yes
46
47 # Prohibit access to any kind of namespacing.
48 RestrictNamespaces=yes
49
50 # Make home directories inaccessible.
51 ProtectHome=yes
52
53 # Make device nodes except for /dev/null, /dev/zero, /dev/full,
54 # /dev/random and /dev/urandom inaccessible.
55 PrivateDevices=yes
56
57 # Make cgroup file system hierarchy inaccessible.
58 ProtectControlGroups=yes
59
60 # Deny kernel module loading.
61 ProtectKernelModules=yes
62
63 # Make kernel variables (e.g. /proc/sys) read-only.
64 ProtectKernelTunables=yes
65
66 # Deny hostname changing.
67 ProtectHostname=yes
68
69 # Deny realtime scheduling.
70 RestrictRealtime=yes
71
72 # Deny access to the kernel log ring buffer.
73 ProtectKernelLogs=yes
74
75 # Deny setting the hardware or system clock.
76 ProtectClock=yes
77
78 # Filter dangerous system calls. The following is listed as safe basic
79 # choice in systemd.exec(5).
80 SystemCallArchitectures=native
81
82 # Deny kernel execution domain changing.
83 LockPersonality=yes
84
85 # Deny memory mappings that are writable and executable.
86 MemoryDenyWriteExecute=yes
87
88 [Install]
89 WantedBy=multi-user.target