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

0c84e00 deploy: exit 2 is final for the relay unit; both BEACON_ lines are required Drake Stapleton committed 2026-11-11
..
README.md3850
open-humanity-relay-portmap.service236
open-humanity-relay-portmap.timer238
open-humanity-relay.service1225
portmap.sh1972
relay.env.example656

README.md

Running a relay

These are the files for a relay. One answers at interplane.io:18098 (UDP). Nothing in this directory names that host's LAN address, its router, or its network interface. Those stay in ~/.config/open-humanity/relay.env on the host that runs it, and that file is not committed.

FileWhat it does
open-humanity-relay.servicesystemd user unit. Runs beacon inside bubblewrap: its own process, user and mount namespaces, a read-only /usr, a cleared environment, no capabilities, no home folder, no writable path. Memory capped at 512 MiB. Bind address comes from relay.env.
relay.env.exampleCopy to ~/.config/open-humanity/relay.env and set the bind address there.
open-humanity-relay-portmap.service, .timer, portmap.shOptional. Only for a host behind a home router that speaks NAT-PMP. Asks that router every 20 minutes to keep public UDP 18098 mapped to this host for an hour, and exits non-zero unless the router confirms the mapping. A fixed forwarding rule makes these unnecessary. The timer is a protocol keepalive: the router does not tell the host when a mapping is about to expire.

Install

cargo build --release --offline -p beacon
D=$HOME/.local/lib/open-humanity/$(git rev-parse --short=8 HEAD); mkdir -p "$D"
cp target/release/beacon "$D/" && ln -sfn "$D" "$HOME/.local/lib/open-humanity/current"
cp deploy/portmap.sh "$HOME/.local/lib/open-humanity/"
cp deploy/open-humanity-relay*.service deploy/open-humanity-relay*.timer ~/.config/systemd/user/
mkdir -p ~/.config/open-humanity
cp deploy/relay.env.example ~/.config/open-humanity/relay.env
# Edit relay.env: set BEACON_BIND to this host's address on the outward interface. Keep both
# BEACON_ lines: a missing or bad value stops the relay with exit 2 and the unit stays failed
# (systemctl --user status open-humanity-relay shows why) instead of restarting.
# Set NAT_PMP_GATEWAY only if this host must ask the router to open UDP 18098.
systemctl --user daemon-reload
systemctl --user enable --now open-humanity-relay.service
# A user service stops at logout unless the user manager stays up:
loginctl enable-linger "$USER"
# Only if NAT_PMP_GATEWAY is set in relay.env:
# systemctl --user enable --now open-humanity-relay-portmap.timer

Do not commit relay.env. It is this host's, not the repository's.

Firewall

Let UDP 18098 in on the outward interface and nothing else for this service. One nftables line, with a flood cap in front of the relay. Replace IFACE and BIND with this host's outward interface and the address in relay.env. The cap is not the relay's own limit (20 signed requests a minute from one registered address).

iifname "IFACE" ip daddr BIND udp dport 18098 limit rate 500/second burst 1000 packets counter accept

Check

  • On the host: open-humanity teach, then listen and ask against the address the relay is bound to (see the top-level README).
  • From outside: a datagram sent to the public address must raise the counter of the firewall line. A datagram that does not decode, an unsigned answer, and an unsigned or stale registration or request get no reply, so a scan of random bytes sees nothing. A signed registration that lacks a valid cookie, and a signed request or answer from an address that is not registered, get a challenge back. An answer carries no timestamp, so an old signed answer replayed from an unregistered address is challenged too. That reply is the handshake, not a stored request.

Undo

systemctl --user disable --now open-humanity-relay.service open-humanity-relay-portmap.timer if the timer was enabled. A router mapping lapses within an hour of the last successful renewal. Remove the firewall line. loginctl disable-linger "$USER" only if nothing else needs the user manager after logout.