Upgrading from NC 30.0.4

I’ve recently inherited a Nextcloud on-premise installation that is in need of an upgrade.

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • Nextcloud Hub 9 (30.0.4)
  • Operating system and version (e.g., Ubuntu 24.04):
    • Ubuntu 24.04.3 LTS
  • Web server and version (e.g, Apache 2.4.25):
    • 2.4.58
  • PHP version (e.g, 8.3):
    • 8.3.6
  • Database version:
    • MySQL 5.7.42
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • bare metal

There are a little over 100 users on the platform but less than 75 are actively using it.

On the Admin overview page it says:

Update

The version you are running is not maintained any more. Please make sure to update to a supported version as soon as possible.

A new version is available: Nextcloud 30.0.17

All apps have a compatible version for this Nextcloud version available.

Apps with compatible version*

Calendar :up_right_arrow:
Contacts :up_right_arrow:
End-to-End Encryption :up_right_arrow:
Retention :up_right_arrow:
Group folders :up_right_arrow:
Mail :up_right_arrow:
Memories :up_right_arrow:
Preview Generator :up_right_arrow:
Nextcloud Office :up_right_arrow:
Collabora Online - Built-in CODE Server :up_right_arrow:
SnappyMail :up_right_arrow:

***Please note that the web updater is not recommended with more than 100 accounts! Please use the command line updater instead!


My first question is, with around 75 active users is it still recommended to use the command line updater or would the web updater be a viable option?

If the web updater works will it take me to the latest (last) version 30.0.17 and from there will I be able to use the web updater to then go to the latest version of 31 → 32 → 33 and finally 34?

How reliable is the web updater?

If, however, the web updater is not the way to go, can anyone point me to any official step-by-step documentation on getting from 30.0.4 to 30.0.17 and then up to the latest version one by one?

Secondly, the current version of MySQL being used by our Nextcloud is 5.7.42. Is this a deal-breaker to get any higher than 30.0.17 and should it even be upgraded before trying to go from 30.0.4 to 30.0.17?

The system requirements in docs such as this and for higher versions of NC are recommendations. I know MySQL 5.7.x is ancient but is it likely to cause the upgrade of NC to fail at some point?

Thanks

I can’t comment on the MySQL version but what you should verify before upgrading is that the appropriate PHP version is available for your Ubuntu installation.

When you update the first step is to put NC into maintenance mode => 0 active users.
Personally I recommend the cli updater. It outputs all error messages (if something bad happens).

You cannot skip major releases. Please re-run the upgrade until you have reached the highest available (or applicable) release.

I once had a really strange issue where web update would fail but didn’t give me any clue why. Only cli updater printed additional information that helped me identify the root cause of the failed update.

If you feel more comfortable using web updater - try it. If for any reason you run into an issue and web updater doesn’t provide any hints but just throws a generic error, switch to cli.
I’ve linked the official documentation above. If you’re lucky and don’t run into any issues you will hit the update button in admin menu 6 times and then you’re on the latest version.

The command line updater is always more reliable. It, at a minimum, is immune to web infrastructure end to end timeouts.

No one can answer that because it literally means that version of Nextcloud is untested with that version of MySQL. Also, it depends on numerous other things, such as what database features are relied upon by your particular mixture of enabled apps (as well as what database bugs may be relevant to said combination).

I’d flip the question around: why aren’t you considering using an appropriate version of MySQL (or MariaDB)? (Some problems may not even be noticable until down the road… At which your database may already have corrupted data, for example).

I always recommend using the command line updater, even for less than 100 users, since you then have much more control over the process. Also the command line updater enables the maintenance mode during the upgrade, so no user can accidentally connect or change things during the upgrade process.

Things to consider:

  1. Always make sure you have a backup of everything - files and database.
  2. Upgrading MySQL is not needed and also no that simple, since this package comes with Ubuntu 24.04 you may need a PPA for this.
  3. You can upgrade PHP 8.4 and 8.5 after Nextcloud was upgraded as well using the repositories of https://deb.sury.org. Do not use newer versions of PHP before you upgraded Nextcloud to the respective version according to Releases and PHP versions · nextcloud/server Wiki · GitHub .
  4. On the host you should use tools like screen or termux to avoid losing the session if your SSH connection is terminated before the upgrader is done.
  5. Keep in mind, that the upgrader should run with the user, which is used to host Nextcloud an not root. See the owner the the current files using ls -l and then run the updater with sudo USERNAME php updater/updater.phar within the Nextcloud root folder where USERNAME is the name of the user used for the Nextcloud hosting.

@Sharky21 is running MySQL 5.7, which is outdated and has been EOL since 2023.

Ubuntu 24.04 ships with MySQL 8.0, which is end of life as well. However, at least it’s still supported by Ubuntu, so it should still receive security updates for critical vulnerabilities. It’s also still officially supported by Nextcloud, even with the current release: System requirements — Nextcloud 34 Administration Manual.

So I’m wondering: are they running the database on a separate server? Or are they using a PPA, Oracle’s APT repository, or some other third-party source to install MySQL 5.7?

Either way, it should be updated, and perhaps they could also consider migrating to MariaDB while they’re at it…? :wink:

Yes, of course you’re right: Ubuntu – Package Search Results -- mysql

In this case I wonder, how MySQL was installed in the first place as this is obviously not the version provided by Ubuntu. So, yes, that should be upgraded as well, after creating a dump of the current database of course.