Deploy
Add devices to the mesh
Create a mesh on one isotope, invite the next machine with a single-use code, and let them share work.
What a mesh is
A mesh is a private, encrypted overlay between isotopes. One isotope per mesh is the authority: it holds the mesh’s certificate authority, mints invitations, gives each member a fixed mesh address and keeps the blocklist. A lighthouse is a member others can dial at a public address; it also relays traffic between members that cannot reach each other directly. Every other member is a client: it needs no public address and reaches peers through the lighthouses, though it may also publish direct addresses that peers dial.
Membership is what lets isotopes run each other’s work: members accept calls from the isotopes their authority enrolled and has not revoked, and nobody else. An isotope belongs to one mesh at a time; joining another leaves the first. Joining moves no application data.
Before you start
- You are an administrator on the inviting isotope. Settings → Mesh is hidden from other roles.
- Both isotopes are installed and started (
drkm start). - The mesh authority’s HTTPS address, its
--public-url, is reachable from the new machine. The invitation carries that address even when it was minted on another member; the join is redeemed there and refreshes are pulled from it. - A machine that others should reach directly, a lighthouse, is dialable on UDP port 4242 or the port it declares. Clients need no reachable address.
Create your mesh
A fresh isotope belongs to no mesh. In Settings → Mesh, the Mesh networking switch opens the Create a mesh dialog: name it, and this isotope becomes the authority of a one-member mesh. No restart is needed. For a machine other isotopes should dial, give it a reachable address when you start it.
# Declare the HTTPS origin and the UDP endpoint other isotopes can reach
drkm start --public-url https://isotope.example --nebula-advertise 203.0.113.10:4242
Add a second machine
One command on the new machine, one click by you. Choose Add isotope in Settings → Mesh → Isotopes or on the Isotopes page to copy the command for your mesh, then run it on the new machine:
# A new machine: install drkm, start it, and ask to join
curl -fsSL https://drkm.com/install | sh -s -- --join https://main.example.com
# A machine already running drkm
drkm join https://main.example.com
The machine asks the mesh's authority for a code of its own. It prints a link and an eight-character match code, such as 4F7K-9QX2, and keeps waiting. Open the link, or send it to someone who may add machines to the mesh, sign in, check that the page shows the same match code, and choose Connect, or Not mine if it isn't yours. The machine joins as yours, generates its keys locally, gets its mesh address and certificates from the authority, and brings its tunnel up.
drkm join needs no sign-in on the machine itself: it acts as the machine's owner. If the mesh runs a newer release than the machine, drkm join updates the machine first, so every member runs the same release (--no-update skips that). It waits up to 30 minutes for someone to let the machine in; run it again to ask anew.
Join with an invitation code
A phone, or a mesh that doesn't take requests to join, uses a single-use invitation code instead. Add isotope offers Create invitation code for those, and drkm enrollment invite mints one from the terminal. Paste it under Settings → Mesh → Settings → Join an existing mesh, or run drkm join with no address and paste it at the hidden prompt. A code from the authority still waits for someone to let the machine in; a code minted on a member isotope is forwarded with that member's signature and joins without it. Codes last 24 hours, and Not mine stops one working.
# On any enrolled isotope, as an administrator
drkm enrollment invite --url https://isotope.example
# On the new machine
drkm join
# Invitation code: <paste the drkm1.… code>
# Unattended
DRKM_ENROLLMENT_TOKEN='drkm1.…' drkm join
A machine still in a mesh that's gone
Joining a new mesh leaves the current one first. If the current mesh's authority can't be reached, drkm join asks whether to leave it on this machine only (--leave-here-only says yes up front), and the console offers Leave … here only and join. The old authority keeps listing the machine until someone removes it there.
Join a Mac from the desktop app
Install Darkmatter for Mac first. Then, in your workspace, open the desktop-app menu at the foot of the sidebar and choose Add this Mac to the workspace. It mints a code and opens it straight in Darkmatter, which offers Set up this Mac for your workspace. One click there sets the Mac up as your machine in that workspace: it needs no account or organization of its own, joins the workspace's mesh with no Connect step, and the app then opens your workspace, where you sign in with your Darkmatter account and find the Mac under Isotopes.
See it arrive
The Add isotope dialog reads Joined: name as soon as the new isotope’s first heartbeat lands, within about a minute. After that heartbeat it appears under Settings → Mesh → Isotopes, on the Isotopes page, in drkm console isotopes and in drkm.isotopes(). Opening it there shows its roles, mesh address, dial address, enrollment time and last heartbeat, and offers Rename, Configure network and Remove from mesh.
Lighthouses and addresses
Make an isotope a lighthouse from its entry under Settings → Mesh → Isotopes: Configure network, then add up to 16 host and port rows it can be dialed at. The Lighthouses tab shows the phone book every member pulls and a health line: with none, only known direct addresses can connect; with one, losing it leaves only direct addresses; with two or more, losing one is fine. Two lighthouses is the minimum for a mesh that must survive losing a machine.
If the authority is down, existing tunnels keep working; joins, renewals and blocklist pulls wait until it returns. Host certificates are signed for 10 years, so certificate expiry is not an availability concern.
Remove, leave, restore
Remove from mesh on an isotope’s entry, or drkm enrollment remove, blocks every certificate the authority issued to it; peers stop trusting it at their next refresh, and the removed isotope learns at its own next refresh, turns its mesh off and keeps its identity, keys and data. A new invitation brings it back with the same mesh address, and the authority’s Blocked isotopes list offers Restore.
An isotope leaves on its own from Settings → Mesh → Settings → Leave mesh or with drkm leave. Leaving asks the authority to remove it; if the authority can't be reached, choose Leave here only or run drkm leave --here-only, and remove it at the authority later. An authority never leaves its own mesh: it removes members one at a time, or Delete mesh removes everyone at once and turns its mesh off.
drkm enrollment remove <isotope-id> --url https://isotope.example
drkm leave
Keep the fleet up to date
Each isotope follows published releases itself; nothing is pushed from the authority. Administrators see an update icon at the bottom of the console sidebar, with a red dot when a newer release is out, and Settings → Updates offers Check for updates, Update now, Automatic updates and Alpha releases. On the host, drkm update does the same and redeploys a running isotope. Automatic updates run once a day unless turned off, restart the isotope, and roll back if the new release never becomes healthy.