This version of Nextcloud is not compatible with PHP>=8.2

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face: is for home/non-enterprise users. If you’re running a business, paid support can be accessed via where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:


Or for longer, use three backticks above and below the code snippet:


Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 24.x
Operating system and version (eg, Ubuntu 20.04): Debian 12
Apache or nginx version (eg, Apache 2.4.25): 2.4.57
PHP version (eg, 7.4): 8.2

The issue you are facing:

I was running NextCloud 24 on a Linux Debian 11 (with php version = 7.4). As I knew that starting with NextCloud 25 the required php version is 8.x, I upgraded from Debian 11 to Debian 12.
The update went well but unfortunately now, when I try to open NextCloud, the following error message is triggered:

This version of Nextcloud is not compatible with PHP>=8.2.
You are currently running 8.2.7.

What would have been the correct updating sequence? What can I do now to solve the problem?
Any help is appreciated.


Don’t worry. You’ll be fine. You need to use the Sury PHP PPA to temporarily deploy an older PHP version on your system that is supported by that older version of NC24. Then you can upgrade NC at your discretion (and, in turn, PHP). The forum has threads on Sury PHP as well as numerous Internet searches. The main page is here:

To answer your other question, you probably had three reasonable paths to choose from the start:

  • Upgrade NC first (to a version that supports but doesn’t require a newer PHP like to NC25 then, in turn, to NC26) then upgrading to Debian 12
  • Using the Sury PHP PPA to move separate your PHP version from your OS version
  • Using Docker and never again think about your host OS upgrades impacting the NC stack

And for future reference, try to remember to check the Server Requirements section for the version of NC you’re using and the one you’re moving to (and any versions in between where applicable) before making big changes. E.g.

NC24: System requirements — Nextcloud latest Administration Manual latest documentation




NC28 (upcoming) - not finalized and subject to change):

There are also increasingly more call outs of key breaking changes here too:

1 Like

Thank you very much @jtr. Finally I could solve the problem by first installing PHP8.0 in Debian 11 (from the URL you mentioned). Then, updating NC to version 25 first and 26 afterwards. Finally I proceeded to the update to Debian 12 (including PHP8.2). Something went wrong during the last step, so NC was not working after the update to Debian 12 but luckily I could solve the problem by uninstalling and re-installing the php-related packages.
Yes, for the future I’ll remember to check the Server Requirements section for the version of NC you’re using and the one you’re moving to. Thanks for the suggestion.
Finally, I wanted to ask you if you can give more details about your last suggestion, meaning using Docker and never again think about my host OS upgrades. Can you please point me to some documentation? Do you know if this is possible also using a Debian running on a raspberry pi?
Thanks again for all you help.

1 Like

There are various Docker based Nextcloud images. A few of them:

General notes on non-manual install methods:

Do you know if this is possible also using a Debian running on a raspberry pi?

Yes, I used to run the micro-services image (first one above) on a Pi 4. And the fourth one above was originally developed for the Pi (though it wasn’t a Docker image at the time).

The main thing to beware of (and this is the case even without Docker) is to bump the host OS on the Pi to 64-bit (even that’s not a 100% requirement but it’s a good idea to avoid problems + more images are dropping support for 32-bit like did a few months back).

I am in a similar situation, considering how to upgrade my system. But I still can’t see how upgrading to NC25 should allow upgrading to Bookworm w/o also using Ondrey’s inofficial repo, because there is no Debian release which contains PHP 8.0 or 8.1. From my POV, the question is: What would be required to make NC25 compatible with PHP 8.2? In that case, one could upgrade to Bookworm at ease, and if that’s sorted, tackle the NC upgrade to NC26 which requires PHP 8.x.

Maybe this is worth a shot: Upgrade to Debian 12 Bookworm - #7 by devnull

1 Like