Skip to main content

Force Update Agent

In some cases, you may need to manually force an update of the Daployi Edge Agent on a host. This script will inspect the currently running agent, preserve its environment variables and security settings, and restart it with the latest version.

Execute Force Update

Run the following command on the host where the agent is installed:

bash -c "$(curl -sSL https://docs.daployi.io/update-agent.sh)"

What this script does:

  1. Fetches latest version: Queries the Daployi version endpoint to find the most recent agent tag.
  2. Inspects current container: Extracts environment variables (like PROJECT_TOKEN) and flags (like --privileged or --cap-add) from the existing daployi-agent container.
  3. Pulls new image: Downloads the latest daployi/daployi-agent image.
  4. Restarts Agent: Stops and removes the old container, then starts the new one with preserved configuration.