NCP Docker - Updating NC & NCP

Due to the fact that Docker works different to a native installation of NCP (eg. on Debian using the Curl script), there are some features and and function that are not available or different for your NCP Docker container. Updates is one of them.

A key difference with the Docker image is that the “NCP System” (or “NCP App” - NextCloudPi v1.51) updates require pulling the new docker image while Nextcloud Version Updates (e.g. NC 24.X.X to NC 25.X.X are preformed with the built in updater from Nextcloud.

Backup!

:warning: Important: Please take a full backup of your NCP Instance before you update, just in case.

Update Nextcloud version (NCP Docker)

To Update your Nextcloud instance version:
Go to the UPDATES section in your NextcloudPi WebUI
or command line docker exec -it nextcloudpi ncp-config
and preform the nc-update-nextcloud.
(select “0” as version to update the latest supported NC version)
(Suggestion: Just enable nc-autoupdate-nc)

Update NCP System (Docker)

Updating the NCP System can not be done from within the container. You need to pull the latest version available as Docker image on Docker Hub and replace your outdated container with a new one.

Updating your NCP Nextcloud Docker Container - step-by-step Guide

:warning: Important: Make sure to update to the latest possible Nextcloud version. See above.

  1. Pull the latest version of the NCP docker image to your server, with the following command:
    docker pull ownyourbits/nextcloudpi:latest
  2. Stop the currently running but outdated docker container on your server.
    a. identify it by running sudo docker psthis lists all currently running docker containers, find nextcloudpi, copy the container_ID (a random string of letters and numbers).
    b. stop the container with sudo docker stop [container_id]
  3. Remove the outdated container with: `sudo docker rm [container_id]
  4. Recreate the updated container by running the same command you used when you setup NCP Docker for the first time.
    If you did not make any modifications back then it will be:
    docker run -d -p 4443:4443 -p 443:443 -p 80:80 -v ncdata:/data --name nextcloudpi ownyourbits/nextcloudpi $DOMAIN
    Note: DOMAIN should be your trusted domain: the URL or IP that will be used to access.
  5. With sudo docker ps you should now see if your docker container is again up and running. If yes, you should again have access to it.
  6. Navigate to the webUI or ssh into the server to see if you are running the latest version, eg. NextCloudPi v1.51.0

We hope this doc was helpful, if you encounter any issues please reach out to the community.
These docs are written by volunteers, please consider becoming one of them.
Contact the wiki team at Matrix or Telegram

https://docs.nextcloudpi.com/

could some one please double check this, before I publish it to the official documentation. I don^t want to post stuff that is not correct.
Especially as I don’t use Docker on my production machine, I’m not sure I got all right.

I plan to upload this as a individual doc, but also take the middle part of this and ad/update the existing docs mentioning docker updates.