The upgrade, step by step
Know where you are and where you are going
Start with the version you run (Administration settings, then Overview, or occ status on the server) and the version you want. Nextcloud's admin manual is clear about the route: upgrade to the latest maintenance release of your current major version first, then to the next major version, and repeat. You cannot skip major releases. The manual's own example runs 18.0.5 to 18.0.11, then 19.0.5, then 20.0.2.
How you upgrade depends on how Nextcloud was installed. The manual covers archive installs. Docker, the All-in-One installer, Snap and distribution packages each have their own update instructions, so follow those if they apply to you.
Read the critical changes for each step
Before every major upgrade, the manual asks you to review the Critical changes section of the release notes, which lists what the new version needs from your server. Two recent examples: Nextcloud 33 dropped PHP 8.1, and Nextcloud 35 dropped PHP 8.2, MariaDB 10.6 and MySQL 8.0, and its list of supported operating systems now starts at Ubuntu 24.04 and Debian 13.
The manual also warns that the updater may not offer a new major version until your system meets its requirements, and that some required changes cannot be checked by the updater at all.
Check PHP before you start
Each major version supports a range of PHP versions. Nextcloud 30 runs on PHP 8.1 to 8.3; 31 and 32 on 8.1 to 8.4; 33 and 34 on 8.2 to 8.5; and 35 on 8.3 to 8.5.
PHP 8.3 is supported by every version from 30 to 35, so a server on 31 can move to PHP 8.3 first and keep it for every step up to 35. Change PHP as a step of its own, with a backup, and confirm Nextcloud works before you upgrade Nextcloud itself. The built-in updater also needs at least 256 MB of memory.
Check every app you rely on
Apps declare which Nextcloud versions they support, and the manual asks you to consider the compatibility of your most critical apps before deciding when to upgrade. Some apps, Talk and Deck among them, publish a release for each major version; others cover several. Look up each app you depend on in the Nextcloud app store and confirm it has a release for your target version.
Apps not developed by Nextcloud carry a "3rd party" label. The manual says to disable all third-party apps before the upgrade and re-enable them once it is complete. If an app your team depends on has no release for the target version yet, wait.
Back up, and make sure the backup restores
The manual asks for a fresh backup before every upgrade, major or maintenance, and a tested way to restore it. A complete backup has five parts: the config folder, the data folder, the theme folder, the custom apps folder if you have one, and the database. Put Nextcloud in maintenance mode while you take it, so the files and the database match.
Do not count on the updater's own backup. It saves a copy of the code only, not your data folder or database. And there is no undo: the manual says downgrading is not supported and risks corrupting data, so going back means a fresh install and a restore from backup.
Rehearse the upgrade on a copy
The safest place to find a problem is a copy of your server. Build one from your backup on a second machine, following the manual's chapter on migrating to a different server, and leave the original untouched. Give the copy its own address and stop it from sending email, so your users never see it. Then run the full upgrade on the copy.
Test what your team does every day, which is also where Nextcloud suggests focusing when testing new releases: signing in, syncing a desktop client, sharing a link, editing a document, a Talk call and each app you rely on. Note how long the upgrade took, so you can tell users how long the real one will keep them out.
Run the upgrade: web updater or command line
For archive installs, the built-in updater is the easiest route and runs either in the browser or on the command line. Both check the files, switch on maintenance mode, back up the code, then download and replace it. The migration step, occ upgrade, then updates the database and apps.
If the web updater gives trouble, the manual recommends the command line, which avoids web server timeouts on long steps. Run updater.phar as the web server user, for example sudo -E -u www-data php /var/www/nextcloud/updater/updater.phar, and answer yes when it offers to run occ upgrade. For scripted runs, its --no-interaction option installs the update and runs occ upgrade without questions. If neither mode works, the manual describes a manual upgrade from the downloaded archive.
Maintenance mode locks out signed-in users and blocks new sign-ins until the upgrade finishes. The manual puts usual upgrade times at a few minutes, even for bigger installations, and says very large ones can take several hours.
After the upgrade
Some database changes run later as background jobs. Before the next major step, the manual says to run cron.php 2 or 3 times so they finish. Run occ db:add-missing-indices and the related commands if the setup checks ask for them, re-enable your third-party apps, clear any warnings on the Overview page and run the Nextcloud security scan again. Then repeat the whole sequence for each major version until you reach your target.