Krolyxon
Commit 3cb9866

ferreniumdistferrenium.service

55 lines · 1.4 KB

1[Unit]
2Description=Ferrenium git repository browser
3After=network.target
4
5[Service]
6Type=notify
7ExecStart=/usr/local/bin/ferrenium serve --config /etc/ferrenium/ferrenium.toml
8ExecReload=/bin/kill -HUP $MAINPID
9Restart=on-failure
10TimeoutStopSec=15
11
12User=git
13Group=git
14RuntimeDirectory=ferrenium
15RuntimeDirectoryMode=0755
16
17# Read-only sandbox: ferrenium never writes to disk. Check the result with
18# `systemd-analyze security ferrenium.service`.
19ProtectSystem=strict
20# The repositories live in /home/git. With a scan_path outside /home, use
21# ProtectHome=yes instead.
22ProtectHome=read-only
23PrivateTmp=yes
24PrivateDevices=yes
25DevicePolicy=closed
26ProtectKernelTunables=yes
27ProtectKernelModules=yes
28ProtectKernelLogs=yes
29ProtectControlGroups=yes
30ProtectClock=yes
31ProtectHostname=yes
32ProtectProc=invisible
33ProcSubset=pid
34NoNewPrivileges=yes
35CapabilityBoundingSet=
36AmbientCapabilities=
37RestrictNamespaces=yes
38RestrictRealtime=yes
39RestrictSUIDSGID=yes
40LockPersonality=yes
41MemoryDenyWriteExecute=yes
42SystemCallArchitectures=native
43SystemCallFilter=@system-service
44SystemCallFilter=~@privileged @resources
45SystemCallErrorNumber=EPERM
46RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
47# Only the reverse proxy on this host talks to ferrenium, and ferrenium
48# opens no outbound connections. Widen this if Caddy runs elsewhere.
49IPAddressDeny=any
50IPAddressAllow=localhost
51RemoveIPC=yes
52UMask=0077
53
54[Install]
55WantedBy=multi-user.target