Upgrading the Portainer Agent

The Portainer Agent is simple to upgrade, this process can be done either through the Portainer UI or through the CLI.

Through the Portainer UI

The simplest way to upgrade the Portainer Agent is through the Portainer UI. Step 1: Navigate to the Services view through the menubar of Portainer and select the checkbox of thhe Agent service you wish to upgrade, and click the update button.

Step 2: A message will appear asking if you want to force an update. Make sure that 'Pull latest image version' is selected as shown below before clicking the update button.

A confirmation message like the one below should appear in the top right corner of the Portainer UI if the Agent has been successfully updated.

Through the CLI

Note: You need to make sure you are accessing the swarm manager node via the CLI to issue the below command

Enter the below command into the CLI (assuming your Docker service is called portainer). You can replace portainer with the name of your service if yours is named something different.

docker service update --image portainer/portainer:latest portainer

You are done!

Last updated