Agent Install Guide
This guide covers the intended ByteOr Cloud agent bootstrap pattern for hosted SaaS environments.
Bootstrap model
Agent enrollment is a two-step credential model:
- An environment-scoped enrollment token with
agent:enrollis used once to register the node. - The control plane returns a per-agent runtime API key that the node keeps for heartbeats, bundle pulls, and artifact uploads.
Do not keep using the enrollment token after registration succeeds.
Required values
Prefer these environment variable names in new install surfaces:
BYTEOR_API_BASE_URLBYTEOR_AGENT_IDBYTEOR_AGENT_API_KEY
Avoid older generic names in new docs or scripts.
Enrollment flow
Register the agent against the project environment:
Minimal request body:
If name is omitted, the backend derives one from the host name and makes it unique.
Persist the response values needed for runtime operation, especially the returned agent ID and runtime API key.
Runtime operations
After enrollment, the installed agent should use the per-agent runtime key for:
- heartbeat updates
- deployment fetch and activation
- signing-key refresh
- artifact upload
Artifact upload is handled by:
The runtime key must include the agent:artifact_upload scope for artifact submission.
Recommended install sequence
- Install the agent binary and service unit on the target host.
- Set
BYTEOR_API_BASE_URLto the hosted API origin. - Use the environment enrollment token once during first boot or provisioning.
- Store
BYTEOR_AGENT_IDandBYTEOR_AGENT_API_KEYreturned by the control plane. - Rotate the host into normal service using only the per-agent runtime key.
Validation checks
After installation, confirm:
- the agent appears in the environment agent list
- heartbeat updates are arriving
- the latest deployment becomes visible to the agent
- artifact upload succeeds when the agent has the correct scope
Failure handling
401responses usually mean the runtime key is missing, expired, or wrong for the agent403responses usually mean the key lacks the required scope429responses indicate the agent hit abuse controls on heartbeat or artifact routes and should back off before retrying
Operational notes
- enrollment tokens are provisioning credentials, not steady-state runtime credentials
- agent API keys are bound to the specific agent identity and route scope
- use environment-specific enrollment tokens to avoid cross-environment drift