summarylogtreecommitdiffstats
path: root/skywire.service
blob: aac1578a9eed01a83a56d3fd330a61f29ea1a0a4 (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
[Unit]
Description=Skywire
Wants=network-online.target

[Service]
Environment="GODEBUG=madvdontneed=1"
Type=simple
Environment="SYSTEMDCHILD=1"
# No --loglvl: the level comes from log_level in the visor config,
# which autoconfig sets from LOGLVL in /etc/skywire.conf (default info).
# A flag here would override that and get flushed into the config.
ExecStart=/usr/bin/skywire visor -ps -q http
Restart=always
RestartSec=20
TimeoutSec=30
# Hard memory limit — systemd kills the visor cleanly if exceeded.
# Prevents OOM killer from randomly picking victims on low-RAM boards.
MemoryMax=80%
# Caps needed by VPN apps (TUN setup, route changes) and by the
# hypervisor when bound to <1024 ports. Redundant with the file caps
# postinst applies to /usr/bin/skywire — keeping both is harmless and
# makes the unit self-documenting. Only meaningful when the unit
# runs as a non-root User= (set by the autoconfig-managed drop-in
# at /etc/systemd/system/skywire.service.d/skywire-user.conf when
# /etc/skywire.conf has SKYWIRE_USER=...).
AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE

[Install]
WantedBy=multi-user.target