A Nextcloud update refers to upgrading the cloud software to a newer version. Before upgrading, it’s a good idea to create a backup and to check the com­pat­ib­il­ity of any third-party apps. Updates can be carried out either using the in­teg­rated updater or manually.

What is a Nextcloud update or upgrade?

A Nextcloud update or upgrade refreshes the open-source software to a higher version to improve the cloud platform’s func­tion­al­ity. An update typically involves minor version upgrades (such as, from 26.0.1 to 26.0.2) to address security vul­ner­ab­il­it­ies or bugs, and to optimise system stability. Whereas a Nextcloud upgrade refers to major version updates (such as from version 28 to version 29). An upgrade typically brings sig­ni­fic­ant changes and new features.

Nextcloud re­com­mends regularly updating your cloud server by in­stalling all releases and promptly upgrading to new major versions. You can find detailed in­form­a­tion about each version of the cloud software in the Nextcloud Changelog.

When a Nextcloud update is available, a no­ti­fic­a­tion will appear in the ad­min­is­tra­tion interface. However, updates in Nextcloud must be carried out step by step. Before upgrading, ensure the current major version is updated to its latest release. You can then upgrade to latest major version.

During updates, your Nextcloud server will be put into main­ten­ance mode. While the update or upgrade is ongoing, users will not have access to the cloud. Major releases may take several hours to complete, though most upgrades generally take only a few minutes.

How should I prepare for a Nextcloud update or upgrade?

Before a Nextcloud update, create a full Nextcloud backup instance. This ensures that should any errors occur during the update, you can restore the instance.

It is also good practice to check whether ex­tern­ally sourced apps are com­pat­ible with the new version. As well as this, all third-party apps should be de­ac­tiv­ated before the update or upgrade.

Managed Nextcloud
Cloud storage that puts you in control
  • Keep your data safe with industry-leading security
  • Save time on updates and main­ten­ance
  • Easily add apps and online office tools

How to update or upgrade your Nextcloud

Nextcloud offers three methods for updating your cloud. Each method comes with specific ad­vant­ages and dis­ad­vant­ages and is suited for different scenarios:

  1. Updating via the user interface: The in­teg­rated web updater is the simplest way to update Nextcloud. This tool enables you to start the update directly from the web interface. The process is designed to be user-friendly, per­form­ing all necessary steps auto­mat­ic­ally, although it may oc­ca­sion­ally result in errors. This update method is ideal for users seeking a straight­for­ward solution.

  2. Updating via the command line interface: The update process can also be carried out via the command line. This method follows the same procedure as the web updater, but typically results in fewer errors.

  3. Updating manually: This method involves in­stalling the software using a down­loaded archive file. A manual update is usually only re­com­men­ded if the in­teg­rated updater is un­avail­able.

Note

The main dif­fer­ence between these methods lies in their level of auto­ma­tion. Using the updater automates most of the Nextcloud update process. Whereas the manual method requires each step to be performed manually, which is more time-consuming and prone to errors.

How to update Nextcloud with the web-based updater

  1. Open the ad­min­is­tra­tion settings by clicking on the profile icon (Overview) and scroll down to the Version section.

  2. Click the Open Updater button. The button will appear if a Nextcloud update is available.

Image: Nextcloud: Open updater
Open updater
  1. After the updater completes all steps, specify whether you want to keep main­ten­ance mode active and whether you wish to proceed via the web-based update page or the command line.
Image: Nextcloud updater during an update
During a major update or upgrade, you cannot de­ac­tiv­ate main­ten­ance mode - in this case you will also be auto­mat­ic­ally logged out of Nextcloud.

How to upgrade Nextcloud using the command line

  1. Open the server settings by clicking on the profile icon and scroll down to the Version section.

  2. Instead of clicking the updater button, go to the updater directory and execute the updater.phar file using the following command:

sudo -u www-data php /var/www/nextcloud/updater/updater.phar
bash
  1. The updater will now display the currently installed version and the available update. Con­firm­ing with “y” to start the download. You will then be prompted to confirm if you wish to run the update im­me­di­ately, which you respond again with “y” to.

  2. The updater will then ask if the main­ten­ance mode should remain active. Press “n” to de­ac­tiv­ate main­ten­ance mode, so users can access the cloud as soon as the update is complete.

How to manually update Nextcloud

The following step-by-step guide is based on an Ubuntu server with NGINX.

  1. Enable main­ten­ance mode: Start by putting Nextcloud into main­ten­ance mode to prevent any activity while the update is in progress:
cd /var/www/nextcloud
sudo -u www-data php occ maintenance:mode --on
bash
  1. Stop the web server:
service nginx stop
bash
  1. Rename the Nextcloud directory: Renaming the directory allows for easy deletion of the old Nextcloud directory later:
cd /var/www mv nextcloud nextcloud_alt
bash
  1. Download and extract the update: In this example, we’ve simulated an update to version 29.0.4. When using this command, ensure you enter the correct version number:
cd ~wget https://download.nextcloud.com/server/releases/nextcloud-29.0.4.tar.bz2tar -xjf nextcloud-29.0.4.tar.bz2 -C /var/wwwrm nextcloud-29.0.4.tar.bz2
bash
  1. Transfer the con­fig­ur­a­tion file from the old in­stall­a­tion:
cp /var/www/nextcloud_alt/config/config.php /var/www/nextcloud/config/config.php
bash
  1. Restart the server:
service nginx start
bash
  1. Assign directory per­mis­sions: Before carrying out the actual update, ex­pli­citly set the directory per­mis­sions:
chown -R www-data:www-data /var/www/nextcloud 
chown -R www-data:www-data /var/nextcloud_data
bash
  1. Start the update:
cd /var/www/nextcloud sudo -u www-data php occ upgrade
bash
  1. Disable main­ten­ance mode:
cd /var/www/nextcloud sudo -u www-data php occ maintenance:mode --off
bash
  1. Delete the old in­stall­a­tion:
rm -r /var/www/nextcloud_alt
bash
Tip

With Managed Nextcloud, IONOS provides a con­veni­ent, hassle-free cloud solution with secure server in­fra­struc­ture and no ad­min­is­tra­tion involved. IONOS handles the setup and main­ten­ance of your server, while you retain full control over your data. What’s more, you also benefit from dedicated support tailored to your needs.

Go to Main Menu