diff --git a/SUMMARY.md b/SUMMARY.md index f932a544..47d6719b 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -45,6 +45,7 @@ * [Updating on Kubernetes](start/upgrade/kubernetes.md) * [Updating on Nomad](start/upgrade/nomad.md) * [Updating the Edge Agent](start/upgrade/edge.md) + * [Updating from Portainer 1.x](start/upgrade/from-1.x.md) * [Switching to Portainer Business Edition](start/upgrade/tobe/README.md) * [Upgrade to Business Edition from within Portainer Community Edition](start/upgrade/tobe/inapp.md) * [Docker Standalone](start/upgrade/tobe/docker.md) @@ -310,7 +311,7 @@ * [Portainer Academy](https://academy.portainer.io) * [YouTube](https://www.youtube.com/channel/UC7diMJcrULjDseq5yhSUZgg/videos) * [GitHub](https://github.com/orgs/portainer/discussions) -* [Slack](https://join.slack.com/t/portainer/shared\_invite/zt-21zpww5ab-mG\_lA7UXbWL3HW3sPqjqEA) +* [Slack](https://join.slack.com/t/portainer/shared_invite/zt-21zpww5ab-mG_lA7UXbWL3HW3sPqjqEA) * [Discord](https://discord.com/invite/j8fVken) * [Open a support request](https://www.portainer.io/portainer-business-support) diff --git a/start/upgrade/README.md b/start/upgrade/README.md index c28afd5a..baeb0e74 100644 --- a/start/upgrade/README.md +++ b/start/upgrade/README.md @@ -52,6 +52,14 @@ If you would prefer to manually update your Portainer installation, choose your [kubernetes.md](kubernetes.md) {% endcontent-ref %} +If you are coming from the Portainer 1.x branch, there are steps you **must** follow in order to update successfully: + +{% content-ref url="from-1.x.md" %} +[from-1.x.md](from-1.x.md) +{% endcontent-ref %} + + + ### Update the Portainer Agent To update the standard (non-Edge) Portainer Agent, you can find instructions in the above platform-specific links ([Docker Standalone](docker.md#agent-only-upgrade), [Docker Swarm](swarm.md), and [Kubernetes](kubernetes.md)). @@ -64,7 +72,7 @@ If you are using the Portainer Edge Agent, we have specific update instructions ### Upgrading to Business Edition -If you are coming from Portainer CE or the 1.24.x branch, we have guides for you as well. +If you are coming from Portainer CE and want to move to BE, we have guides for you as well. {% content-ref url="tobe/" %} [tobe](tobe/) diff --git a/start/upgrade/docker.md b/start/upgrade/docker.md index f62c9389..072ab48e 100644 --- a/start/upgrade/docker.md +++ b/start/upgrade/docker.md @@ -4,6 +4,10 @@ Always match the agent version to the Portainer Server version. In other words, when you're installing or updating to Portainer 2.21.4 make sure all of the agents are also on version 2.21.4. {% endhint %} +{% hint style="danger" %} +If you are updating from the 1.x version of Portainer, you **must** first [update to 2.0.0](from-1.x.md) **before** updating to the newest version or you will run into issues. +{% endhint %} + {% hint style="danger" %} Before beginning any update, we highly recommend [taking a backup](../../admin/settings/general/#back-up-portainer) of your current Portainer configuration. {% endhint %} diff --git a/start/upgrade/from-1.x.md b/start/upgrade/from-1.x.md new file mode 100644 index 00000000..dd1185c1 --- /dev/null +++ b/start/upgrade/from-1.x.md @@ -0,0 +1,79 @@ +# Updating from Portainer 1.x + +If you are updating a Portainer install that is currently running an image from the 1.x series, there are additional steps you must first take before updating to the most recent version. This document covers the steps depending on your current version - start from the instructions for your current version and work your way down. + +* [Version 1.24.0 or older](from-1.x.md#updating-from-versions-older-than-1.24.1) +* [Version 1.24.1 or 1.24.2](from-1.x.md#updating-from-1.24.1-and-1.24.2) + +{% hint style="info" %} +We only provide instructions for Docker Standalone and Docker Swarm environments here, as Portainer 1.x did not support Kubernetes environments. +{% endhint %} + +## **Updating from versions older than 1.24.1** + +If you are running a version prior to 1.24.1, you must first update to `portainer/portainer:1.24.2`. Your other applications/containers will not be removed. + +### Docker Standalone + +Use the following commands to stop then remove the old version, then run Portainer release 1.24.2. + +``` +docker stop portainer + +docker rm portainer + +docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer:1.24.2 +``` + +### Docker Swarm + +Run the following command to update the Portainer service to 1.24.2. This assumes your service is named `portainer_portainer` (you can confirm this by checking the output of `docker service ls`). + +``` +docker service update --image portainer/portainer:1.24.2 --force portainer_portainer +``` + + + +Verify that you are running version 1.24.2 by logging into Portainer and reading the version number on the bottom-left of the UI. You should now proceed to [update to version 2.0.0](from-1.x.md#updating-from-1.24.1-and-1.24.2). + +## Updating from 1.24.1 and 1.24.2 + +If you are running a version prior to 1.24.1 and want to update to the latest Portainer release, you must first update to `portainer/portainer-ce:2.0.0`, use the following commands to stop then remove the old version. Your other applications/containers will not be removed. + +### Docker Standalone + +``` +docker stop portainer +docker rm portainer +``` + +Now that you have stopped and removed the old version of Portainer, you must ensure that you have the latest version of the 2.0.0 image locally. You can do this with a `docker pull` command: + +``` +docker pull portainer/portainer-ce:2.0.0 +``` + +Finally, deploy the updated version of Portainer: + +``` +docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:2.0.0 +``` + +### Docker Swarm + +Run the following command to update the Portainer service to 2.0.0. This assumes your service is named `portainer_portainer` (you can confirm this by checking the output of `docker service ls`). + +``` +docker service update --image portainer/portainer-ce:2.0.0 --force portainer_portainer +``` + + + +Portainer CE 2.0.0 will now be deployed on your system, using the persistent data from the previous version, and will also update the Portainer database to the new version. + +When the deployment is finished, go to `http://your-server-address:9000` and log in. Verify that you are running version 2.0.0 by logging into Portainer and reading the version number on the bottom-left of the UI. + +## Updating from 2.0.0 + +Once you have updated to 2.0.0 you can proceed with the [standard update instructions](./) for your platform, or if you are moving to Business Edition you can follow the [upgrade instructions](tobe/). diff --git a/start/upgrade/swarm.md b/start/upgrade/swarm.md index 3b6d3bea..1a152e9b 100644 --- a/start/upgrade/swarm.md +++ b/start/upgrade/swarm.md @@ -1,7 +1,7 @@ # Updating on Docker Swarm {% hint style="info" %} -Always match the agent version to the Portainer Server version. In other words, when you're installing or updating to Portainer 2.21.3 make sure all of the agents are also on version 2.21.3. +Always match the agent version to the Portainer Server version. In other words, when you're installing or updating to Portainer 2.21.4 make sure all of the agents are also on version 2.21.4. {% endhint %} {% hint style="warning" %} @@ -10,6 +10,10 @@ Starting from Portainer CE 2.9 and BE 2.10, HTTPS is enabled by default on port Before you make Portainer HTTPS only, make sure you have all your Agents and Edge Agents already communicating with Portainer using HTTPS. {% endhint %} +{% hint style="danger" %} +If you are updating from the 1.x version of Portainer, you **must** first [update to 2.0.0](from-1.x.md) **before** updating to the newest version or you will run into issues. +{% endhint %} + {% hint style="danger" %} Before beginning any update, we highly recommend [taking a backup](../../admin/settings/#backup-portainer) of your current Portainer configuration. {% endhint %}