Nextcloud version (eg, 29.0.5): 25.0.13
Operating system and version (eg, Ubuntu 24.04): Rocky Linux/RHEL 8.9
Apache or nginx version (eg, Apache 2.4.25): 2.4.37 to 2.4.57
PHP version (eg, 8.3): 7.4.33
The issue you are facing:
I’m preparing to move to a new server with Rocky/RHEL 9 and PHP 8.2. Upgrades beyond the current level are blocked because PHP 7.4 isn’t supported anymore, and the nextcloud 25.0 won’t run under PHP 8.2. The “migration” instructions cover moving to a new server, but not with associated upgrade of the OS. Is there a procedure for this?
Is this the first time you’ve seen this error? (Y/N):
Steps to replicate it:
Copy nextcloud install from RHEL/Rocky 8 to Rocky 9 and attempt to access nextcloud.
The output of your Nextcloud log in Admin > Logging:
I’m not aware of any simple procedure of moving a server to another NC version.
I would recommend you do one thing at time - either upgrade NC on the old server to minimum version you can install on the new server (includes PHP upgrades on the old server) and move then or you do multiple server migrations doing some intermediate steps (e.g. migrate to Docker, perform the upgrades and move to a new server).
Seems like part of the problem is RHEL/Rocky, I can’t have multiple PHP versions, plus there are other sites (Wordpress) on this box that I don’t want to disrupt. I can either move the NC site over to another RH8 box and try updating PHP there, then move it to the new box, or just give up and do a new install on the new box, possibly using Docker, and move the content. There isn’t all that much content, it’s mostly my stuff, and only a couple of active users (family).
Well, WordPress isn’t likely to support PHP 7.4 forever either, so a disruption is inevitable at some point anyway. And to be honest, I think PHP versions that are EOL shouldn’t be used anymore, even if RHEL and Rocky are still backporting fixes to them,
Running it separately from WordPress is probably not the worst idea. However, with Nextcloud you won’t really be able to take advantage of the 10+ year support periods offered by LTS distributions, as generally only the PHP versions shipped with the latest Ubuntu LTS and RHEL versions are supported by Nextcloud.
So I’d recommend starting with Rocky 9 and then using App Stream to update the PHP packages to the recommended PHP versions of each Nextcloud release you’re running.
Or, yes, you could use Docker. But even with that, I wouldn’t count on being able to use the same version of Rocky for 10 years without running into problems, since Docker usually only supports the two latest versions of Ubuntu LTS and RHEL if you install it from their repositories, or you could use the Docker packages provided by the distribution, but then you’ll eventually run into problems because your Docker version is too old.
So, either way, prepare to regurarly upgarde the dependencies and/or your distro, at least every 2 to 4 years.