Updating on Docker Swarm
To update the Portainer Server and the agents on Docker Swarm, first run the following command on the manager node of your Docker Swarm cluster:
docker service ls Make note of the service names for Portainer. You will need them later.
ID NAME MODE REPLICAS IMAGE PORTS
tb9gtxc647fw portainer-agent_agent global 3/3 portainer/agent:lts
m3a3mtuy55ed portainer_portainer replicated 1/1 portainer/portainer-ee:lts *:8000->8000/tcp, *:9000->9000/tcpTo update Portainer Server to the most recent version, run one of the sets of commands below depending on your edition of Portainer (replace the portainer_portainer service name if your setup differs):
docker pull portainer/portainer-ee:lts
docker service update --image portainer/portainer-ee:lts --publish-add 9443:9443 --force portainer_portainerdocker pull portainer/portainer-ce:lts
docker service update --image portainer/portainer-ce:lts --publish-add 9443:9443 --force portainer_portainerTo update the Portainer Agent to the latest version, run the commands below (replace the portainer_agent service name if your setup differs):
docker pull portainer/agent:lts
docker service update --image portainer/agent:lts --force portainer_agent This will deploy the newest version of Portainer and the agent across your swarm and upgrade the Portainer database to match.
When this is finished, go to https://your-server-address:9443 or http://your-server-address:9000 and log in. You should notice that the update notification has disappeared and the version number has been updated.
Last updated
Was this helpful?