Running a node
UNAVI runs on the iroh peer-to-peer network. Every
running client is a peer, while a node (unavi-node) is a headless,
always-on peer that hosts files and can run a space discovery registry.
Spaces live with the people inside them, so a node does not mirror every space
it lists.
A node only accepts incoming connections and never dials peers itself. Peers connect to it for file downloads, document sync, and registry updates, so the node needs to be reachable from the internet.
Set your domain
A node identifies itself with a did:web
tied to a domain name, configured with the --domain flag. The flag defaults to
localhost:<port>, so pass your public hostname in production.
Peers verify the node's identity by fetching
https://<domain>/.well-known/did.json. Because unavi-node binds its HTTP
listener to localhost, place a reverse proxy in front of it to terminate TLS
(Transport Layer Security) and forward requests for your domain to the node's
port.
Run the node binary
unavi-node --domain node.example.com --port 5000| Flag | Effect |
|---|---|
--domain <host> | Public domain used for the node's did:web identity. Defaults to localhost:<port>. |
--port <n> | Local HTTP port to listen on. Defaults to 5000. |
--data-dir <path> | Directory for keys, documents, hosted files, and registry.ron. Defaults to the platform data directory. |
--in-memory | Store keys and documents in memory and skip file hosting. Useful when running multiple local test nodes. |
--no-registry | Disable the discovery registry. |
--debug | Enable verbose logging. |
Host files
On startup, the node pins and serves everything under <data-dir>/files/
(including subdirectories) over iroh-blobs. It also writes a files.json index
mapping each relative file path to its content hash, which an asset manifest can
reference directly. Deleting a file from <data-dir>/files/ unpins it on the
next restart.
Configure the registry
The registry helps people discover public spaces. It tracks a catalog of published listings, curated feeds such as recent and featured spaces, and live presence counts.
Registry policy lives in <data-dir>/registry.ron and is read on every startup:
(
allowlist: Some(["did:web:example.com"]),
featured: ["<namespace-id>"],
categories: ["social"],
)
allowlist restricts which DIDs (decentralized identifiers) may submit spaces
to the catalog. If the file or any field is omitted, the registry defaults to
open submission for any authenticated DID, with no featured spaces and no
categories.
To prevent spam from a single identity or a flood of freshly generated keys, the
registry enforces hard caps. Because did:key identities are free to create,
they also share a combined pool in addition to per-identity caps:
| Limit | Value |
|---|---|
| Listings per DID | 8 |
| Total listings in the catalog | 10,000 |
Combined listings across all did:key identities | 1,000 |
| Concurrent spaces per DID | 4 |
| Total presences across the registry | 50,000 |
Combined presences across all did:key identities | 2,000 |
| Occupants listed per space | 256 |
| Listing lifetime before renewal | 30 days |
The active view includes only spaces with a live catalog listing, so presence in unlisted spaces is never surfaced there.