blob: 7e7f37e31cc0a2a7ce22ba43fdf26a6116f92ee8 (
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
|
[Unit]
Description=Snapdrop Server
After=network.target
[Service]
Type=simple
DynamicUser=true
Environment="HOST=127.0.0.1"
# Uncomment this if you're not going to run Snapdrop behind a reverse-proxy (ie. nginx)
#Environment="HOST=0.0.0.0"
Environment="PORT=3000"
ExecStart=/usr/bin/node index.js
WorkingDirectory=/usr/share/snapdrop/server
Restart=always
RestartSec=10s
LimitNOFILE=1024
LimitNPROC=32
ProtectHome=true
PrivateDevices=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectControlGroups=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectControlGroups=true
RestrictNamespaces=true
SystemCallArchitectures=native
SystemCallFilter=@system-service
RestrictAddressFamilies=AF_INET AF_INET6
LockPersonality=true
RestrictRealtime=true
# Node/Snapdrop doesn't seem to work with this enabled
#MemoryDenyWriteExecute=true
[Install]
WantedBy=multi-user.target
|