Introduction

Nextcloud is a free and open-source software suite for file hosting, collaboration, and communication. It is similar to other cloud storage services like Dropbox, Google Drive, and Microsoft OneDrive, but it can be self-hosted on your own server. I have running instance on https://drive.zeroinside.id with linuxserver/nextcloud image and use it for cloud storage, e-mail clients, and notes. This gives me more control over my data and privacy.

I decided to upgrade Nextcloud to currently latest version which is 27.0.0.8 from older version 24.0.7.1. The main reason is just because it gives me annoying old version in toast notification on the mobile apps.

Steps

Usually, I upgrade by running docker-compose pull, down, and up the instance again as simple as that. It just works with minor update e.g 24.x.1.0 to 24.x.2.0, but for major upgrade e.g 24.x.x.x to 27.x.x.x. it gives the error due some constrains of apps environment and the config files.

Here’s my way to upgrade the Nextcloud over major release.

  1. Get the latest docker images file docker-compose pull
  2. Read the docker-nextcloud changelog, is there any instruction to remove or modify the existing config file. Remember to keep the old configs.
  3. Run docker-compose down
  4. Backup the config folder first! Make sure to keep ./config/www/nextcloud/config/config.php
  5. Delete current ./config/www,
  6. Run docker-compose up, it will linked the newest files to the persistent disk volume.
  7. Restore the config.php, and modify the field 'version' => '27.0.0.8' .
  8. Run docker-compose restart
  9. Open Nextcloud in the browser to do post upgrade setup.
  10. After finish, login and navigate to the admin page to do the recommendation instruction.

Conclusion

To do major upgrade in Nextcloud, remove www folder and update the config.php accordingly.

Loading