Skip to content

Agent upgrades

Updating the control plane (falak-ctl update) does not touch your servers. Each server keeps its falak-agent until you upgrade it. The new control plane image ships the matching agent build and tells you which servers are behind.

  • Servers list: the Agent column shows each version and update available.

  • After an update, falak-ctl update prints how many agents are older.

  • On the control plane host:

    Terminal window
    falak-ctl artisan falak:agents # shipped build and number of outdated agents
    falak-ctl artisan falak:agents --outdated --count

An agent is outdated when its binary checksum differs from the shipped build (development builds can share version strings), except that an agent newer than the shipped release never is.

Servers → Update next to update available in the server’s row, or open the server and click Update agent (header or banner).

Upgrading needs fleet.agents.manage (owners and admins).

  1. The agent downloads the build from your panel (/install/agent/linux-<arch>) and verifies its SHA-256.
  2. It runs falak-agent.new version to make sure the binary works on this machine (a wrong-architecture or truncated build never replaces a working agent).
  3. It swaps /usr/local/bin/falak-agent atomically; the previous binary stays as /usr/local/bin/falak-agent.prev.
  4. It restarts (supervised programs restart with it).
  5. Its next heartbeat reports the new version and binary checksum; the upgrade is succeeded.

The upgrade fails if the agent has not come back with the new build within 600 seconds (FALAK_AGENT_UPGRADE_TIMEOUT, minimum 60). Failures raise the Agent upgrade failed alert (fleet.agent_upgrade_failed).

On the server
sudo mv /usr/local/bin/falak-agent.prev /usr/local/bin/falak-agent
sudo systemctl restart falak-agent

Agents report the features they support. The control plane strips new optional payload fields for agents that do not support them yet, so an older agent keeps working with a newer control plane until you upgrade it. After an upgrade, Falak re-applies Caddy and telemetry configuration so the agent gets the new fields.

“Update all agents” was verified by hand on a real fleet of three servers (0.2.x). The automated suite covers single upgrades and the batching logic.