summarylogtreecommitdiffstats
path: root/zendrite.service
blob: 3fac0f87d7fa587a41afbbb354982b476392bfd7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
[Unit]
Description=A second-generation Matrix homeserver written in Go
Documentation=https://zendrite.pat-s.me/
Wants=network-online.target
After=network-online.target
After=postgresql.service
After=nats-server.service

[Service]
Type=simple
ExecStart=/usr/bin/zendrite -config %d/zendrite.yaml
WorkingDirectory=%S/zendrite
ProtectProc=invisible
User=zendrite
Group=zendrite
DynamicUser=true
# Listening on port lower than 1024
AmbientCapabilities=CAP_NET_BIND_SERVICE
NoNewPrivileges=true
ProtectSystem=strict
ProtectHome=true
RuntimeDirectory=zendrite
StateDirectory=zendrite
LogsDirectory=zendrite
ConfigurationDirectory=zendrite
# If you want to connect to postgresql with Unix Domain Socket...
ReadWritePaths=-/var/run/postgresql
ReadWritePaths=-/run/postgresql
PrivateTmp=true
PrivateDevices=true
PrivateIPC=true
PrivateUsers=true
ProtectHostname=true
ProtectClock=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectKernelLogs=true
ProtectControlGroups=true
RestrictNamespaces=true
PrivateBPF=true
LockPersonality=true
MemoryDenyWriteExecute=true
RestrictRealtime=true
RestrictSUIDSGID=true
PrivateMounts=true
SystemCallFilter=@system-service
SystemCallFilter=~@privileged
SystemCallFilter=~@resources
SystemCallFilter=~@setuid
SystemCallArchitectures=native
LoadCredential=zendrite.yaml:%E/zendrite/zendrite.yaml

[Install]
WantedBy=default.target