Networking
WWKG nodes communicate directly with each other over the network. A single port handles both HTTP client requests and node-to-node traffic.
How nodes find each other
WWKG uses multiple discovery mechanisms so that nodes can connect without manual configuration:
- Local network — nodes on the same LAN discover each other automatically.
This is how the CLI finds a local server without needing a
--serverflag. - Global discovery — nodes register their address so that nodes on other networks can find them.
- Direct connections — once two nodes know about each other, they establish a direct connection for the lowest possible latency.
NAT traversal and relay servers
When a node is behind a firewall or NAT (common in home networks and corporate
environments), direct connections from the outside are blocked. The --relay
flag tells the server to register with public relay servers that help establish
connectivity:
wwkg node serve --relayWith relay enabled:
- Your node registers with one or more relay servers.
- Remote nodes connect to the relay, which forwards traffic to your node.
- Whenever possible, WWKG upgrades the relayed connection to a direct link. The relay is then no longer involved.
Relay servers never see your data in plaintext — all workspace data is end-to-end encrypted before it leaves your node.
Use --relay when your node needs to be reachable by nodes outside your local
network.
Connection methods
The CLI supports several ways to connect to a server:
Automatic discovery (default)
wwkg client query "SELECT * WHERE { ?s ?p ?o } LIMIT 10"The client discovers a WWKG server on the local network automatically. No configuration required.
Direct connection via ticket
If the server is not on the local network, use a connection ticket:
wwkg client query "SELECT * WHERE { ?s ?p ?o }" --ticket <ticket>Or set the WWKG_TICKET environment variable:
export WWKG_TICKET=<ticket>
wwkg client query "SELECT * WHERE { ?s ?p ?o }"HTTP transport
For environments where the default transport is blocked, fall back to HTTP:
wwkg client query "SELECT * WHERE { ?s ?p ?o }" --http --server http://192.168.1.10:4242Joining an existing node
When installing multiple nodes on the same machine, use --nodes to run
several host daemons:
sudo wwkg install --node-only --nodes 3Each node gets its own QUIC port starting from the default (4242, 4243, 4244) and its own data directory.