Connect your devices
A freshly installed node is private. It indexes and answers for you, and announces nothing. Connecting is the deliberate step where your machines start sharing indexes and agent memory.
There are two ways in. Paste your key if you have a Gnarl Personal subscription: it is how devices on different networks find each other, and it needs nothing else. Use an invite on one network, which is free, or to bring in a device you are not activating.
Paste your key
Gnarl Personal is the subscription for a private mesh across the internet. Buy it on the pricing page; your account page then shows your activation key. Paste it on each device:
| Device | Where |
|---|---|
| Gnarly desktop (macOS, Windows, Linux) | Settings → System → Subscription |
| Gnarly for Android and iOS | Private mesh → Subscription |
| A terminal | gnarl activate <key> |
Then restart the node — the app tells you when. That is all of it.
The mesh comes from the key. Every device activated with the same key joins the same private mesh, on its own. There is no mesh name to choose, no invite to send, and no node ID to copy between machines. The desktop app shows the mesh read-only as Mesh name — from your subscription.
It works across networks. A laptop on home Wi-Fi, a desktop at the office and a phone on cellular behind carrier NAT reach each other: hole-punching first, and the relay when both sides are behind NAT. A device that comes online is seen by the ones already running within seconds.
Nothing phones home. The key is a signed statement your node checks offline, against a public key compiled into the binary. The subscription panel shows Key valid until a date about a month out; the key is refreshed automatically each month while your subscription is active. If it lapses, the node keeps running and your data stays readable — see Licensing.
gnarl activate # what this node is entitled to
gnarl status # peers > 0 once another device is up
Use an invite
Invites are for a mesh on one network, which is free, and for adding a device without pasting the key on it. An invite is pinned to one node ID, so a mesh name alone is not enough to join.
On a subscribed device, the invite already carries the subscription's mesh: in the desktop app, Settings → Mesh → Private mesh → Create invite token, with no name to type. On the device joining, paste it under Paste invite to join and restart.
From a terminal, without a subscription:
gnarl mesh setup --mesh-name my-mesh --with-invite
This prints the gnarl start … command to run, and an invite token. Defaults
worth knowing:
- private scope with your mesh name
--replicas 2, so one machine can go down without taking your data with it--no-tlson localhost, so agent wiring and the Console work out of the box
To invite a peer:
# they run this and send you the node id
gnarl status
# you run this and send them the token
gnarl mesh invite --mesh-name my-mesh --admit-peer <their-64-hex-node-id>
They redeem it:
gnarl mesh join --invite 'lucenia1.…'
…then run the start command it prints.
--mesh-name separates traffic; it does not authenticate anyone. Pin the node IDs you own with --admit-peer. See
Trust and verification.
Who gets in
A private mesh admits a device only once it has proved, in a message signed by its own key, that it belongs to this mesh. From v0.1.0-rc31 every way into the mesh asks for that proof. A device can prove it in one of these ways:
- It names this mesh in a hello signed by its own key. Every device activated with your subscription key does this.
- It presents a membership credential signed for this mesh. An invite can carry one.
- You named its node ID with
--admit-peer.
A node from a different mesh is never admitted, even one on your own Wi-Fi. A list of peers passed on by someone else is only a reason to ask those nodes. It does not admit them. A node that has not proved it belongs cannot:
- join the mesh, or appear in its list of peers;
- read your index registry, or receive copies of your data;
- delete one of your indexes;
- redirect which device answers for your data.
Each of these has its own regression test in the node. Devices still on the previous release are admitted as before, because they already send the signed hello.
There is one limit. The mesh name is not a secret, because every hello carries
it. A node that deliberately copies the name and claims it is still admitted
by name. To keep that node out, pin the node IDs you own with --admit-peer.
Or start every node with --mesh-require-credentials, which refuses any node
without a membership credential. Turn that on only once every node shares the
trust root that an invite hands out. See
Trust and verification.
Your identity
Every node is an ed25519 keypair, generated on first run. The public half is the node ID; the private half signs what the node publishes.
gnarl identity show
The key lives in your data directory (~/.lucenia by default). Lose it and you
lose the identity — peers that trusted the old node ID will not follow it to a
new one.
Confirm
On both machines:
gnarl status
You want peers > 0. Across the internet, also look for the relay to be
connected.
What crosses the network
Not your documents, for a search. Nodes index locally and match locally; what
travels is the signed manifest of what a node can answer, the query, and
whatever hits your own policy allows you to return. Replication is the
deliberate exception: an index with mesh placement keeps copies on your other
devices, which is how memory follows you. See
Data placement and
Trust and verification.
Next
- Agent memory — the reason most people add a second machine
- Publish your first index
- Routing — how peers decide to ask you