Guide

How to upgrade Nextcloud safely

A Nextcloud upgrade goes smoothly when it is prepared: a fresh backup that restores, a supported PHP version, apps that work with the new release and a rehearsal on a copy. Here is each step, taken from Nextcloud's admin manual.

files.example.orgExample

Upgrade path: tested on a copy

  1. 31.0.14Latest 31 release, fresh backup
  2. 32.0.15Backup first, one major at a time
  3. 33.0.10Backup first, apps still compatible
  4. 34.0.5Backup first, rehearsed on a copy
  5. 35.0.2Backup first, then production

Key points

Four rules for every upgrade

  • Back up first

    The built-in updater does not back up your database or data folder.

  • One major at a time

    You cannot skip a major version: 31 goes to 32, then 33.

  • Check PHP and apps

    Each major version supports its own PHP range and app releases.

  • Rehearse on a copy

    Find problems on a copy of the server, not on your team's.

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.

Upgrade checklist

  1. Confirm versions

    Note the version you run and the next major version up.

  2. Read the critical changes

    Check the release notes for the target version.

  3. Check the platform

    PHP, database and operating system supported by the target.

  4. Check apps

    Each app you rely on has a release for the target; third-party apps disabled.

  5. Update within your major

    Install the latest maintenance release of your current version.

  6. Back up and test the restore

    Config, data, themes, custom apps and database, taken in maintenance mode.

  7. Rehearse on a copy

    Run the full upgrade on a copy and test daily tasks.

  8. Tell your team

    Give a time window; maintenance mode locks everyone out.

  9. Upgrade

    Run the updater, preferably from the command line, then occ upgrade.

  10. Finish and check

    Run cron.php 2 or 3 times, add missing indices, re-enable apps, clear warnings, rescan.

FAQ

Nextcloud upgrade questions

Can I skip Nextcloud versions when upgrading?

No. Nextcloud upgrades one major version at a time, each from its latest maintenance release. Going from 31 to 35 means four upgrades: to 32, 33, 34 and then 35.

How long does a Nextcloud upgrade take?

Nextcloud's manual puts usual upgrade times at a few minutes, even for bigger installations, and says very large ones can take several hours. A rehearsal on a copy tells you how long yours will take.

Can I roll back a failed upgrade?

Not by downgrading, which Nextcloud does not support. Install the old version fresh and restore your backup instead, which is why the backup and a restore test come first.

Should I upgrade the day a new major version comes out?

There is no need. Your current version keeps getting fixes until its end date, and Nextcloud's own All-in-One installer waits at least for the first maintenance release and for important apps to be ready.

Read next

  • Nextcloud Version Support Tracker

    Which versions get security fixes, when each one ends and how to find yours.

    Read the guide

  • Nextcloud Security Checklist

    19 checks from Nextcloud's admin manual and security scan, with where to set each one.

    Read the guide

  • Upgrades & Rescue

    When you would rather hand the upgrade over.

    See the service

Several versions behind?

Book a free 30-minute check. We look at your version and support status, backups and restore, setup and apps, and give you a plain list of what to fix, including the upgrade path. If you would rather hand it over, the upgrade gets a fixed quote and a date, or it is part of care, where every major upgrade is tested on a copy first.