Network Commands
The rotifer network commands run a peer-to-peer gene network. The published CLI ships a libp2p node (libp2p 0.57) that runs as a background daemon. Nodes on the same LAN find each other by mDNS; any node can also join through a --bootstrap address. Gene announcements travel over GossipSub, and gene records are stored in a Kademlia DHT.
rotifer network status
Section titled “rotifer network status”Show the P2P daemon status.
rotifer network statusExample (daemon running):
$ rotifer network status
── P2P Network Status ──
Status: ● Running PeerId: 12D3KooWA1b2c3d4e5f6... Listening: /ip4/192.168.0.103/tcp/9878/p2p/12D3KooWA1b2c3d4e5f6... Discovered peers: 2 Connected peers: 2 DHT peers: 2When the daemon is not running, the command shows the configured listen port and bootstrap-peer count, and hints to start it.
From the next release:
| Flag | Description |
|---|---|
--state-file <path> | Read the daemon’s port and token from this file, not ~/.rotifer/daemon.json (for example, to check a daemon that runs under a service’s account) |
statusonly reads and writes no file. On a machine that has never started a node it saysNode: not initialised: run 'rotifer network start' first.- With the global
--json, it prints the node’s counters as JSON for scripts: roles, connections, limits, denials, NAT, relay, gossip and DHT. It leaves out peer addresses, PeerIds and scores. When no daemon is running it prints{"running":false}and exits 1.
$ rotifer --json network statusAn excerpt, from a node started with --max-inbound 40 --max-pending 10:
{ "running": true, "roles": { "relayServer": false }, "announcedAddrs": [], "connections": { "inbound": 0, "outbound": 0 }, "limits": { "inbound": 40, "outbound": 50, "pending": 10 }, "denials": { "inboundLimit": 0, "pendingInboundLimit": 0, "outboundLimit": 0, "memory": 0, "blocked": 0 }}The full output also has version, eventLoop, foreignPeersDropped, colocation, nat, relay, gossip and dht.
rotifer network start
Section titled “rotifer network start”Start the P2P node as a background daemon. Requires the native libp2p addon.
rotifer network start [--port <port>] [--host <addr>] [--bootstrap <addr...>] [--no-mdns]Flags:
| Flag | Default | Description |
|---|---|---|
-p, --port <port> | 9878 | Listen port |
-H, --host <addr> | 127.0.0.1 | Listen interface: 127.0.0.1 (loopback) or 0.0.0.0 (reachable from other machines) |
-b, --bootstrap <addr...> | from config | Bootstrap peer multiaddr(s); overrides config |
--no-mdns | mDNS on | Don’t discover or announce on the local network (use on untrusted Wi-Fi); mDNS only runs with a non-loopback --host |
From the next release:
| Flag | Default | Description |
|---|---|---|
--accept-p2p | off | Allow P2P networking for this account without the prompt, once you have read rotifer network consent --show |
--foreground | off | Run in this process instead of the background, for a service manager such as systemd; exits non-zero if the node stops working |
--relay <addr...> | none | Hold a reservation on this relay (multiaddr ending in /p2p/<PeerId>), so NATed peers can reach this node |
--relay-server | off | Serve as a relay for other nodes. Without --announce the relay service starts but is not advertised (relay.advertising: false) and refuses every reservation; a public relay needs --announce /ip4/<public IP>/tcp/<port> |
--announce <addr...> | none | This node’s public address, /ip4/<public IPv4>/tcp/<port> only |
--max-inbound <n> | 50 | Most established inbound connections |
--max-pending <n> | 20 | Most connections in their handshake, both directions |
Example:
$ rotifer network start --host 0.0.0.0 --port 9878
── Starting P2P Daemon ──
PeerId: 12D3KooWA1b2c3d4e5f6... Listen host: 0.0.0.0 PID: 48213 Bootstrap peers: 0 LAN discovery (mDNS): on
✓ P2P daemon running in the background. ℹ 'rotifer network status' shows the reachable multiaddr — give it to other nodes as --bootstrapLAN discovery. A node started with --host 0.0.0.0 finds other nodes on the local network by mDNS, without --bootstrap. With the default --host 127.0.0.1 mDNS is off (LAN discovery (mDNS): off (loopback only)), and --no-mdns turns it off on any interface.
Reaching other nodes. The node can connect through a relay or by hole punching, and enforces connection and memory limits. It tries to keep 8 outbound connections to peers it chose itself, so it relies less on whoever connects to it. When no bootstrap node is connected it redials one right away, backing off after failures. A restart dials back only peers it had actually reached, not every address it heard about, so once it has reached a peer it does not need --bootstrap again.
First-run consent (from the next release). The first network start on an account prints what the node connects to and what peers can see (the text rotifer network consent --show prints), then asks Allow P2P networking for this account? [y/N]. Enter alone means no. A no saves nothing, not even a node key:
Not started. P2P networking stays off; nothing was saved.Scripts, CI and other runs without a terminal, and --json, are never asked. They exit 1 without connecting until consent is recorded:
$ rotifer network start < /dev/null✗ P2P networking needs your consent first → Nothing was started and no connection was made. Run 'rotifer network start' in a terminal to read what it connects to and allow it, or pass --accept-p2p if you have read it (rotifer network consent --show prints the text).Read the text with rotifer network consent --show, then pass --accept-p2p once, or run rotifer network consent --accept. With --accept-p2p the text goes to stderr, so a log keeps what was agreed to. The answer is kept per account; later starts do not ask again.
Relays and connection limits (from the next release). --relay takes the address of a relay: one of the official nodes, or a node you run:
# Reach this node through a relay (an official node or one you run)rotifer network start --relay /ip4/<relay-ip>/tcp/9878/p2p/<relay-PeerId>
# On a machine with a public IPv4 address: serve as a relay for other nodesrotifer network start --host 0.0.0.0 --relay-server --announce /ip4/<public-ip>/tcp/9878With --relay-server or --announce, other nodes can also connect to this node on their own. --announce takes only /ip4/<public IPv4>/tcp/<port>: a DNS name or a private or reserved address is refused, the daemon does not start, and ~/.rotifer/daemon.log says why. --max-inbound and --max-pending must be whole numbers of 1 or more; network status --json shows the limits in use.
Running under a service manager (from the next release). --foreground runs the node in this process, for systemd and the like. Stop it with Ctrl-C or SIGTERM. A service has no terminal, so record consent first with --accept-p2p or rotifer network consent --accept.
The daemon runs in the background; use rotifer network status to inspect it and rotifer network stop to shut it down. If it does not come up, check ~/.rotifer/daemon.log. Configuration is saved to ~/.rotifer/network.json.
rotifer network stop
Section titled “rotifer network stop”Stop the P2P daemon.
rotifer network stoprotifer network consent
Section titled “rotifer network consent”From the next release. Show, give or withdraw consent to P2P networking for this account.
rotifer network consent --show | --accept | --revoke | --statusPass exactly one flag:
| Flag | Description |
|---|---|
--show | Print what the node connects to and what peers can see |
--accept | Record consent without starting the node (prints the text it agrees to) |
--revoke | Withdraw consent and stop a running node; the node key and remembered peers stay |
--status | Whether consent is recorded, for which notice, since when |
Example (--show, on an account that has never started a node):
$ rotifer network consent --showP2P networking is off for this account. Starting the node turns it on.
The node will connect to: - bootstrap peers from -b or ~/.rotifer/network.json (now: 0) - relay nodes from --relay, used to reach nodes behind NAT - peers it met on earlier runs, saved in ~/.rotifer/peers.json (now: 0) - peers that those nodes introduce - devices on your local network, only with a non-loopback --host and without --no-mdns - rotifer.dev, only to fetch the public keys that check other nodes' certificatesThere is no public Rotifer network yet. With no peers configured, the node connects to nothing.
Every peer it connects to can see: - your IP address - this node's ID, (made when the node first starts), kept in ~/.rotifer/identity.pem - the gene announcements this node receives and forwardsWith --relay-server or --announce, other nodes can also connect to this node on their own.It sends gene metadata (names, IDs, versions), never gene code or the inputs and outputs of a run.
Stop the node: rotifer network stopWithdraw this consent: rotifer network consent --revokeThe counts and the node ID are filled in from this account when the command runs. --show only reads; it does not make a node key.
Example (--status):
$ rotifer network consent --status P2P consent: not givenℹ Read it with 'rotifer network consent --show'; allow with 'rotifer network start' or --accept.
$ rotifer network consent --status P2P consent: given Notice version: 1 Since: 2026-11-24T03:07:56.925Z How: flagHow is prompt (answered yes at network start), flag (--accept-p2p) or command (consent --accept). With the global --json, --status prints {"consented":false,"noticeVersion":null,"acceptedAt":null,"source":null} or the same fields filled in.
Withdrawing: --revoke deletes the record and stops a running node. The node key (~/.rotifer/identity.pem) and remembered peers stay, so a later network start asks again and comes back as the same node.
$ rotifer network consent --revoke✓ P2P consent withdrawn.ℹ The running P2P node was stopped.ℹ The node key (~/.rotifer/identity.pem) and remembered peers are kept.If the notice text changes in a later release, its version goes up and everyone is asked again.
rotifer network peers
Section titled “rotifer network peers”List peers discovered by the running daemon.
rotifer network peersExample:
$ rotifer network peers
── Discovered Peers ──
#1 /ip4/192.168.0.107/tcp/9878/p2p/12D3KooWB7c8d9...
1 peer(s) discoveredIf no peers have connected yet, the command reports No peers discovered yet.
rotifer network received
Section titled “rotifer network received”Show gene announcements this node has received from peers. Requires the daemon to be running.
rotifer network receivedExample:
$ rotifer network received
── Received Gene Announcements ──
grammar-checker@1.0.0 writing.grammar · Native · v2:3f9a1c0b7e2d… · from 12D3KooWB7c8d9…
1 announcement(s) received ℹ Names and versions are labels claimed by the publisher; the gene ID is derived from the content.A peer must announce a gene while this node is connected and subscribed for it to appear here.
rotifer network announce <gene-name>
Section titled “rotifer network announce <gene-name>”Announce a local gene through the running daemon. Reads genes/<gene-name>/ in the current project; the gene must have a v2 gene ID.
rotifer network announce <gene-name>The announcement goes out in two ways:
- Gossip: connected peers that subscribe receive it and list it under
rotifer network received. - DHT: the gene’s record is stored in the DHT, where other nodes can look it up by its v2 gene ID. The daemon republishes it every 12 hours, and the list of announced genes survives a daemon restart. Use
rotifer network withdrawto stop.
Example:
$ rotifer network announce grammar-checker
── Gene Announcement ──
✓ Announced 'grammar-checker' Gene ID (v2): v2:3f9a1c0b7e... Gossip: published (2 connected peers subscribe) DHT record: sent to 2 nodes, 2 acknowledged (an acknowledgement does not prove the record was kept) Provider record: published (the protocol reports no count and no acknowledgement) Read-back: readable from 2 other nodesWith no DHT peers yet, DHT record reads not sent: no DHT peers yet. The address notice above is shown the first time this node announces, and is always in rotifer network announce --help.
rotifer network search <query>
Section titled “rotifer network search <query>”Search Rotifer Cloud and the P2P network.
rotifer network search <query><query> is keywords, or one v2 gene ID (v2:<64 hex>):
- Keywords match the name and domain of announcements this node heard from other nodes, and run a Rotifer Cloud search alongside.
- A v2 gene ID is looked up in the DHT. Rotifer Cloud cannot look up v2 IDs, so it is skipped.
- The DHT is never searched by keyword. The two lists are not merged.
Example:
$ rotifer network search grammar
Gene Search "grammar"
Rotifer Cloud (1) grammar-checker@1.0.0 writing.grammar · Native · by rotifer · reputation 0.82P2P network (1) heard from other nodes · whether any is the same gene as a Cloud result is unknown v2:3f9a1c… 1 registered account grammar-checker@1.0.0 writing.grammar · Native from 12D3KooWB7c8… (registered) ℹ The two lists are not merged: Cloud search results don't carry a v2 gene ID, so one gene can appear in both. ℹ Name, domain, fidelity and version are each publisher's own claim. The gene ID itself is only checked when the content is fetched.P2P results are grouped by gene ID and ranked by how many registered accounts published them; when publishers give the same gene different labels, the result says ! publishers disagree on ….
- The P2P side has a 3 s deadline; if it or a candidate limit is hit, the command says the results may be incomplete.
- If the daemon is not running, only the Cloud list is shown, with a hint to run
rotifer network start. - If Rotifer Cloud can’t be reached, the command shows P2P results only. If neither side answers, it exits 1.
rotifer network withdraw <gene>
Section titled “rotifer network withdraw <gene>”Stop announcing a gene: no more republishing, and this node stops serving it.
rotifer network withdraw <gene><gene> is a gene name or a v2 gene ID. If the daemon is not running, the gene is only removed from the republish table.
What withdrawing does not do: Other nodes are not told to delete it: copies they stored expire within 24 h of arriving, and a node that heard the announcement on gossip can still list it for up to 48 h.
Node key: A record’s time window bounds one claim. It does not bound a stolen node key: whoever holds the key can keep signing. Rotate the node key (delete ~/.rotifer/identity.pem, restart) if it leaks.
rotifer network attest
Section titled “rotifer network attest”Get a proof-of-registration certificate that links this node to your Rotifer Cloud account. Certificates are off by default.
rotifer network attest enable [--accept-public-pseudonym]rotifer network attest statusrotifer network attest renewrotifer network attest disable| Subcommand | What it does |
|---|---|
enable | Turns certificates on and gets one for this node |
status | Shows this node’s certificate |
renew | Renews now. A running daemon does this on its own when under 48 hours remain |
disable | Stops carrying and renewing the certificate |
Before enable: run rotifer login first. Once you are signed in, the first enable on a node shows what you are agreeing to and asks before it turns anything on:
- Your node will be publicly linked to an account pseudonym, and Cloud can trace it back to your account.
- The certificate expires within 7 days; while the node is online it renews itself when under 48 hours remain.
- If your account is banned or a certificate is revoked, other nodes stop accepting it within about 24 hours of the revocation being published. Without a published revocation it stops working when it expires, at most 7 days after issue.
When not run interactively (in a script, or with --json), enable asks nothing and turns nothing on unless you pass --accept-public-pseudonym.
Renewal: a running daemon checks the certificate every 10 minutes and renews it when under 48 hours remain. A failed renewal keeps the current certificate in use, is tried again an hour later, and shows up in status.
disable deletes this node’s copy. The certificate already issued is not voided: it stays valid until it expires, at most 7 days from its last renewal.
New node key: a new key is a new node to the network and needs its own certificate: status reports Key changed, and enable asks for agreement again. The old certificate is not voided: it stays valid for the old identity until it expires (at most 7 days), and anyone holding the old key can keep using it. If the old key may have leaked, ask the Rotifer team to revoke the old node.
rotifer network status shows the certificate too, as a Certificate line.
JSON output: with --json, every subcommand prints one JSON document. On success it is { ok: true, action, attestation, daemon, notices }. attestation never contains the certificate itself; daemon is running or not_running for status, and loaded, cannot_load or not_running for the other subcommands. On failure it is { ok: false, action, error: { code, message, fix } } and the command exits with code 1.
$ rotifer network attest status --json{ "ok": true, "action": "status", "attestation": { "state": "off", "peerId": null, "issuedAt": null, "expiresAt": null, "expiresInSeconds": null, "autoRenew": false, "lastRenewalAttemptAt": null, "lastRenewedAt": null, "lastFailure": null }, "daemon": "not_running", "notices": []}$ rotifer network attest renew --json{ "ok": false, "action": "renew", "error": { "code": "POR_NOT_ENABLED", "message": "Certificates are not enabled on this node.", "fix": "Run 'rotifer network attest enable' first." }}How nodes protect themselves
Section titled “How nodes protect themselves”- Records from other nodes are checked before they are stored, with per-publisher and total limits. A peer that keeps breaking them is blocked for a while.
- Only peers that speak Rotifer’s DHT join it. Other libp2p nodes are not added to this node’s DHT.
- Gossip on topics without a registered validator is ignored, and the node refuses to publish on topics it has not registered.
- Proof of registration. Heartbeats can carry a Rotifer Cloud–issued proof of registration that peers check and use when scoring each other. A node gets one with
rotifer network attest; the Cloud side that issues it is in the rotifer-playground repository but not deployed.
Official nodes
Section titled “Official nodes”The Rotifer project runs two public nodes, one at Hetzner and one at Vultr. Both have the same operator, the Rotifer project, and each serves as a bootstrap node and as a relay.
| Provider | Address |
|---|---|
| Hetzner | /ip4/5.222.20.175/tcp/9878/p2p/12D3KooWSAW5s7pFZeyfjtYzL8oUJHX3pL73LJrv14o6Sbg8NQp8 |
| Vultr | /ip4/45.76.147.10/tcp/9878/p2p/12D3KooWPWUb6EieuaSjYx7Mu51tv2yKr5p4MGCCQiX5XyuPT6yi |
The CLI does not connect to them on its own. P2P stays off until you start a node, and bootstrap_peers is empty by default. To use them, pass both addresses when you start:
rotifer network start -b /ip4/5.222.20.175/tcp/9878/p2p/12D3KooWSAW5s7pFZeyfjtYzL8oUJHX3pL73LJrv14o6Sbg8NQp8 /ip4/45.76.147.10/tcp/9878/p2p/12D3KooWPWUb6EieuaSjYx7Mu51tv2yKr5p4MGCCQiX5XyuPT6yiThe first start on an account asks for consent before it connects (see rotifer network consent).
-b replaces the configured list for that run and is not saved. To use the official nodes every time, stop the node and put both addresses in bootstrap_peers in ~/.rotifer/network.json. The file appears after the first network start (see Configuration):
"bootstrap_peers": [ "/ip4/5.222.20.175/tcp/9878/p2p/12D3KooWSAW5s7pFZeyfjtYzL8oUJHX3pL73LJrv14o6Sbg8NQp8", "/ip4/45.76.147.10/tcp/9878/p2p/12D3KooWPWUb6EieuaSjYx7Mu51tv2yKr5p4MGCCQiX5XyuPT6yi"]After that, rotifer network start with no -b connects to them. To let peers reach a node behind NAT through them, also pass --relay with the same two addresses; the node then holds a relay reservation on each.
Every node you connect to, these two included, can see your IP address and your node’s PeerId. rotifer network consent --show lists everything a peer can see.
LAN walkthrough
Section titled “LAN walkthrough”To watch a gene propagate across machines on the same network:
- On every machine, start a node on a reachable interface:
rotifer network start --host 0.0.0.0. The nodes find each other by mDNS;rotifer network peerslists them. From the next release, the first start on each machine asks for consent: answery, or pass--accept-p2pafter readingrotifer network consent --show. - Announce a gene on any machine:
rotifer network announce <gene-name>. - On the other machines,
rotifer network receivedlists it, androtifer network search <gene-name>shows it underP2P network.
If mDNS is off or blocked (for example with --no-mdns, or on a network that drops multicast), join through one node instead: note its multiaddr from rotifer network status, then start the others with rotifer network start --host 0.0.0.0 --bootstrap /ip4/<seed-ip>/tcp/9878/p2p/<seed-PeerId>.
Configuration
Section titled “Configuration”Network configuration is stored in ~/.rotifer/network.json:
{ "node_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "listen_port": 9878, "bootstrap_peers": [], "enabled": false}bootstrap_peers is empty by default, so the node connects to no bootstrap node until you add one. Add multiaddrs in the /ip4/<ip>/tcp/<port>/p2p/<PeerId> form, such as the official nodes or nodes you run, or pass --bootstrap on start, which replaces this list for that run.
node_id is a local config identifier; the libp2p PeerId shown by status / start is what other nodes use in a --bootstrap multiaddr.
From the next release, consent is kept apart from this file, in ~/.rotifer/p2p/consent.json (readable only by you). It records which notice was agreed to, when, how, and with which CLI version; no IP address, PeerId or host goes in it. A missing or unreadable record counts as no consent, and no environment variable stands in for it. To withdraw, use rotifer network consent --revoke rather than deleting the file by hand, so a running node stops too.
Not available yet
Section titled “Not available yet”| Capability | Status |
|---|---|
| Node certificates | Not open yet — rotifer network attest enable says so and turns nothing on |
| Keyword search over the DHT | Not supported — keywords match heard announcements and Rotifer Cloud; the DHT is looked up by v2 gene ID only |