diff --git a/docs/cryptpad.service b/docs/cryptpad.service index bb5cac6fb..4218143a4 100644 --- a/docs/cryptpad.service +++ b/docs/cryptpad.service @@ -20,5 +20,40 @@ Environment='PWD="/home/cryptpad/cryptpad"' # or risk EMFILE errors. LimitNOFILE=1000000 +# Proc filesystem +ProcSubset=all +ProtectProc=invisible +# Capabilities +CapabilityBoundingSet= +# Security +NoNewPrivileges=true +# Sandboxing +ProtectSystem=strict +PrivateTmp=true +PrivateDevices=true +ProtectHostname=true +ProtectKernelLogs=true +ProtectKernelModules=true +ProtectKernelTunables=true +ProtectControlGroups=true +RestrictAddressFamilies=AF_INET +RestrictAddressFamilies=AF_INET6 +RestrictAddressFamilies=AF_NETLINK +RestrictAddressFamilies=AF_UNIX +RestrictNamespaces=true +LockPersonality=true +RestrictRealtime=true +RestrictSUIDSGID=true +RemoveIPC=true +PrivateMounts=true +ProtectClock=true +# System Call Filtering +SystemCallArchitectures=native +SystemCallFilter=~@cpu-emulation @debug @keyring @ipc @mount @obsolete @privileged @setuid +SystemCallFilter=@chown +SystemCallFilter=pipe +SystemCallFilter=pipe2 +ReadWritePaths=/home/cryptpad/cryptpad + [Install] WantedBy=multi-user.target