miniflux.service 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. [Unit]
  7. Description=Miniflux
  8. After=network.target postgresql.service
  9. [Service]
  10. ExecStart=/usr/bin/miniflux
  11. EnvironmentFile=/etc/miniflux.conf
  12. User=miniflux
  13. # https://www.freedesktop.org/software/systemd/man/systemd.service.html#Type=
  14. Type=notify
  15. # https://www.freedesktop.org/software/systemd/man/systemd.service.html#WatchdogSec=
  16. WatchdogSec=60s
  17. WatchdogSignal=SIGKILL
  18. # https://www.freedesktop.org/software/systemd/man/systemd.service.html#Restart=
  19. Restart=always
  20. # https://www.freedesktop.org/software/systemd/man/systemd.service.html#RestartSec=
  21. RestartSec=5
  22. # https://www.freedesktop.org/software/systemd/man/systemd.exec.html#NoNewPrivileges=
  23. NoNewPrivileges=true
  24. # https://www.freedesktop.org/software/systemd/man/systemd.exec.html#PrivateDevices=
  25. PrivateDevices=true
  26. # https://www.freedesktop.org/software/systemd/man/systemd.exec.html#ProtectControlGroups=
  27. ProtectControlGroups=true
  28. # https://www.freedesktop.org/software/systemd/man/systemd.exec.html#ProtectHome=
  29. ProtectHome=true
  30. # https://www.freedesktop.org/software/systemd/man/systemd.exec.html#ProtectKernelModules=
  31. ProtectKernelModules=true
  32. # https://www.freedesktop.org/software/systemd/man/systemd.exec.html#ProtectKernelTunables=
  33. ProtectKernelTunables=true
  34. # https://www.freedesktop.org/software/systemd/man/systemd.exec.html#ProtectSystem=
  35. ProtectSystem=strict
  36. # https://www.freedesktop.org/software/systemd/man/systemd.exec.html#RestrictRealtime=
  37. RestrictRealtime=true
  38. # Keep at least the /run folder writeable if Miniflux is configured to use a Unix socket.
  39. # For example, the socket could be LISTEN_ADDR=/run/miniflux/miniflux.sock
  40. # https://www.freedesktop.org/software/systemd/man/systemd.exec.html#ReadWritePaths=
  41. ReadWritePaths=/run
  42. # Allow miniflux to bind to privileged ports
  43. # https://www.freedesktop.org/software/systemd/man/systemd.exec.html#AmbientCapabilities=
  44. AmbientCapabilities=CAP_NET_BIND_SERVICE
  45. [Install]
  46. WantedBy=multi-user.target