summarylogtreecommitdiffstats
path: root/rimgo.service
blob: 0c56086ec25d84ec7ab48e5e513c092af3e71cea (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
[Unit]
Description=rimgo daemon
After=network.service

[Service]
DynamicUser=yes
# Default Values
Environment=ADDRESS=0.0.0.0
Environment=PORT=3000
Environment=IMGUR_CLIENT_ID=546c25a59c58ad7
Environment=FORCE_WEBP=0
# Optional Override
EnvironmentFile=-/etc/rimgo.conf
ExecStart=/usr/bin/rimgo -a ${ADDRESS} -p ${PORT} -imgur ${IMGUR_CLIENT_ID}  -webp ${FORCE_WEBP}

# Hardening
DeviceAllow=
LockPersonality=yes
MemoryDenyWriteExecute=yes
PrivateDevices=yes
ProcSubset=pid
ProtectClock=yes
ProtectControlGroups=yes
ProtectHome=yes
ProtectHostname=yes
ProtectKernelLogs=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
ProtectProc=invisible
RestrictAddressFamilies=AF_INET AF_INET6
RestrictNamespaces=yes
RestrictRealtime=yes
RestrictSUIDSGID=yes
SystemCallArchitectures=native
SystemCallFilter=@system-service ~@privileged ~@resources
UMask=0077
CapabilityBoundingSet=~CAP_SYS_CHROOT
CapabilityBoundingSet=~CAP_SYS_BOOT
CapabilityBoundingSet=~CAP_SYS_PTRACE
CapabilityBoundingSet=~CAP_SYS_ADMIN
CapabilityBoundingSet=~CAP_KILL
CapabilityBoundingSet=~CAP_LINUX_IMMUTABLE
CapabilityBoundingSet=~CAP_BLOCK_SUSPEND
CapabilityBoundingSet=~CAP_SYS_NICE
CapabilityBoundingSet=~CAP_SYS_RESOURCE
#CapabilityBoundingSet=~CAP_CHOWN
CapabilityBoundingSet=~CAP_FSETID
CapabilityBoundingSet=~CAP_SETFCAP

PrivateUsers=true

[Install]
WantedBy=default.target