conduit/debian/matrix-conduit.service
strawberry 0972079319 raise default systemd unit start/stop timeout
default of 90 seconds can be too low if hardware is not very fast
and rocksdb compaction or shutdown takes too long

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-24 13:04:13 -05:00

60 lines
1.2 KiB
Desktop File

[Unit]
Description=conduwuit Matrix homeserver
After=network-online.target
[Service]
DynamicUser=yes
User=_matrix-conduit
Group=_matrix-conduit
Type=notify
AmbientCapabilities=
CapabilityBoundingSet=
DevicePolicy=closed
LockPersonality=yes
MemoryDenyWriteExecute=yes
NoNewPrivileges=yes
ProcSubset=pid
ProtectClock=yes
ProtectControlGroups=yes
ProtectHome=yes
ProtectHostname=yes
ProtectKernelLogs=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
ProtectProc=invisible
ProtectSystem=strict
PrivateDevices=yes
PrivateMounts=yes
PrivateTmp=yes
PrivateUsers=yes
PrivateIPC=yes
RemoveIPC=yes
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
RestrictNamespaces=yes
RestrictRealtime=yes
RestrictSUIDSGID=yes
SystemCallArchitectures=native
SystemCallFilter=@system-service
SystemCallFilter=~@clock @debug @module @mount @reboot @swap @cpu-emulation @obsolete @timer @chown @setuid @resources @privileged @keyring @ipc
SystemCallErrorNumber=EPERM
StateDirectory=matrix-conduit
RuntimeDirectory=conduit
RuntimeDirectoryMode=0750
Environment="CONDUIT_CONFIG=/etc/matrix-conduit/conduit.toml"
ExecStart=/usr/sbin/matrix-conduit
Restart=on-failure
RestartSec=5
TimeoutStopSec=4m
TimeoutStartSec=4m
StartLimitInterval=1m
StartLimitBurst=5
[Install]
WantedBy=multi-user.target