Files
sysconfig/services/nextcloud/upgrading.md
T

1.2 KiB

Steps to upgrade Nextcloud from one major version to the next.

  1. Bring the Nextcloud instance down: sudo docker compose down

  2. Take a ZFS snapshot of the tank/appdata/data/nextcloud-data and tank/appdata/databases/nextcloud-db dataset(s).

  3. Edit the compose.yaml file and change the tag on the Nextcloud image to the next major version number.

  4. Pull the next version of the Nextcloud image: sudo docker compose pull

  5. Bring up the Nextcloud instance: sudo docker compose up -d

  6. Wait a minute or so and bring up the Nextcloud web client in your browser. Open the Administrative Settings Overview page and check for any issues.

  7. If the Overview page recommends any occ commands:

    • Put the instance into maintenance mode : docker exec -u www-data nextcloud-app-1 php occ maintenance:mode --on
    • Run the occ commands recommended (for example, docker exec -u www-data nextcloud-app-1 php occ db:add-missing-indices)
    • Take the instance out of maintenance mode: docker exec -u www-data nextcloud-app-1 php occ maintenance:mode --off

    Note that 'docker exec' is used to run commands within the Nextcloud docker container; and '--user www-data' is used to run as the user that owns all of the Nextcloud files.