Skip to content

Agent updates

How the Legion agent updates itself, and when it waits for renters.

On this page

Automatic updates

The agent updates itself. Each release is pinned by its SHA-256. Rental containers keep running during an update. If the new agent doesn't sync within 10 minutes, it rolls back.

Each agent reports its version as legion_agent_build_info. See Monitoring with Prometheus to alert on it, and on an update that is held back.

Waiting for renters

Restarting the agent drops renters' SSH sessions. So while a renter is connected, a routine update waits until one of these:

  • no renter is connected;

  • the nightly window, 03:00 to 05:00 UTC;

  • 48 hours have passed.

Security releases install at once.

Update by hand

Run the install command again on the machine. It asks for no token on an enrolled host. It installs the current release and restarts the agent, and running rentals keep going.

Needs an agent update

A host whose agent is too old to run Legion's runtime shows Needs an agent update, and renters can't rent it. Update the agent and it becomes rentable again by itself.