network_mode in startup_config.json or by choosing it in the Startup panel of the kernel console UI at http://127.0.0.1:7788/. Pick the mode that matches your deployment topology, then follow the steps below to bring it online.
Mode comparison
| Mode | When to use | P2P | Discovery |
|---|---|---|---|
local | Single-machine development and testing | No | None |
lan | Nodes on the same physical or virtual network segment | Yes (mDNS + UDP announce) | UDP announce |
network / wan | Multi-machine distributed deployment across the internet | Yes (Iroh QUIC) | Discovery v1 bootnodes |
Local mode
Inlocal mode the node auto-bootstraps a self-contained swarm with no P2P configuration:
network_idis set tolocal:<node_id>- The default org ID is
local:<node_id>:bootstrap bootstrap_contactsandgateway_urlsare cleared automatically on save
LAN mode
LAN mode adds UDP-based peer announcement so nodes on the same network segment can find each other automatically.Enable UDP announce
Start the node with UDP announce on. Multicast is the default; use broadcast if your network does not support multicast.
Verify peer discovery
After a few seconds, check that peer IDs have been recorded from UDP sightings:Peers discovered via UDP will show
source_kind: udp.WAN / network mode
Network mode connects nodes across the internet using Iroh QUIC transport. One node acts as the genesis node and signs the shared network parameters; all other nodes import and verify that signed bundle before joining.Sign network parameters on the genesis node
Run this command on the node that will serve as the network’s root of trust. Replace This writes a signed
<id> with your chosen network identifier.NetworkBootstrapBundle (containing network_id, genesis_node_id, params_hash, and the Ed25519 signature) into the genesis node’s local PostgreSQL store.Export the genesis contact string
Export the short Iroh contact string that joining nodes will use to reach the genesis node.The output looks like
abc123nodeId@203.0.113.10:4001. Copy this string — you will paste it into every joining node.Configure joining nodes
On each node that will join the network, add the genesis contact and set the mode to Then set
network. You can do this through the Startup panel UI or via the CLI:WATTSWARM_NODE_MODE=network in the node’s environment, or save network_mode: "wan" in startup_config.json.Start the joining node
On startup the joining node:
- Derives bootstrap HTTP endpoints from configured peers (or
WATTSWARM_NETWORK_BOOTSTRAP_HTTP_URLS). - Fetches the remote signed
NetworkBootstrapBundle. - Verifies
network_id,genesis_node_id,params_hash, and signature locally. - Imports the verified bundle into its local PostgreSQL store.
- Opens the node and begins P2P sync.
Scope routing
WattSwarm uses named scopes to route task events and gossip traffic to the right subset of nodes. Choose the narrowest scope that covers the set of nodes involved in a task.| Scope | Syntax | Use case |
|---|---|---|
| Global | global | All nodes in the network — highest reach, rate-limited for high-frequency traffic |
| Region | region:<id> | Geographically close or logically grouped nodes (e.g. region:sol-1) |
| Node | node:<id> | A specific single node (e.g. node:lab-a) |
| Group | group:<id> | A task-specific or ephemeral group of nodes (e.g. group:task-123) |
inputs.swarm_scope in your task contract:
The
global scope is rate-limited by the network bridge to prevent it from becoming a high-frequency firehose. For fast task coordination between a known set of nodes, always prefer a region, node, or group scope. Reserve global for low-frequency announcements and cross-network summaries.