Upgrade Nextcloud from version 10.0.2 to 11.0.0

To upgrade Nextcloud is actually pretty simple. The instructions are very similar to my post on Migrate from ownCloud 9.1.1 to Nextcloud 10.0.2.

Please note that I have created a directory “/opt/owncloud-install/” which I use to backup files to when performing an upgrade. You can have a directory named something else, the name isn’t important. Also my Nextcloud installation is in a directory named “/var/www/owncloud”, I found it easier to leave the directory name exactly the same when I migrated from ownCloud to Nextcloud.

1. Download Nextcloud server version 11.0.0

wget https://download.nextcloud.com/server/releases/nextcloud-11.0.0.tar.bz2

2. Stop your webserver

sudo systemctl stop apache2.service

3. Backup (move) your config.php file and your data folder

sudo mv /var/www/owncloud/config/config.php /opt/owncloud-install/

sudo mv /var/www/owncloud/data /opt/owncloud-install/

4. Delete your ownCloud folder

sudo rm -rf /var/www/owncloud/

5. Extract Nextcloud 11.0.0 (please note that the tar ball doesn’t include a data folder or a config.php file)

sudo tar -xf nextcloud-11.0.0.tar.bz2 -C /var/www/

6. You now have a folder named nextcloud, I’m going to rename this folder to owncloud

sudo mv /var/www/nextcloud /var/www/owncloud

7. Move the config.php file and your data folder which you backed up in Step 3

sudo mv /opt/owncloud-install/config.php /var/www/owncloud/config/

sudo mv /opt/owncloud-install/data/ /var/www/owncloud/

8. Set the correct ownership for your Nextcloud instance (the files in the tar ball are owned by nobody)

sudo chown -R www-data:www-data /var/www/owncloud/

9. Start your webserver

sudo systemctl start apache2.service

10. Complete the upgrade to Nextcloud 11.0.0

sudo -u www-data php /var/www/owncloud/occ upgrade

Done!