miniflux.service 2.3 KB

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