Fleet and status
Enroll a new node
POST/api/v1/admin/agent/enroll
Who can use this: Site adminsAs Markdown
Do this before installing homelab-agent on the new node. The code is tied to the host name you give. The agent there trades it for its own sign-in, then checks in by itself about once a minute. Enrolling a host name again later (after its agent has been offline too long, say) keeps the same identity.
Parameters
| Name | Where | What it is |
|---|---|---|
| hostname required | body | The node's name, exactly as its agent is set up with it.e.g. prod-homelab12 |
| ttl_minutes | body | How many minutes the code stays usable. The default is 10. |
Good to know
- The code works once, and only until it expires.
- Hand it over by preseeding the homelab-agent/enrollment_code answer before installing the agent; homelab-cli prints the exact line to run.