-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgateway-hub.service
More file actions
54 lines (48 loc) · 1.26 KB
/
Copy pathgateway-hub.service
File metadata and controls
54 lines (48 loc) · 1.26 KB
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=Gateway Hub (tenant registry, mTLS CA, admin API)
After=network-online.target
Wants=network-online.target
StartLimitIntervalSec=120
StartLimitBurst=5
[Service]
Type=simple
User=gateway
Group=gateway
ExecStart=/usr/local/bin/gateway-hub --config=/etc/gateway/config.yaml
Restart=on-failure
RestartSec=5s
LimitNOFILE=65535
Environment=GOMEMLIMIT=1GiB
# Directories — systemd creates/cleans these automatically.
RuntimeDirectory=gateway
RuntimeDirectoryMode=0750
StateDirectory=gateway gateway/hub gateway/tor
StateDirectoryMode=0700
LogsDirectory=gateway
LogsDirectoryMode=0750
# --- Sandboxing: minimum privilege. ---
ProtectSystem=strict
ProtectHome=yes
PrivateTmp=yes
PrivateDevices=yes
ProtectKernelTunables=yes
ProtectKernelModules=yes
ProtectControlGroups=yes
ProtectClock=yes
ProtectHostname=yes
ProtectKernelLogs=yes
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_NETLINK
RestrictNamespaces=yes
RestrictRealtime=yes
RestrictSUIDSGID=yes
LockPersonality=yes
MemoryDenyWriteExecute=yes
SystemCallArchitectures=native
SystemCallFilter=@system-service
SystemCallFilter=~@privileged @resources
NoNewPrivileges=yes
CapabilityBoundingSet=
AmbientCapabilities=
ReadWritePaths=/var/lib/gateway /var/log/gateway /run/gateway
[Install]
WantedBy=multi-user.target