Upgrade NextCloud For Docker Container Deployment
How to upgrade nextcloud deployed through docker container? Update the Nextcloud container by pulling the new image, discarding the old container, and starting the new container.
Since all data is stored in the volume,
so nothing is lost. The startup script will check the version in the volume and the installed docker version. If a mismatch is found, the upgrade process will automatically start. Don’t forget to add all the volumes to the new container, so it will work as expected.
Follow the steps below to upgrade NextCloud:
Execute the following command to pull the latest stable image
docker pull nextcloud:stable
Check the container name of nextcloud, in the last column
NAMES, which will be used later
docker ps | grep -i nextcloud
docker stop <your_nextcloud_name>
Remove the nextcloud container
docker rm <your_nextcloud_name>
docker run -d <options> nextcloud
Please note that you must run the same command with the options you used when you first started Nextcloud. This includes volume, port mapping.