Skip to content
Snippets Groups Projects
Commit 9be73d34 authored by 🥺's avatar 🥺 :transgender_flag: Committed by 🥺
Browse files

update debian systemd unit to use notify and harden/update it more

parent 3ff5bc52
No related branches found
No related tags found
No related merge requests found
[Unit] [Unit]
Description=Conduit Matrix homeserver Description=Conduit Matrix homeserver
After=network.target After=network-online.target
[Service] [Service]
DynamicUser=yes DynamicUser=yes
User=_matrix-conduit User=_matrix-conduit
Group=_matrix-conduit Group=_matrix-conduit
Type=simple Type=notify
AmbientCapabilities= AmbientCapabilities=
CapabilityBoundingSet= CapabilityBoundingSet=
DevicePolicy=closed
LockPersonality=yes LockPersonality=yes
MemoryDenyWriteExecute=yes MemoryDenyWriteExecute=yes
NoNewPrivileges=yes NoNewPrivileges=yes
ProcSubset=pid
ProtectClock=yes ProtectClock=yes
ProtectControlGroups=yes ProtectControlGroups=yes
ProtectHome=yes ProtectHome=yes
...@@ -20,26 +23,33 @@ ProtectHostname=yes ...@@ -20,26 +23,33 @@ ProtectHostname=yes
ProtectKernelLogs=yes ProtectKernelLogs=yes
ProtectKernelModules=yes ProtectKernelModules=yes
ProtectKernelTunables=yes ProtectKernelTunables=yes
ProtectProc=invisible
ProtectSystem=strict ProtectSystem=strict
PrivateDevices=yes PrivateDevices=yes
PrivateMounts=yes PrivateMounts=yes
PrivateTmp=yes PrivateTmp=yes
PrivateUsers=yes PrivateUsers=yes
PrivateIPC=yes
RemoveIPC=yes RemoveIPC=yes
RestrictAddressFamilies=AF_INET AF_INET6 RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
RestrictNamespaces=yes RestrictNamespaces=yes
RestrictRealtime=yes RestrictRealtime=yes
RestrictSUIDSGID=yes RestrictSUIDSGID=yes
SystemCallArchitectures=native SystemCallArchitectures=native
SystemCallFilter=@system-service SystemCallFilter=@system-service
SystemCallFilter=~@clock @debug @module @mount @reboot @swap @cpu-emulation @obsolete @timer @chown @setuid @resources @privileged @keyring @ipc
SystemCallErrorNumber=EPERM SystemCallErrorNumber=EPERM
StateDirectory=matrix-conduit StateDirectory=matrix-conduit
RuntimeDirectory=conduit
RuntimeDirectoryMode=0750
Environment="CONDUIT_CONFIG=/etc/matrix-conduit/conduit.toml" Environment="CONDUIT_CONFIG=/etc/matrix-conduit/conduit.toml"
ExecStart=/usr/sbin/matrix-conduit ExecStart=/usr/sbin/matrix-conduit
Restart=on-failure Restart=on-failure
RestartSec=10 RestartSec=5
StartLimitInterval=1m StartLimitInterval=1m
StartLimitBurst=5 StartLimitBurst=5
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment