Upgrade from 18 to 21 - Best way

Hi all,

I would like to upgrade my Nextcloud from version 18 to version 21 on my server and would really appreciate your help and experiences.

Some server / Infrastructure specs:

  • Server: vServer
  • OS: Ubuntu 18.04
  • Server: nginx
    A full server-backup is in place and can be restored easily.

Upgrade Guide:
Reading through the “How to upgrade” guide, I found the following two passage:

Manually upgrading is also an option for users on shared hosting; download and unpack the Nextcloud tarball to your PC. Delete your existing Nextcloud files, except data/ and config/ files, on your hosting account. Then transfer the new Nextcloud files to your hosting account, again preserving your existing data/ and config/ files.


...You cannot skip major releases.

So I see two ways here:

  • v18 → 18.0.11 → 19.0.5 → 20.0.2 → 21, respectively by deleting every folder beside “data” and “config” (while updating PHP 7.2 to PHP 7.4)
  • just make a backup of my data, calendars and contacts and re-install a new v21 instance

I would prefere the first way, but as a beginner I would like to know if this sounds realistic or if I have overseen something. If there is any easier way, I would really appreciate that of course.


I’d do:

  • just make a backup of my data
  • v18 → 18.0.14 → 19.0.12 → 20.0.10 → 21 (always to the latest version of each branch)

I’d try to login after each upgrade, check the admin page if you need to add database indices, enable the apps to convert app data as well. And then continue to the next version.

Why not try the integrated Updater?

If the Updater dosen’t work for some reason I would go the manual route like you described it in your first bullet point.

If something goes completely wrong somewhere along the way, you can of course always do a re-install with v21. But I would try the intended ways to upgrade first, before I would consider more drastic measures :wink: And I do not see a reason why they shouldn’t work…

Of course, things can always go wrong ,no matter which path you take, so a backup is of course mandatory before any kind of upgrade.

About the PHP upgrade: Nextcloud 18 already supports PHP7.4. So I would recommend to upgrade the PHP version first and if everything works fine with the new PHP version, start upgrading Nextcloud.

Hope that helps.

Thanks a lot for your help!

@bb77 I always tried the integrated updater via web frontend which failed so hadn’t that in mind anymore. But reading about the error message I found out that I can use the updater on my server too using the command
sudo -u www-data php /var/www/nextcloud/updater/updater.phar

Also thanks for the idea of updating PHP at first.

Now I’m stuck on NC 19.0.12 because the updater tells me that this is the last version (also in beta mode). I found some threads here in the forum on that topic too, so I will try to manually update.

Thanks a lot! Everything runs smooth now. :slight_smile:

1 Like