You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.1 KiB

  1. [Unit]
  2. Description=mastodon-web
  3. After=network.target
  4. [Service]
  5. Type=simple
  6. User=mastodon
  7. WorkingDirectory=/home/mastodon/live
  8. Environment="RAILS_ENV=production"
  9. Environment="PORT=3000"
  10. Environment="LD_PRELOAD=libjemalloc.so"
  11. ExecStart=/home/mastodon/.rbenv/shims/bundle exec puma -C config/puma.rb
  12. ExecReload=/bin/kill -SIGUSR1 $MAINPID
  13. TimeoutSec=15
  14. Restart=always
  15. # Capabilities
  16. CapabilityBoundingSet=
  17. # Security
  18. NoNewPrivileges=true
  19. # Sandboxing
  20. ProtectSystem=strict
  21. PrivateTmp=true
  22. PrivateDevices=true
  23. PrivateUsers=true
  24. ProtectHostname=true
  25. ProtectKernelLogs=true
  26. ProtectKernelModules=true
  27. ProtectKernelTunables=true
  28. ProtectControlGroups=true
  29. RestrictAddressFamilies=AF_INET
  30. RestrictAddressFamilies=AF_INET6
  31. RestrictAddressFamilies=AF_NETLINK
  32. RestrictAddressFamilies=AF_UNIX
  33. RestrictNamespaces=true
  34. LockPersonality=true
  35. RestrictRealtime=true
  36. RestrictSUIDSGID=true
  37. PrivateMounts=true
  38. ProtectClock=true
  39. # System Call Filtering
  40. SystemCallArchitectures=native
  41. SystemCallFilter=~@clock @cpu-emulation @debug @keyring @module @mount @obsolete @raw-io @reboot @resources @setuid @swap
  42. [Install]
  43. WantedBy=multi-user.target