You can automatically upgrade your Nextcloud instance from Admin settings. But for whatever reason you are not able to automatically upgrade, you can still manually upgrade Nextcloud.
If you are installing from scratch click the button below to install fresh.
1st thing we will do is copy config file and I assume your data folder is not inside the web root. If it is, it is time to move it outside of the web root directory. But for now you can just copy it to another location. Backup your database too.
*Remember always backup before doing upgrades.
NC location: /var/www/html
Change location if it’s different for you.
cd /var/www cp html/config/config.php /var/www/config.php cp -r html/data /var/www/data mysqldump -u root -p DATABASE > /var/www/db-bak.sql
Once done, download the Nextcloud version you want to upgrade to.
If you have let’s say 22.0, you should 1st upgrade to any minor version of 22.0(for example 22.2.3) before doing a major upgrade. Major upgrades should also be done one by one(21 to 22 to 23).
Never do major upgrade if there are minor upgrades available. Nextcloud do not recommend this.
wget https://download.nextcloud.com/server/releases/nextcloud-22.2.3.zip unzip nextcloud-22.2.3.zip mv nextcloud/* html/ cp config.php html/config/config.php cp -r data html/
Now go to the browser and hit your instance URL. Start with the upgrade process.
If you were upgrading a minor version, and now want to upgrade to a major one. Follow the steps above, download the latest major version(21 to 22 not 23). Once on 22 you can upgrade to 23.