Networking, TLS & Relays#
Initializing a Node#
Initialize the node directory with its role (leaf, edge, or anchor), control-plane relays, reachable endpoints, and local relay face bind address:
sudo -u meshnode /opt/fleetmesh/.venv/bin/meshnode init /var/lib/fleetmesh \
--name node-fra \
--class edge \
--face-host 127.0.0.1 \
--face-port 7777 \
--relay wss://relay.fleetmesh.org \
--endpoint wss=wss://node-fra.example.org
meshnode init generates keys.json, writes config.json, mines the node’s proof-of-work descriptor (kind 11801), and publishes it to the configured relays. Passing --force is refused if keys already exist; it only replaces a stray config.json that has no keys.
TLS Reverse Proxy in Front of the Relay Face#
Bind the node’s relay face to loopback (--face-host 127.0.0.1) and terminate TLS with a reverse proxy such as Caddy or nginx.
Example Caddy site block:
node-fra.example.org {
reverse_proxy 127.0.0.1:7777
}
Relay Face Connection Limits and Trusted Proxies#
By default, the node’s relay face enforces:
256 total concurrent connections (
--max-connections)16 concurrent connections per client (
--max-per-client)1 MiB maximum message size (
--max-message-bytes, minimum262144bytes)Loopback reverse proxies trusted for
X-Forwarded-For
Inspect or adjust limits live—changes take effect on the running node’s next tick without a restart:
meshnode relay-limits /var/lib/fleetmesh
meshnode relay-limits /var/lib/fleetmesh \
--max-connections 256 \
--max-per-client 16 \
--max-message-bytes 1048576 \
--trusted-proxy 127.0.0.1 \
--trusted-proxy ::1
If the relay face is exposed directly with no reverse proxy, run meshnode relay-limits /var/lib/fleetmesh --clear-trusted-proxies so X-Forwarded-For headers from untrusted peers are ignored.
Visibility and the Relay Bridge#
Control whether the node publishes publicly or operates privately by default, with optional per-protocol or per-application overrides:
meshnode visibility /var/lib/fleetmesh
meshnode visibility /var/lib/fleetmesh --default private
meshnode visibility /var/lib/fleetmesh --set https://fleetmesh.org/protocols/peering=public
The relay bridge (meshnode bridge) connects the node to outside Nostr relays:
Ingress is enabled by default and accepts FleetMesh’s own protocol kinds, plus user content only within the node’s asserted shard coverage (followed automatically as coverage changes).
Egress (
bridge.egress.enabled) is disabled by default. Even when enabled, egress never republishes the node’s own events and sends nothing for a fully private node.
Inspect or manage bridge relays:
meshnode bridge /var/lib/fleetmesh status
meshnode bridge /var/lib/fleetmesh add-relay --relay wss://relay.example.org
meshnode bridge /var/lib/fleetmesh remove-relay --relay wss://relay.example.org