Portainer - How to upgrade Portainer from 1.24.x to version 2.0 | PlexGuide.com

Portainer How to upgrade Portainer from 1.24.x to version 2.0

  • Stop using Chrome! Download the Brave Browser via >>> [Brave.com]
    It's a forked version of Chrome with native ad-blockers and Google's spyware stripped out! Download for Mac, Windows, Android, and Linux!
Welcome to the PlexGuide.com
Serving the Community since 2016!
Register Now

Edrock200

MVP
Staff
Nov 17, 2019
726
260
Awesome! Thanks for posting this. But question, why does it need to stop all containers? I was able to get 2.0 installed alongside the existing to try it out and I couldn't see much different, at least at first glance. If you want to run it along side, here's the steps. On host:

sudo mkdir /opt/appdata/portainer2

Go into portainer, open portainer, click duplicate/edit
Set the name at the top to portainer2
Remove the published network port (not needed if you are using traefik)
change image path to portainer/portainer-ce:latest
edit in container volume /data to point to /opt/appdata/portainer2
edit traefik label traefik.frontend.rule to Host:portainer2.yourdomain.com
On network tab, set to network plexguide.

Click Deploy.
If you don't have a wildcard DNS cname, make sure to create a dns entry for portainer2 on your domain pointing to your host.

Then go to https://portainer2.yourdomain.com to take v2 for a spin.
 

doob

Administrator
Project Manager
Jun 7, 2020
971
509
you run portainer on second instances ... and its not an inreplace

the cotainer need to stop before any authentificatiosn failes

its a simple fail safe to for securtity reasons

when docker a faster redboot as oauth docker .. its not using the google-authenficitaions mode (( ==>>>> open <<<<---- )) for the world
and i used the alpine version

smaller and faster ^^
 

Edrock200

MVP
Staff
Nov 17, 2019
726
260
you run portainer on second instances ... and its not an inreplace

the cotainer need to stop before any authentificatiosn failes

its a simple fail safe to for securtity reasons

when docker a faster redboot as oauth docker .. its not using the google-authenficitaions mode (( ==>>>> open <<<<---- )) for the world
and i used the alpine version

smaller and faster ^^
Ahh gotcha. After playing with it in the second instance, I just used the second instance to change the first instance to the new image, then deleted the second image.
 

fyrstrm

Experienced
Donor
May 1, 2020
95
30

bodgeup

Experienced+
Staff
FreeLancer
Donor
Aug 12, 2018
116
39
Still waiting on my repo pull request portainer fix lol! its a lot simpler than people imagine. Just add -ce to portainer/portainer:latest so its portainer/portainer-ce:latest. On the portainer containers tag value in portainer (also possible via function modding too but as with everything there are many ways to perform 1 task!)
 
  • Like
Reactions: 1 user

ZeroFux

Active
Mar 19, 2019
39
4
I updated my Portainer to 2.0 a week or so ago but this morning I noticed that it was back to 1.24.1. Any idea why that would be? I didn't install a V2 instance of portainer, I just update the one I had in place. I'm doing a full backup and then I'm going to update it again this afternoon.
 

Edrock200

MVP
Staff
Nov 17, 2019
726
260
I don't think you can update the portainer image from within portainer, since it would.have to stop itself to redeploy. If you really want to do it from the gui vs custom yml file, on the host make /opt/appdata/portainer2 (make your respective DNS entry as well.) Open portainer, open the portainer container, click dupe/edit. Name the container portainer2, under volumes change the config path to /opt/appdata/portainer2, under labels change the traefik front end rule urls to portainer2.yourdomain.com. deploy.

Log into portainer2.yourdomain.com. Now open the original portainer, dupe/edit, change the image to portainer/portainer-ce. Click deploy.

Log into portainer.yourdomain.com and make sure it works. If so you can remove portainer2 container now, or stop it and keep it as a backup.
 

doob

Administrator
Project Manager
Jun 7, 2020
971
509
Got damm why so complicated.

Go to
/opt/coreapps/apps
nano portainer.yml
Change the image to portainer/portainer-ce
sudo ansible-playbook portainer.yml

Well done

2mins work . And you dont need to edit the labels duplicate/edit and lot of other parts
 
  • Like
Reactions: 1 users

bodgeup

Experienced+
Staff
FreeLancer
Donor
Aug 12, 2018
116
39
Got damm why so complicated.

Go to
/opt/coreapps/apps
nano portainer.yml
Change the image to portainer/portainer-ce
sudo ansible-playbook portainer.yml

Well done

2mins work . And you dont need to edit the labels duplicate/edit and lot of other parts

Hence why submitted pull request on pgblitz repos for v2 portainer simple edit of the portainer tag and job done lol!!

View this thread
 
  • Like
Reactions: 1 users

doob

Administrator
Project Manager
Jun 7, 2020
971
509
I don't have any permissions to merg PRS
Only admin and @timekills can do it
 

timekills

VIP
Staff
Donor
Sep 12, 2018
383
196
Done.
Now using portainer-ce image.
Tested in-place upgrade through pgblitz script on a couple instances and had zero issues, so made permanent in the core apps section.

It will eventually update for users if you are running Watchtower but if you want to update manually through PGBlitz script, simply run
[5] PG Box : Apps ~ Core, Community & Removal
then
[1] PG Box: Core
then
[1] Utilize Core Box - PGBlitz's
then where it says Type app to queue install | Press [ENTER]: enterportainer.

It will tell you it's already installed, but go ahead and reinstall it.
 
  • Like
Reactions: 1 user

Recommend NewsGroups

      Up To a 58% Discount!

Trending