Is present time Nextcloud compatibile to Rasspeberry pi-B2?

I have just installed nextcloud on my rasspberry pi B2 with upto date dietpi operating system.
the installation process went smooth. I told it to install NGINX. & system installed PHP, mariaDB & redis by itself as intended. through web browser i am able to see NGINX landing page. but when i tried to open nextcloud on browser white page display this

This version of Nextcloud is not compatible with > PHP 7.4. You are currently running 8.2.7.
so my question is can we install nextcloud on respberrypi B2. or it is not compatible. any thing i have to do differently in dietpi default installation. thanks

root@rpi:~# php -v
PHP 8.2.7 (cli) (built: Jul 20 2023 18:02:54) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.7, Copyright (c) Zend Technologies
    with Zend OPcache v8.2.7, Copyright (c), by Zend Technologies 

root@rpi:~# ncc maintance:repair
This version of Nextcloud is not compatible with > PHP 7.4.<br/>You are currently running 8.2.7.

root@rpi:~# lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 12 (bookworm)
Release:        12
Codename:       bookworm

root@rpi:~# cat /boot/dietpi/.version

root@rpi:~# uname -a
Linux rpi 6.1.21-v7+ #1642 SMP Mon Apr  3 17:20:52 BST 2023 armv7l GNU/Linux

root@rpi:~# echo $G_HW_MODEL_NAME
RPi 2 Model B (armv7l)

what is content of

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

The result of following command is as below:

root@rpi:~# cat /var/www/nextcloud/lib/versioncheck.php
 * @author Christoph Wurst <>
 * @author Daniel Kesselberg <>
 * @author Roeland Jago Douma <>
 * @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
 * 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 <>.
// Show warning if a PHP version below 7.2 is used,
if (PHP_VERSION_ID < 70200) {
        echo 'This version of Nextcloud requires at least PHP 7.2<br/>';
        echo 'You are currently running ' . PHP_VERSION . '. Please update your PHP version.';

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

ok looks like quite an old NC version. Can you check NC version as follow

root@rpi:~# cat /var/www/nextcloud/version.php
$OC_Version = array(20,0,14,2);
$OC_VersionString = '20.0.14';
$OC_Edition = '';
$OC_Channel = 'stable';
$OC_VersionCanBeUpgradedFrom = array (
  'nextcloud' =>
  array (
    '19.0' => true,
    '20.0' => true,
  'owncloud' =>
  array (
    '10.5' => true,
$OC_Build = '2021-11-11T15:12:13+00:00 50221f94abea4f26710091d94f2930a0322036bc';
$vendor = 'nextcloud';

This is Nextcloud 20 from November 2021. :scream: Of course it did not support PHP8.2 :wink:

Was this a fresh new install?
Was there NC installed before already?
Can you check if /mnt/dietpi_userdata/nextcloud_data/dietpi-nextcloud-installation-backup exists?

Thanks Joulinar, Yes it is old installation may be 4-5 years old & one time in past i installed the nextcloud & then deleted it. Thanks for giving me this indication. i just reflash raspberry with current image & install i nextcloud and now it is working. thanks

In this case, whole NC instance has been backup to /mnt/dietpi_userdata/nextcloud_data/dietpi-nextcloud-installation-backup during uninstall process and was restored during install. Therefore you got this old NC version up.

I want to access my nextcloud server access via my self sign certificate. In nginx i put this nextcloud.conf file & save sef signed certificate on required location. i am able to access my webserver “” (nginx landing page) but when i try to open “” system open the page “” & loose https connection and make http connection. what is the correct format for nextccloud.conf for nginx for dietpi.

server {
        listen 8080;
#        listen 80;

        return 301 https://$http_host$request_uri;

    server {
        listen 8443 ssl http2;
#        listen 443 ssl http2;

        # path to fullchain.pem on local machine
        ssl_certificate /mnt/dietpi_userdata/mycron/server.crt;

        # path to privkey.pem
        ssl_certificate_key /mnt/dietpi_userdata/mycron/server.key;

##        set $kavita;
        set $kavita;

##        gzip on;
##        gzip_vary on;
##        gzip_min_length 1000;
##        gzip_proxied any;
##        gzip_types text/plain text/css text/xml application/xml text/javascript application/x-javascript image/svg+xml;
##        gzip_disable "MSIE [1-6]\.";

        # Forward real ip and host to Plex
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        #When using ngx_http_realip_module change $proxy_add_x_forwarded_for to '$http_x_forwarded_for,$realip_remote_addr'
##        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; aio threads;
        proxy_set_header X-Forwarded-Proto $scheme;
##        proxy_set_header Sec-WebSocket-Extensions $http_sec_websocket_extensions;
##        proxy_set_header Sec-WebSocket-Key $http_sec_websocket_key;
##        proxy_set_header Sec-WebSocket-Version $http_sec_websocket_version;

        # Websockets
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";

        # Buffering off send to the client as soon as the data is received from Plex.
        proxy_redirect off;
        proxy_buffering off;

        location /nextcloud/ {
            proxy_pass $kavita;

the location of this file is at /etc/nginx/site-enabled/nextcloud.conf

$CONFIG = array (
  'passwordsalt' => 'XXXXXXXXXXXXX',
  'secret' => 'XXXXXXXXXXXX',
  'trusted_domains' =>
  array (
    0 => 'localhost',
    1 => '',
    2 => '*',
  'datadirectory' => '/mnt/dietpi_userdata/nextcloud_data',
  'dbtype' => 'mysql',
  'version' => '',
'hashingThreads' => 4,
'memcache.local' => '\\OC\\Memcache\\APCu',
'filelocking.enabled' => true,
'memcache.locking' => '\\OC\\Memcache\\Redis',
'redis' => array ('host' => '/run/redis/redis-server.sock', 'port' => 0,),
  'overwrite.cli.url' => 'http://localhost/nextcloud',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'oc_admin',
  'dbpassword' => 'XXXXXXXXXX',
  'installed' => true,
  'instanceid' => 'XXXXXXX',

my file /var/www/nextcloud/config/config.php