JOLT OPERATIONS GUIDE · 02

Running a Relay

A relay is an always-on Jolt node on a public address. It helps other nodes find each other (discovery), carries traffic between peers whose NATs refuse to hole-punch (availability), and can hold pinned content so your stuff stays fetchable while your laptop sleeps. Every step on this page is taken from the relay that bootstraps the Jolt network today, a single small VPS.

Two things a relay can never do, by construction: it cannot read encrypted content (envelopes are sealed to their recipients, per JOLT-RFC-0004), and it cannot impersonate anyone (every record is signed by its owner's key, per JOLT-RFC-0001). Running a relay is infrastructure, not authority.

1 · What you need

2 · Install the binary

Grab the latest release binary and verify it:

curl -sLO https://github.com/alexanderwanyoike/jolt/releases/latest/download/jolt-linux-x86_64
curl -sLO https://github.com/alexanderwanyoike/jolt/releases/latest/download/jolt-linux-x86_64.sha256
sha256sum -c <(awk '{print $1"  jolt-linux-x86_64"}' jolt-linux-x86_64.sha256)
sudo install -m 755 jolt-linux-x86_64 /usr/local/bin/jolt
jolt --version

3 · A user and a data directory

The relay runs as an unprivileged user with its own state directory:

sudo useradd --system --home /var/lib/jolt-relay --shell /usr/sbin/nologin jolt
sudo mkdir -p /var/lib/jolt-relay
sudo chown jolt:jolt /var/lib/jolt-relay

4 · The systemd unit

This is the production unit, verbatim apart from the name. The flags that matter: --p2p-port 4001 fixes the port so your firewall rule and your multiaddr stay true, --no-mdns turns off LAN discovery (meaningless in a datacenter), and the API stays bound to localhost so only you can talk to it.

/etc/systemd/system/jolt-relay.serviceini
[Unit]
Description=Jolt relay node
Wants=network-online.target
After=network-online.target
StartLimitIntervalSec=300
StartLimitBurst=10

[Service]
Type=simple
User=jolt
Group=jolt
Environment=XDG_DATA_HOME=/var/lib/jolt-relay
WorkingDirectory=/var/lib/jolt-relay
ExecStart=/usr/local/bin/jolt start --api-bind 127.0.0.1 --api-port 9862 --p2p-port 4001 --no-mdns
Restart=on-failure
RestartSec=5s
StandardOutput=journal
StandardError=journal
LogRateLimitIntervalSec=30s
LogRateLimitBurst=1000
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=strict
ProtectHome=true
ReadWritePaths=/var/lib/jolt-relay

[Install]
WantedBy=multi-user.target

Enable and start it:

sudo systemctl daemon-reload
sudo systemctl enable --now jolt-relay.service

5 · Open the port

Only the P2P port is public. The HTTP API stays on localhost.

sudo ufw allow 4001/udp comment "Jolt relay P2P"

6 · Verify and get your relay address

The daemon's status endpoint tells you it is healthy and gives you the peer id you need:

curl -s http://127.0.0.1:9862/api/v1/status | python3 -m json.tool

Look for "peer_id". Your relay's multiaddr is:

/ip4/YOUR.SERVER.IP/udp/4001/quic-v1/p2p/YOUR_PEER_ID

7 · Point your nodes at it

On each machine that should use your relay, add it persistently:

jolt bootstrap add /ip4/YOUR.SERVER.IP/udp/4001/quic-v1/p2p/YOUR_PEER_ID
jolt bootstrap list

bootstrap list shows configured, built-in, and effective relays; adding yours does not remove the default one, so your nodes get both. For a one-off run (or to test before committing), the same multiaddr works as a start flag:

jolt start --bootstrap /ip4/YOUR.SERVER.IP/udp/4001/quic-v1/p2p/YOUR_PEER_ID

8 · Operations

sudo systemctl stop jolt-relay.service
sudo install -m 755 jolt-linux-x86_64 /usr/local/bin/jolt
sudo systemctl start jolt-relay.service

Where to go next