interplane.Get Omega
Read in your language

open-humanity

Privacy-first peer assistance network for sovereign autonomous agents

Brought by drakestapleton

branch main Branches Tags History

open-humanity / deploy / open-humanity-relay.service

27 lines · 1225 bytes Raw Blame History
1[Unit]
2Description=Open Humanity relay (UDP 18098): carries requests for help to registered helpers and sealed answers back to the asker
3Documentation=https://interplane.io/open/z2jftNw1LLYTNgj8DNoh1TGGNmEmP
4After=network-online.target
5
6[Service]
7# The relay needs the network and nothing else: no home folder, no writable path, a cleared
8# environment, its own process, user and mount namespaces, no new privileges.
9# Bind address is this host's, in relay.env, not in this unit.
10EnvironmentFile=%h/.config/open-humanity/relay.env
11ExecStart=/usr/bin/bwrap --unshare-all --share-net --die-with-parent --new-session --clearenv \
12 --setenv BEACON_BIND ${BEACON_BIND} --setenv BEACON_PORT ${BEACON_PORT} \
13 --setenv BEACON_LINKS ${BEACON_LINKS} \
14 --ro-bind /usr /usr --symlink usr/lib /lib \
15 --ro-bind %h/.local/lib/open-humanity/current/beacon /relay \
16 --cap-drop ALL /relay
17NoNewPrivileges=yes
18Restart=on-failure
19RestartSec=5
20# Exit 2 is a set but bad BEACON_BIND, BEACON_PORT or BEACON_LINKS (an unset line in relay.env reaches the
21# relay as an empty value). A restart cannot fix it: stay failed, log the reason once.
22RestartPreventExitStatus=2
23MemoryMax=512M
24TasksMax=64
25
26[Install]
27WantedBy=default.target