Upgrade to Debian 12 Bookworm

No, but as fare i know, 8.2 php is not supported.

According to System requirements — Nextcloud latest Administration Manual latest documentation

PHP 8.2 is the recommended version for Nextcloud.

2 Likes

It is officially supported from NC26 and will be the recommended version for NC27.

https://docs.nextcloud.com/server/26/admin_manual/installation/system_requirements.html

https://docs.nextcloud.com/server/27/admin_manual/installation/system_requirements.html

3 Likes

Then people currently on Debian 11 with PHP 7.4 and Nextcloud 25.0.7 have a problem. They cannot upgrade Nextcloud to 26 because of PHP 7.4 and cannot update their Debian 11 installation to Debian 12 because of PHP 8.2 that is not supported with Nextcloud 25.0.7.

According to
https://docs.nextcloud.com/server/25/admin_manual/installation/system_requirements.html

for Nextcloud 25 the highest supported PHP version is PHP 8.1.

Yep, seems like it, but I can’t really say, because I use https://deb.sury.org/ for PHP.

However, I would probably try to upgrade Debian to Bookworm and then try to upgrade Nextcloud via CLI Updater. If that doesn’t work, you could still try to upgrade manually. If that doesn’t work either, you hopefully have a snapshot of your VM, in order to easily revert back to the previous state. :wink:

If you want to be 100% sure that no issues will occur due to a wrong PHP version, install PHP 8.1 from https://deb.sury.org/ and upgrade to NC26, before upgrading Debian.

I updated Debian Bullseye with Nextcloud 25 to Debian Bookworm with Nextcloud 26 without a foreign php source.

In Debian Bullseye wait for upgrade to Nextcloud 26 is shown in Nextcloud 25 GUI. Should already be the case. Then dist-upgrade to Debian Bookworm with e.g. PHP 8.2 . Delete all PHP 7.4. Then use the Nextcloud updater in Nextcloud 25 (works with PHP 8.2 for me)
sudo -u www-data php updater/updater phar

5 Likes

I also have a question relating to Debian Bookworm. According to the system requirements of Nextcloud 26 (latest stable) the relevant database requirement is:

MySQL 8.0+ or MariaDB 10.3/10.4/10.5/10.6 (recommended)

I still have mariadb-server 10.6 installed from the previous Debian. Nextcloud Administration Settings → System shows:

Database
Type: mysql
Version: 10.6.11

But the latest Debian package of mariadb-server in Bookworm is 10.11, may I install that? Or does anyone have this newer mariadb-server installed and running well with Bookworm? For now I have held back the update.

I did multiple test installations of Nextcloud 26 with MariaDB 10.11 on Debian 11. I also upgraded it on my main instance a few weeks a go. So yes, MariaDB 10.11 definitively works fine with Nextcloud 26. I didn’t test older Nextcloud versions, though.

For me with Nextcloud 25.0.7 the GUI does not yet show Nexcloud 26 as an upgrade option, although it is out since 3 months. I am wondering if there needs to be php8 installed before it shows up.

1 Like

Yes, you need to first install php8 (e.g. upgrade debian to bookworm), and then Nextcloud can be updated (but not from the GUI because it version 25 does not support php8 :frowning:

I did it with “sudo -u www-data occ upgrade” and it worked.

This does not work for me with the error message identical to the one displayed on the home page: “This version of Nextcloud is not compatible with PHP>=8.2.
You are currently running 8.2.7.”

For updates you have to do 2 things:

  • get and unpack new code files (php updater/updater.phar)
  • update your setup environment (config, db) to the new version (php occ upgrade)

The first step is done on the old code base (NC 25) and the second in the new code base (NC 26). The first step can be carried out manually: Delete old code (all files, except the config/ and data/ folder), download new code (Nextcloud server changelog) and put the files in your folder. Adjust the permissions and then you can run the occ upgrade command. It’s more detailed in the documentation.

I had the same problem. for me the easiest solution was:

  • first update to debian bookworm
  • then in the nextcloud directory change the file lib/versioncheck.php
    There should be a line similar to:

if (PHP_VERSION_ID >= 80100) {

change it to

if (PHP_VERSION_ID >= 80300) {

then use the cli updater (maybe also the web one would work)

2 Likes

That upgrade should actually never be offered when using PHP 7.4. At least whenever I tested it, it was not, reasonably, matching also @mlsxlist’s experience. I have no idea why it did show up in your case. Are you absolutely sure that you ran Nextcloud with PHP 7.4 before, i.e. that there was no PHP 8.x CLI used for update checks or similar? As you wrote “e.g. PHP 8.2” while Bookworm ships exactly only PHP 8.2, it sounds like you generally work with other PHP versions/builds not natively provided by the Debian package repository.

The CLI updater does not invoke the versioncheck.php, and the update check can offer NC26 despite PHP 7.4, then it is actually a nice/cleaner method indeed.

I used this guide and it worked perfectly.

Yes. Shows new version on php 7.4 and updater.phar works. No other Debian source.

That is exactly what I did. I upgraded Debian to Bookworm and then use the CLI to upgrade NC25 to 26 and it worked fine. Except in my case I was using non-standard HTTPS port which I had to fix manually.

Bookworm upgrade also bumped up the PHP to version 8.2 which works fine with NC26.

I am running NC 26 on PHP 8.2 right now.

@vasyugan
Me as well, but i took a rather bumpy way. My old machine (i386) crashed rather hard (disk failure) and all i came up with was the “move server” routine as outlined in

https://docs.nextcloud.com/server/latest/admin_manual/maintenance/migrating.html

which allowd me to move my data and database. ( I only had file system access after crash.)

Maybe this is a solution for people without direct upgrade path.
TL;DR: I upgraded from Debian 10 (buster) to Debian 12 (bookworm) and from i386 to amd64 without data loss. I wouldn’t call it a pain in the ass, but it’s not for the fainthearted. I am rather experienced user of server services, but no professional after all.

i386 is unsupported from NC 26 on, AFAIK. So I guess you were running an earlier version that does not support PHP 8.2 yet?