{"id":40290,"date":"2022-07-20T19:03:04","date_gmt":"2022-07-20T19:03:04","guid":{"rendered":"https:\/\/www.techrepublic.com\/?p=3985033"},"modified":"2022-07-20T19:03:04","modified_gmt":"2022-07-20T19:03:04","slug":"how-to-update-portainer-to-the-latest-version","status":"publish","type":"post","link":"https:\/\/cloudnewshub.com\/?p=40290","title":{"rendered":"How to update Portainer to the latest version"},"content":{"rendered":"<div id>\n<p> Jack Wallen shows you how easy it is to update the Portainer container management platform to the latest version. <\/p>\n<\/div>\n<div id>\n<figure id=\"attachment_3985037\" aria-describedby=\"caption-attachment-3985037\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"size-article wp-image-3985037\" src=\"http:\/\/cloudnewshub.com\/wp-content\/uploads\/2022\/07\/how-to-update-portainer-to-the-latest-version.jpg\" alt=\"system update operation and service maintenance network via engineer\" width=\"770\" height=\"578\"><figcaption id=\"caption-attachment-3985037\" class=\"wp-caption-text\">Image: ontsunan\/Adobe Stock<\/figcaption><\/figure>\n<p>Portainer has been, for some time, my <a href=\"https:\/\/www.techrepublic.com\/search\/?q=Portainer\" target=\"_blank\" rel=\"nofollow noopener sponsored noreferrer\">go-to container management platform<\/a>. It\u2019s not only very powerful, but it\u2019s also quite user-friendly, and in the game of containers, that\u2019s an impressive combination.<\/p>\n<p>Portainer is deployed as a container itself. And with the development team frequently releasing new versions, you always want to make sure you stay on top of that. To that end, any time you log into your Portainer instance and notice that a new version is available (<strong>Figure A<\/strong>), it\u2019s time to upgrade as soon as possible.<\/p>\n<p><strong>Figure A<\/strong><\/p>\n<figure id=\"attachment_3985035\" aria-describedby=\"caption-attachment-3985035\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"size-article wp-image-3985035\" src=\"http:\/\/cloudnewshub.com\/wp-content\/uploads\/2022\/07\/how-to-update-portainer-to-the-latest-version-1.jpg\" alt width=\"770\" height=\"109\"><figcaption id=\"caption-attachment-3985035\" class=\"wp-caption-text\">My current Portainer deployment is out of date.<\/figcaption><\/figure>\n<p>Because Portainer is a container, you can\u2019t just update the current deployment; instead, you have to stop and remove your current deployment and redeploy. Fortunately, you can deploy Portainer with persistent storage (as I show in <a href=\"https:\/\/www.techrepublic.com\/article\/how-to-deploy-the-portainer-container-management-tool-with-persistent-storage\/\" target=\"_blank\" rel=\"nofollow noopener sponsored noreferrer\">How to deploy the Portainer container management tool with persistent storage<\/a>), which means when you redeploy all of your configurations and containers will remain intact.<\/p>\n<p>With that said, let\u2019s update Portainer to the latest version.<\/p>\n<p><strong>SEE: <a href=\"https:\/\/www.techrepublic.com\/resource-library\/whitepapers\/hiring-kit-back-end-developer\/\" target=\"_blank\" rel=\"nofollow noopener sponsored noreferrer\">Hiring kit: Back-end Developer<\/a> (TechRepublic Premium)<\/strong><\/p>\n<h2>What you\u2019ll need<\/h2>\n<p>To follow along, you\u2019ll need a machine running Docker or Docker Community Edition. If you don\u2019t already have a Portainer instance already up, you can still deploy the latest release, just skip the first steps of stopping and removing the older instance. You\u2019ll also need a user who belongs to the docker group on your hosting server.<\/p>\n<p>Let\u2019s get to the update.<\/p>\n<h2>How to stop and remove the current Portainer container<\/h2>\n<p>The first thing you must do is located the Portainer container ID with the command:<\/p>\n<p><code>docker ps -a | portainer<\/code><\/p>\n<p>You should see something like this in the output:<\/p>\n<aside class=\"pinbox right\">\n<h3 class=\"heading\">Must-read developer coverage<\/h3>\n<\/aside>\n<p><code>0eab77c40087 &nbsp; portainer\/portainer-ce&nbsp; &nbsp; &nbsp; \"\/portainer\" &nbsp; &nbsp; &nbsp; &nbsp; 4 weeks ago&nbsp; Up 3 weeks&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0.0.0.0:8000-&gt;8000\/tcp, :::8000-&gt;8000\/tcp, 0.0.0.0:9443-&gt;9443\/tcp, :::9443-&gt;9443\/tcp, 9000\/tcp &nbsp; &nbsp; &nbsp; &nbsp; portainer<\/code><\/p>\n<p>The random string of characters is the container ID (in the above case it\u2019s 0eab77c40087). To stop and remove the container, you only need to use the first four characters. First, stop the container with:<\/p>\n<p><code>docker stop 0eab<\/code><\/p>\n<p>Make sure to change out the first four characters with those of your running Portainer container.<\/p>\n<p>Next, remove the container with:<\/p>\n<p><code>docker rm 0eab<\/code><\/p>\n<h2>How to deploy the new version<\/h2>\n<p>Before we run the deploy command, let\u2019s first pull down the latest version with:<\/p>\n<p><code>docker pull portainer\/portainer-ce:latest<\/code><\/p>\n<p>Once the new image has pulled down, deploy the latest Portainer version with:<\/p>\n<p><code>docker run -d -p 8000:8000 -p 9443:9443 --name=portainer --restart=always -v \/var\/run\/docker.sock:\/var\/run\/docker.sock -v portainer_data:\/data portainer\/portainer-ce<\/code><\/p>\n<p>Give the container time to deploy. After a minute or so, point your browser to http:\/\/SERVER:9443, where SERVER is the IP address of the hosting server, and log back into Portainer with the same credentials you used previously. You should see the new version has been deployed (<strong>Figure B<\/strong>).<\/p>\n<p><strong>Figure B<\/strong><\/p>\n<figure id=\"attachment_3985036\" aria-describedby=\"caption-attachment-3985036\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-3985036\" src=\"http:\/\/cloudnewshub.com\/wp-content\/uploads\/2022\/07\/how-to-update-portainer-to-the-latest-version-2.jpg\" alt width=\"254\" height=\"126\"><figcaption id=\"caption-attachment-3985036\" class=\"wp-caption-text\">I went from version 2.13.1 to 2.14.1.<\/figcaption><\/figure>\n<p>And that\u2019s all there is to updating Portainer to the latest release. Because we originally deployed with persistent storage, this process is incredibly easy and painless.<\/p>\n<p><em><strong>Subscribe to TechRepublic\u2019s <a href=\"https:\/\/www.youtube.com\/channel\/UCKyMiy1zmJ7aZ8aP6DLZLIA\" target=\"_blank\" rel=\"nofollow noopener sponsored noreferrer\">How To Make Tech Work on YouTube<\/a> for all the latest tech advice for business pros from Jack Wallen.<\/strong><\/em><\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Jack Wallen shows you how easy it is to update the Portainer container management platform to the latest version. Image: ontsunan\/Adobe Stock Portainer has been, for some time, my go-to container management platform. It\u2019s not only very powerful, but it\u2019s also quite user-friendly, and in the game of containers, that\u2019s an impressive combination. Portainer is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":40291,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[40,783],"tags":[],"class_list":["post-40290","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cloud","category-cloudsync"],"_links":{"self":[{"href":"https:\/\/cloudnewshub.com\/index.php?rest_route=\/wp\/v2\/posts\/40290","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cloudnewshub.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudnewshub.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudnewshub.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudnewshub.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=40290"}],"version-history":[{"count":0,"href":"https:\/\/cloudnewshub.com\/index.php?rest_route=\/wp\/v2\/posts\/40290\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cloudnewshub.com\/index.php?rest_route=\/wp\/v2\/media\/40291"}],"wp:attachment":[{"href":"https:\/\/cloudnewshub.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=40290"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudnewshub.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=40290"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudnewshub.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=40290"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}