Warning: Update Debian bullseye to bookworm results in impossible Nextcloud update from 25.x.x to 26.x.x

Hi everyone,

Just a warning for all who are running debian bullseye with nextcloud within debian environment.

If you update Debian to bookworm php will be updated to php8.2.
Since nextcloud 25.x.x does not support php8.2 you cannot update natively within debian environment.

As a solution I suggest (and did) update php7.4 to php8.1 using the

( sudo add-apt-repository ppa:ondrej/php)
after that update nextcloud from 25.x.x to 26.0.1 via command line since for some reasons the web page did not work, but that was not necessary.
After that remove the php repostory and start the normal upgrade progress to debian bookworm.

Hi @florom ,

unfortunately I did read this only now, after updating to bookworm…
Something I really didn’t expect to happen…
Any idea what to do now?
Now I’m with bookworm, nextcloud 25.x.x and php8.2.
I would be really sad if I destroy my configuration and setting by screwing this up…
Or anyone else who solved this issue already?
Thanks!
Ringel

First, do a backup so you can always get back to the situation you are currently in (even if you think it is not ideal, it might get worse).
For php 8.2, you need at least Nextcloud 26, since it is the next major version, you can try to upgrade directly to Nextcloud 26 via manual update (because then you replace the code and everything, so you can run NC26-code directly.

So you have the backup.

Keep the data/ and the config/ folder. Delete the rest, these are just code files. Download the latest release of the NC 26 branch: Nextcloud server changelog and extract the code to your folder (here also the official docs, if you need to fix permissions etc: Upgrade manually — Nextcloud latest Administration Manual latest documentation).
Then you should be able to run the occ update command:
sudo -u www-data php occ update

This should carry out all the modification required for NC 26 and then you should be good. When you switch to a new php version, sometimes it can happen that not all required php modules are installed (should give you warnings and errors, either on the command line for the occ command, or in the error logs later).

Are we in the clear to upgrade to Debian bullseye now when running nextcloudPi?

Should we update Debian first then ncp, then nextcloud? Not sure of the order. I have asked it in my own post so there are details about my current versions there: Updating NCP version failed

Hi @Boggle247 ,

I am not familiar with nextcloudPi, since I use an use an old Odroid H2+ (now: https://www.hardkernel.com/shop/odroid-h4-plus/) self installed which works fine for me.

I think you should check your php version first in Nextcloud - System - Overview if that is even is an issue for your setup.

currently on php version 8.1.20

Hi @Boggle247 ,

so its not an issue for you. If you are running debian bullseye than the php version is not maintained by debian (bullseye), still i am not familiar with nextcloudPi so there might be other issues.
EDIT:
But you have to carfully update the version and then nextcloud as it fits the nextcloud version. So do not upgrade without checking first.
EDIT:
changed:
If you are running debian bullseye than the php version is not maintained by debian (bullseye)