Enroll a computer
Add a computer to your organisation from its terminal, with or without a browser on it.
Enrolling a computer adds it to your Connect organisation, so its hubs and devices appear in Connect. The computer needs the Cambrionix Connect Suite installed and running.
Headless: one command with a code
Use this for servers, CI runners and anything else without a browser. Nobody signs in on the computer itself.
- In Connect, open Computers → Add a computer and choose Headless enrollment.
- Optionally give the computer a name. Without one, the CLI uses its host name.
- Choose Create enrollment command, pick the computer's operating system and copy the command.
- Run it on the computer. The page shows when the computer has joined.
The command installs the CLI from a signed link and enrolls the computer. It looks like this:
curl -LsSf '<signed install link>' | sh -s -- --enroll <code>
$env:CAMBRIONIX_ENROLL_CODE='<code>'; irm '<signed install link>' | iex
If the CLI is already installed, run cambrionix-cli enroll --code <code> instead.
With a browser
Run cambrionix-cli enroll (or cambrionix-cli tui for the interactive screen).
The CLI prints a link and a QR code and opens your browser. Approve the computer there, or scan the
QR code and approve it on your phone. Add --no-browser on a computer without a desktop.
Moving a computer to another organisation
A computer belongs to one organisation at a time. If it's already enrolled, enroll asks before
leaving the current organisation; pass --replace to leave without asking. The CLI only leaves
the old organisation once it has the new invite, so a mistyped or expired code never leaves the
computer without an organisation.
cambrionix-cli enroll --code <code> --replace --yes
cambrionix-cli unenroll # leave without joining another organisation
Scripting
enroll --json prints the result for provisioning tools:
{
"organizationId": "7c9e6679-7425-40de-944b-e07fc1f99a3d",
"computerId": "35aea4bc-44d3-4e9e-9b3c-c33b965c5639",
"serviceId": "36d5a398-e3ef-55f9-8b09-ba6351511464",
"name": "build-07"
}
The code can also come from the CAMBRIONIX_ENROLL_CODE environment variable, which keeps it out
of shell history and process lists.
Troubleshooting
| Message | What to do |
|---|---|
Relay API is not reachable | Install or start the Connect Suite, then run cambrionix-cli services list. |
The code may have been used already or expired | Create a new code in Connect. |
this computer is already enrolled | Add --replace to move it to the new organisation. |
| Anything else | Run cambrionix-cli doctor, then cambrionix-cli support bundle --preset enrollment for support. |