miniflux.service 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. [Unit]
  9. Description=Miniflux
  10. Documentation=man:miniflux(1) https://miniflux.app/docs/index.html
  11. After=network.target postgresql.service
  12. [Service]
  13. ExecStart=/usr/bin/miniflux
  14. User=miniflux
  15. # Load environment variables from /etc/miniflux.conf.
  16. EnvironmentFile=/etc/miniflux.conf
  17. # Miniflux uses sd-notify protocol to notify about it's readiness.
  18. Type=notify
  19. # Enable watchdog.
  20. WatchdogSec=60s
  21. WatchdogSignal=SIGKILL
  22. # Automatically restart Miniflux if it crashes.
  23. Restart=always
  24. RestartSec=5
  25. # Allocate a directory at /run/miniflux for Unix sockets.
  26. RuntimeDirectory=miniflux
  27. # Allow Miniflux to bind to privileged ports.
  28. AmbientCapabilities=CAP_NET_BIND_SERVICE
  29. # Make the system tree read-only.
  30. ProtectSystem=strict
  31. # Allocate a separate /tmp.
  32. PrivateTmp=yes
  33. # Ensure the service can never gain new privileges.
  34. NoNewPrivileges=yes
  35. # Prohibit access to any kind of namespacing.
  36. RestrictNamespaces=yes
  37. # Make home directories inaccessible.
  38. ProtectHome=yes
  39. # Make device nodes except for /dev/null, /dev/zero, /dev/full,
  40. # /dev/random and /dev/urandom inaccessible.
  41. PrivateDevices=yes
  42. # Make cgroup file system hierarchy inaccessible.
  43. ProtectControlGroups=yes
  44. # Deny kernel module loading.
  45. ProtectKernelModules=yes
  46. # Make kernel variables (e.g. /proc/sys) read-only.
  47. ProtectKernelTunables=yes
  48. # Deny hostname changing.
  49. ProtectHostname=yes
  50. # Deny realtime scheduling.
  51. RestrictRealtime=yes
  52. # Deny access to the kernel log ring buffer.
  53. ProtectKernelLogs=yes
  54. # Deny setting the hardware or system clock.
  55. ProtectClock=yes
  56. # Filter dangerous system calls. The following is listed as safe basic
  57. # choice in systemd.exec(5).
  58. SystemCallArchitectures=native
  59. # Deny kernel execution domain changing.
  60. LockPersonality=yes
  61. # Deny memory mappings that are writable and executable.
  62. MemoryDenyWriteExecute=yes
  63. [Install]
  64. WantedBy=multi-user.target