Start
Add a machine in one command
A machine joins your network with one command. After it runs, the machine has a name, its tags, a private address and a place in your policy, and the console shows what is left, if anything. You do not edit a file, open a port or come back to the console to finish.
The command
In VergMesh, add a node and copy the command it shows, or use an enrollment key (below). Run it on the machine as root:
curl -fsSL https://api.cloudverg.com/install.sh | sudo sh -s -- --token vgm_...The same command works on Linux and on a Mac. Add --name my-node to choose the node's name. Without it the node is named after the machine's host name.
What it does on the machine
- Installs the WireGuard tools, nftables and curl from your distribution's packages.
- Downloads the agent and checks it against its published SHA-256.
- Makes the machine's own key pair. The private key never leaves the machine.
- Joins the network with the one-time token, gets its address and its peers, and starts the agent as a service so it comes back after a restart.
It takes under a minute. The node page in the console changes by itself the moment the machine reports.
Tags and enrollment keys
A token from the Add node page works once, for one machine. For many machines, such as an image, an autoscaling group or a row of servers you are about to set up, make an enrollment key under the network's Settings, or with the API. One key can join as many machines as you allow, for as many days as you choose (at most 90).
A key carries what every machine that joins with it should be: its kind (server, cloud gateway or site gateway), provider, region, whether it accepts connections, whether it is a hub, and its tags. Policy rules written for a tag cover every machine that joins with it, so nothing needs editing when you add the next one. A rule such as allow tag:web -> tag:db tcp/5432 already covers the next web server before it exists.
curl -s -X POST https://api.cloudverg.com/v1/mesh/networks/prod/enrollment-keys \
-H "Authorization: Bearer $VERG_API_KEY" -H "Content-Type: application/json" \
-d '{"label":"web servers","max_uses":20,"kind":"server","provider":"hetzner","region":"nbg1","tags":["web","prod"]}'The answer carries the key once, as enrollment_token, and the finished install_command. The key is never shown again. GET /v1/mesh/networks/prod/enrollment-keys lists the open keys with their first characters, settings and use, and DELETE on one revokes it.
When the network asks for approval
An admin can turn on Approve new nodes for a network (how it works). Then a machine that joins waits, with no peers, until an admin approves it. A server you start yourself needs a pre-approved key: an enrollment key made with "They skip admin approval" ticked ("pre_approved": true in the API, the default) joins at once. A token from Add node is made for one named machine and also joins at once. If the network also sets key expiry, the node's key runs out after that many days unless it is a tagged server, and a new install command on the machine renews it (key expiry).
The Setup card
Every node page starts with a Setup card that answers one question: is this machine fully covered by every product? It lists, in plain words:
- whether the machine has joined and is reporting, and whether its agent is current;
- whether it reaches every peer, directly or through a hub, and by name the ones it cannot;
- whether the machine's own firewall lets the mesh in;
- what the VergShield policy says about it: the rules that name it, what may reach it and what it may reach, and a warning when the policy is enforced and nothing covers it;
- what the outside check found open on its public address;
- its server health from VergVitals, the private checks from VergMind that watch it, and the lanes from VergRail that start or end there.
Items that are done fold into one line. Items that need you say what to do and carry the button for it. Items that are optional, such as a check that the machine answers on a port, are listed apart under Optional and never count against "done". Each is one click: the form opens already filled in, and it offers a check only from a node that the policy lets reach the port. While a machine has not joined, the card says so and fills in by itself when it does. The same list is in the API as GET /v1/mesh/networks/prod/nodes/web-1/setup.
When something is wrong on the machine
Run sudo verg-agent doctor on the machine. It checks the machine from its own side. The Setup card shows what the console can see from outside.
Before you enforce a policy
When you publish a policy in enforce mode, VergShield first checks the connections the nodes saw in the last 24 hours against it. If some would be dropped it lists them, each with the rule that would let it through, and you choose: add those rules and enforce, or enforce anyway. Through the API the answer is a 409 would_drop until the request carries "confirm_drops": true.