This is a quick post on updating and maintaining a Docker install of Nextcloud. I have had my install pretty much untouched since I first put it up about a year or two ago. The whole time it's been fine, but I heard about performance improvements in later versions and have begun the process of upgrading the service.
Here are some steps to check for.
Based on my previous restore experience, I know that going from one version of docker to the next can sometimes be version dependent. What has worked in managing the upgrades is to upgrade one version at a time.
To do this, first check what Nextcloud describes as the newest version. Enter the system as the 'admin' user, go to 'Settings' -> 'Overview'. A screen like below should show.
Nextcloud will give a few suggestions of areas to make your instance more secure or highlight any issues (this is a private instance without HTTPS, as noted, and without a lot of the Calendar and other apps), and it will display what the next version is.
That next version will be the upgrade target for the Docker instance.
In your host, you can first pull the new Docker image of Nextcloud by running:
sudo docker image pull nextcloud:<the target version from the UI>
This will save some time in the upgrade.
Next make sure everything is saved and no one is using the containers. Stop the containers with:
sudo docker stop <nextcloud container name> <nextcloud DB container name>
In my sample docker-compose reference the command would look like:
sudo docker stop nxtcloud nxtclouddb
Then modify the docker-compose.yml file with the new image specified just downloaded. For example 25.0.3 shown below.
app:
image: nextcloud:25.0.3
container_name: nxtcloud
restart: unless-stopped ports:
.....
Once changed bring up the containers again.
sudo docker-compose up
Here I omit the -d for running in the background. This offers a terminal view of the upgrade similar to below.
No comments:
Post a Comment