peertube.service 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. [Unit]
  2. Description=PeerTube daemon
  3. After=network.target postgresql.service redis-server.service
  4. [Service]
  5. Type=simple
  6. Environment=NODE_ENV=production
  7. Environment=NODE_CONFIG_DIR=/var/www/peertube/config
  8. User=peertube
  9. Group=peertube
  10. ExecStart=/usr/bin/node dist/server
  11. WorkingDirectory=/var/www/peertube/peertube-latest
  12. SyslogIdentifier=peertube
  13. Restart=always
  14. ; Some security directives.
  15. ; Mount /usr, /boot, and /etc as read-only for processes invoked by this service.
  16. ProtectSystem=full
  17. ; Sets up a new /dev mount for the process and only adds API pseudo devices
  18. ; like /dev/null, /dev/zero or /dev/random but not physical devices. Disabled
  19. ; by default because it may not work on devices like the Raspberry Pi.
  20. PrivateDevices=false
  21. ; Ensures that the service process and all its children can never gain new
  22. ; privileges through execve().
  23. NoNewPrivileges=true
  24. ; This makes /home, /root, and /run/user inaccessible and empty for processes invoked
  25. ; by this unit. Make sure that you do not depend on data inside these folders.
  26. ProtectHome=true
  27. ; Drops the sys admin capability from the daemon.
  28. CapabilityBoundingSet=~CAP_SYS_ADMIN
  29. [Install]
  30. WantedBy=multi-user.target