File tree 1 file changed +33
-0
lines changed
1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,39 @@ Restart=on-failure
17
17
ExecStart =/gotosocial/gotosocial --config-path config.yaml server start
18
18
WorkingDirectory =/gotosocial
19
19
20
+ StandardOutput =append:/var/log/gotosocial/gotosocial.log
21
+ StandardError =inherit
22
+
23
+
24
+ # Sandboxing options to harden security
25
+ # Details for these options: https://www.freedesktop.org/software/systemd/man/systemd.exec.html
26
+ NoNewPrivileges =yes
27
+ PrivateTmp =yes
28
+ PrivateDevices =yes
29
+ RestrictAddressFamilies =AF_UNIX AF_INET AF_INET6
30
+ RestrictNamespaces =yes
31
+ RestrictRealtime =yes
32
+ DevicePolicy =closed
33
+ ProtectSystem =full
34
+ ProtectControlGroups =yes
35
+ ProtectKernelModules =yes
36
+ ProtectKernelTunables =yes
37
+ LockPersonality =yes
38
+ SystemCallFilter =~@clock @debug @module @mount @obsolete @reboot @setuid @swap
39
+
40
+ # Denying access to capabilities that should not be relevant
41
+ # Doc: https://man7.org/linux/man-pages/man7/capabilities.7.html
42
+ CapabilityBoundingSet =~CAP_RAWIO CAP_MKNOD
43
+ CapabilityBoundingSet =~CAP_AUDIT_CONTROL CAP_AUDIT_READ CAP_AUDIT_WRITE
44
+ CapabilityBoundingSet =~CAP_SYS_BOOT CAP_SYS_TIME CAP_SYS_MODULE CAP_SYS_PACCT
45
+ CapabilityBoundingSet =~CAP_LEASE CAP_LINUX_IMMUTABLE CAP_IPC_LOCK
46
+ CapabilityBoundingSet =~CAP_BLOCK_SUSPEND CAP_WAKE_ALARM
47
+ CapabilityBoundingSet =~CAP_SYS_TTY_CONFIG
48
+ CapabilityBoundingSet =~CAP_MAC_ADMIN CAP_MAC_OVERRIDE
49
+ CapabilityBoundingSet =~CAP_NET_ADMIN CAP_NET_BROADCAST CAP_NET_RAW
50
+ CapabilityBoundingSet =~CAP_SYS_ADMIN CAP_SYS_PTRACE CAP_SYSLOG
51
+
52
+
20
53
[Install]
21
54
WantedBy =default.target
22
55
You can’t perform that action at this time.
0 commit comments