# Update of nextcloud fails

**URL:** https://dietpi.com/forum/t/update-of-nextcloud-fails/18182
**Category:** Troubleshooting
**Created:** [21 October 2023 12:11 UTC](https://dietpi.com/forum/t/update-of-nextcloud-fails/18182 "2023-10-21T12:11:35Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![kusared](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/k/76d3ee/32.png) [@kusared](https://dietpi.com/forum/u/kusared)
#### Post date: [21 October 2023 12:11 UTC](https://dietpi.com/forum/t/update-of-nextcloud-fails/18182/1 "2023-10-21T12:11:35Z")

</div>

### Creating a bug report/issue

#### Required Information

- DietPi version | `cat /boot/dietpi/.version`  
G\_DIETPI\_VERSION\_CORE=8  
G\_DIETPI\_VERSION\_SUB=23  
G\_DIETPI\_VERSION\_RC=2  
G\_GITBRANCH=‘beta’  
G\_GITOWNER=‘MichaIng’

- Distro version | `echo $G_DISTRO_NAME $G_RASPBIAN`  
bookworm 0

- Kernel version | `uname -a`  
Linux DietPi4 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux

- Architecture | `dpkg --print-architecture`  
arm64

- SBC model | `echo $G_HW_MODEL_NAME` or (EG: RPi3)  
RPi 4 Model B (aarch64)

- Power supply used | (EG: 5V 1A RAVpower)

- SD card used | (EG: SanDisk ultra)

#### Additional Information (if applicable)

- Software title | (EG: Nextcloud)  
Nextcloud
- Was the software title installed freshly or updated/migrated?  
updated
- Can this issue be replicated on a fresh installation of DietPi?  
 ← If you sent a “dietpi-bugreport”, please paste the ID here → 
- Bug report ID | `echo $G_HW_UUID`  
a649c44d-eb03-421d-9786-9235958d4284

#### Steps to reproduce

1. followed the instruction to upgrade from bullseye to bookworm  
[Debian Bookworm has been released – DietPi Blog](https://dietpi.com/blog/?p=3128)
2. executed the bookworm-upgrade script without issues

#### Expected behaviour

- …

#### Actual behaviour

- the upgrade to bookworm seems to have worked, but since them i cant update nextcloud.

#### Extra details

```auto
root@DietPi4:~# sudo -u www-data php /var/www/nextcloud/updater/updater.phar
Nextcloud Updater - version: v25.0.11-5-g06c1bad

Current version is 25.0.12.

Update to Nextcloud 25.0.12 available. (channel: "stable")
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-25.0.12.zip
Open changelog ↗

Steps that will be executed:
[✔] Check for expected files
[✔] Check for write permissions
[✔] Create backup
[✔] Downloading
[✔] Verify integrity
[✔] Extracting
[✔] Enable maintenance mode
[✔] Replace entry points
[✔] Delete old files
[✔] Move new files in place
[✔] Done

Continue update? [y/N] y

Info: Pressing Ctrl-C will finish the currently running step and then stops the updater.

[✔] Check for expected files
[✔] Check for write permissions
[✔] Create backup
[✔] Downloading
[✔] Verify integrity
[✔] Extracting
[✔] Enable maintenance mode
[✔] Replace entry points
[✔] Delete old files
[✔] Move new files in place
[✔] Done

Update of code successful.

Should the "occ upgrade" command be executed? [Y/n] y
This version of Nextcloud is not compatible with PHP>=8.2.<br/>You are currently running 8.2.7.

```

thank you for Help

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [21 October 2023 12:55 UTC](https://dietpi.com/forum/t/update-of-nextcloud-fails/18182/2 "2023-10-21T12:55:12Z")

</div>

Problem might be your NC instance was not up-to-date before doing the Debian destro upgrade. Now NC is trying to update to latest NC25 first before offering NC26.

Can you share following

```auto
cat /var/www/nextcloud/lib/versioncheck.php

```

---

<div class="post-metadata">

### Author: ![Rednox](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/r/b782af/32.png) [@Rednox](https://dietpi.com/forum/u/Rednox)
#### Post date: [21 October 2023 12:56 UTC](https://dietpi.com/forum/t/update-of-nextcloud-fails/18182/3 "2023-10-21T12:56:09Z")

</div>

Exactly you somehow need to upgrade NC to v27 as you are on 25.  
Sorry for my double post.

> [@Error when installing Nextcloud on DietPi](https://dietpi.com/forum/t/error-when-installing-nextcloud-on-dietpi/15889/7):
>
> Hey @kusared , which nextcloud version are you currently running. Probably you are on an older nextcloud version that doesn’t support php8.2! I had a similar situation, actually I was running on an older nextcloud and it didn’t show me that there is a newer version. After upgrading php manually, nextcloud showed a newer compatible version. Perhaps this helps

---

<div class="post-metadata">

### Author: ![kusared](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/k/76d3ee/32.png) [@kusared](https://dietpi.com/forum/u/kusared)
#### Post date: [21 October 2023 13:12 UTC](https://dietpi.com/forum/t/update-of-nextcloud-fails/18182/4 "2023-10-21T13:12:17Z")

</div>

yes, the update of nc did not work it was my mistake to assume i need to upgrade to bookworm to get the latest update of nc, but i was wrong.

thank you for Help!

```php
<?php

declare(strict_types=1);

/**
 * @copyright Copyright (c) 2016 Roeland Jago Douma <roeland@famdouma.nl>
 *
 * @author Christoph Wurst <christoph@winzerhof-wurst.at>
 * @author Morris Jobke <hey@morrisjobke.de>
 * @author Roeland Jago Douma <roeland@famdouma.nl>
 *
 * @license GNU AGPL version 3 or any later version
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 *
 */
// Show warning if a PHP version below 7.4 is used,
if (PHP_VERSION_ID < 70400) {
        http_response_code(500);
        echo 'This version of Nextcloud requires at least PHP 7.4<br/>';
        echo 'You are currently running ' . PHP_VERSION . '. Please update your PHP version.';
        exit(1);
}

// Show warning if >= PHP 8.2 is used as Nextcloud is not compatible with >= PHP 8.2 for now
if (PHP_VERSION_ID >= 80200) {
        http_response_code(500);
        echo 'This version of Nextcloud is not compatible with PHP>=8.2.<br/>';
        echo 'You are currently running ' . PHP_VERSION . '.';
        exit(1);

```

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [21 October 2023 13:15 UTC](https://dietpi.com/forum/t/update-of-nextcloud-fails/18182/5 "2023-10-21T13:15:46Z")

</div>

> [@kusared](#):
>
> ```auto
> // Show warning if >= PHP 8.2 is used as Nextcloud is not compatible with >= PHP 8.2 for now
> if (PHP_VERSION_ID >= 80200)
> 
> ```

You can try to bypass the version check

```auto
sed -i 's/>= 80200/>= 80300/' /var/www/nextcloud/lib/versioncheck.php

```

hopefully this will allow update to 25.0.12 as a first step

I hope you have done a backup before playing on configs.

---

<div class="post-metadata">

### Author: ![kusared](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/k/76d3ee/32.png) [@kusared](https://dietpi.com/forum/u/kusared)
#### Post date: [21 October 2023 13:29 UTC](https://dietpi.com/forum/t/update-of-nextcloud-fails/18182/6 "2023-10-21T13:29:09Z")

</div>

yes as fallback i had an backup but thank you so much, that resloved my problem and saved me time.

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [21 October 2023 16:41 UTC](https://dietpi.com/forum/t/update-of-nextcloud-fails/18182/7 "2023-10-21T16:41:52Z")

</div>

Did you update to NC26 and NC27 afterwards?

---

<div class="post-metadata">

### Author: ![kusared](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/k/76d3ee/32.png) [@kusared](https://dietpi.com/forum/u/kusared)
#### Post date: [22 October 2023 21:59 UTC](https://dietpi.com/forum/t/update-of-nextcloud-fails/18182/8 "2023-10-22T21:59:24Z")

</div>

sorry for late response, yes updated to the latest version has worked without any issues.  
 ![image](https://dietpi.com/forum/uploads/default/original/2X/0/0c38ef08bf8613c67206858fad8aad9d1e97c234.png)

---

<div class="post-metadata">

### Author: ![HyperCriSiS](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/h/8e8cbc/32.png) [@HyperCriSiS](https://dietpi.com/forum/u/HyperCriSiS)
#### Post date: [15 June 2024 22:14 UTC](https://dietpi.com/forum/t/update-of-nextcloud-fails/18182/9 "2024-06-15T22:14:56Z")

</div>

Hi,  
I have a similar issue I am stuck with v25.0.13 and it says there’s no new version. I tried it with  
sed -i ‘s/\>= 80200/\>= 80300/’ /var/www/nextcloud/lib/versioncheck.php

But it still says there is no update.  
What can I do?

Thanks  
Hyper

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [16 June 2024 07:17 UTC](https://dietpi.com/forum/t/update-of-nextcloud-fails/18182/10 "2024-06-16T07:17:30Z")

</div>

Pls open a new issue and fill all required system information. Thanks for understanding.

---

<div class="post-metadata">

### Author: ![system](https://dietpi.com/forum/uploads/default/original/1X/7e1021de2213860bce185915ce2c1786e56490ec.png) [@system](https://dietpi.com/forum/u/system)
#### Post date: [14 September 2024 07:18 UTC](https://dietpi.com/forum/t/update-of-nextcloud-fails/18182/11 "2024-09-14T07:18:28Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
