← Back to Blog

Service Token Authentication for VersionOps Agents

How to create service tokens, authenticate Linux agents, and keep your inventory secure.

Why service tokens

A service token lets agents access the platform with least privilege, without user accounts, and scoped to a single organization. Think of it as a per-environment key that you can rotate without touching user access.

What your team gets

  • Fast agent onboarding without extra roles
  • Separate tokens per environment (prod/stage) and team
  • Smooth rotation: issue a new token and switch agents gradually

How the flow looks

  1. Admin creates a token in Settings → Service Tokens
  2. The token is shown once (format vops_agent_...)
  3. Agents connect with it and start reporting versions

Recommended roles and scoping

  • Prod vs Stage: separate tokens to limit blast radius
  • Per team (ops/sec/platform): easier to rotate and track ownership
  • Per region: if latency or data boundaries matter

Rotation checklist (fast and safe)

  1. Issue a new token, update a few canary hosts
  2. Watch last_seen for a day, then roll out to the fleet
  3. Revoke the old token, note rotation in your runbook

Security tips

  • Store the token in a secrets manager (Vault, SSM)
  • Use different tokens for prod/stage
  • Rotate on schedule and disable unused tokens
  • Keep tokens out of git/CI logs

Common pitfalls to avoid

  • Sharing one token across all environments
  • Storing tokens in git/ansible vars without encryption
  • Forgetting to disable tokens after experiments

Quick CLI example

# Configure agent with a fresh token
sudo versionops-agent config --backend=https://api.versionops.com --token=vops_agent_NEW
sudo systemctl restart versionops-agent

Helpful links

Ready to try VersionOps?

Start tracking software versions across your infrastructure today.

Start Free Trial