Updating the Edge Agent
Last updated
Last updated
To update the Portainer Edge Agent to the latest version, follow the below instructions for your Edge environment.
Always match the agent version to the Portainer Server version. In other words, when you're installing or updating to Portainer 2.24.0 make sure all of the agents are also on version 2.24.0.
Before beginning any update, we highly recommend taking a backup of your current Portainer configuration.
Portainer now also has the ability to update Edge Agents on Docker Standalone directly from within the UI.
To upgrade the Portainer Edge Agent on a Docker Standalone platform, you will first need to note the Edge identifier and the Edge key for the Edge environment. To find these values, log into Portainer and click Environments, then click the name of the environment you are updating.
At the top of the page in the Edge information section, you will see the two values you require in the next steps.
Next, on the Edge environment, we need to stop and remove the Edge Agent container.
We also want to ensure we have the updated version of the container image locally:
To deploy the updated Edge Agent, replace the your-edge-identifier-here
and your-edge-key-here
values in the following command with those you retrieved earlier, then run the command:
To update the Portainer Edge Agent on a Docker Swarm environment, run the following commands.
First, to ensure you have the updated container image locally, pull the image:
Then, update the service to use the new image version:
To update the Portainer Edge Agent on a Kubernetes environment, you will need to first download an updated YAML manifest, then apply that manifest to your existing environment.
To download the manifest, you can use one of the following commands:
To apply this manifest to your environment, run the following command: