Install the Linux agent
Copy the one-line install command from the CloudStats UI, run it as root on a Linux host, and confirm the systemd service is active.
Updated Nov 7, 2026
Install from the CloudStats website. The site creates a one-time enrollment and shows a curl command. Downloading the script does not consume the token. Enrollment happens on the host after the binary is installed.
Placeholder command#
Copy the command from Add server. In this documentation the token is a placeholder only:
curl -fsSL https://install.cloudstats.me/<ENROLLMENT_TOKEN> | sudo bash<ENROLLMENT_TOKEN> is not a real token. Replace it with the value from the CloudStats UI, or paste the command the UI already filled in. These articles never ask you to send a token, credential, or agent.json file.
The UI command has no extra flags, API URL, organization id, or server id.
What the current installer does#
New installs pin agent v0.2.2. After you run the command as root, the script:
- Confirms Linux, root, and amd64 or arm64
- Downloads that version’s binary and
SHA256SUMSover HTTPS - Verifies SHA256 before installing
- Installs
/usr/local/bin/cloudstats-agent - Creates
/etc/cloudstatsand/var/lib/cloudstats(mode0700) - Installs
/usr/local/lib/cloudstats/uninstall.shand/usr/local/lib/cloudstats/update.sh - Installs systemd units for the agent, uninstall path, and update path
- Enrolls using the environment variable
CLOUDSTATS_ENROLL_TOKEN(not process arguments) - Writes
/etc/cloudstats/agent.json(mode0600) only after enroll succeeds - Enables
cloudstats-agent-uninstall.pathandcloudstats-agent-update.path - Enables and starts
cloudstats-agent.service
On success it prints Server connected successfully. plus:
systemctl status cloudstats-agent
journalctl -u cloudstats-agentIf enrollment fails, any existing agent.json is left unchanged and the script exits non-zero. The uninstall path unit is not enabled in that failure path.
Confirm the service#
systemctl status cloudstats-agent
journalctl -u cloudstats-agentsystemctl is-active --quiet cloudstats-agent.service is the check the installer uses before it prints success.
You can also print the running binary’s version:
/usr/local/bin/cloudstats-agent versionOn a v0.2.2 install that prints v0.2.2.
Do not paste /etc/cloudstats/agent.json into tickets or chat. It holds the permanent agent credential. The enrollment token is not stored on disk.
Token errors#
GET of the install URL still returns a script when the token matches the expected format. The token is consumed only when enroll succeeds.
| Situation | What you see |
|---|---|
| Invalid, expired, or revoked token | Enrollment fails with enrollment token is invalid, expired, or revoked |
| Token already used | Enrollment fails with enrollment token was already used |
| CloudStats API is not ready | Enrollment fails with CloudStats API is not ready; retry shortly |
Create a new install command from the website and run it again. See Troubleshooting and Reinstall and server identity.
