Nextcloud died after Ubuntu upgrade from 22.04 to 24.04

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 28.0.14.1
  • Operating system and version (e.g., Ubuntu 24.04):
    • Ubuntu 24.04
  • Web server and version (e.g, Apache 2.4.25):
    • Nginx 1.24.0
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • Cloudflare
  • PHP version (e.g, 8.3):
    • 8.3
  • Is this the first time you’ve seen this error? (Yes / No):
    • yes
  • When did this problem seem to first start?
    • after the upgrade is complete to 24.04 from 22.04
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • bare metal
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • Cloudflare yes

I’m not able to access my nextcloud after the OS upgrade. Here’s the error I got.

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

First I found out that the upgrade also upgraded my PHP from 8.1 to 8.3 which I fixed. Everything is up and running. I checked Cloudflare, and it said the web is running. Check on my PHP checker that I created and it’s working. Check the nextcloud.log and I’m not seeing any error. Checking the nginx log and it’s cleared after I fixed the sock issue by changing it from 8.1 to 8.3.

Nextcloud log:

10.1.10.113 - - [13/Mar/2025:19:23:50 -0400] “GET /index.php/204 HTTP/1.1” 500 301 “-” “Mozilla/5.0 (Android) Nextcloud-android/3.31.0”
10.1.10.113 - - [13/Mar/2025:19:25:26 -0400] “GET / HTTP/1.1” 500 301 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36”
10.1.10.113 - - [13/Mar/2025:19:25:26 -0400] “GET /favicon.ico HTTP/1.1” 500 301 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36”
10.1.10.113 - - [13/Mar/2025:19:25:28 -0400] “GET /index.php/apps/files/preview-service-worker.js HTTP/1.1” 500 301 “https://my.web.net/index.php/apps/files/preview-service-worker.js” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36”
10.1.10.113 - - [13/Mar/2025:19:25:38 -0400] “GET / HTTP/1.1” 500 301 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36”
10.1.10.113 - - [13/Mar/2025:19:25:38 -0400] “GET /favicon.ico HTTP/1.1” 500 301 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36”
10.1.10.113 - - [13/Mar/2025:19:25:39 -0400] “GET / HTTP/1.1” 500 301 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36”
10.1.10.113 - - [13/Mar/2025:19:25:39 -0400] “GET /favicon.ico HTTP/1.1” 500 301 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36”
10.1.10.113 - - [13/Mar/2025:19:25:41 -0400] “GET /index.php/apps/files/preview-service-worker.js HTTP/1.1” 500 301 “https://my.web.net/index.php/apps/files/preview-service-worker.js” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36”
10.1.10.113 - - [13/Mar/2025:19:26:10 -0400] “GET /index.php/apps/files/preview-service-worker.js HTTP/1.1” 500 301 “https://my.web.net/index.php/apps/files/preview-service-worker.js” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36”
10.1.10.113 - - [13/Mar/2025:19:28:36 -0400] “GET / HTTP/1.1” 500 301 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36”
10.1.10.113 - - [13/Mar/2025:19:28:37 -0400] “GET /favicon.ico HTTP/1.1” 500 301 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36”
10.1.10.113 - - [13/Mar/2025:19:28:39 -0400] “GET /index.php/apps/files/preview-service-worker.js HTTP/1.1” 500 301 “https://my.web.net/index.php/apps/files/preview-service-worker.js” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36”
10.1.10.113 - - [13/Mar/2025:19:29:10 -0400] “GET /index.php/apps/files/preview-service-worker.js HTTP/1.1” 500 301 “https://my.web.net/index.php/apps/files/preview-service-worker.js” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36”
10.1.10.113 - - [13/Mar/2025:19:55:31 -0400] “GET /index.php/204 HTTP/1.1” 500 301 “-” “Mozilla/5.0 (Android) Nextcloud-android/3.31.0”
10.1.10.113 - - [13/Mar/2025:19:55:31 -0400] “GET /index.php/204 HTTP/1.1” 500 301 “-” “Mozilla/5.0 (Android) Nextcloud-android/3.31.0”
10.1.10.113 - - [13/Mar/2025:19:55:31 -0400] “GET /index.php/204 HTTP/1.1” 500 301 “-” “Mozilla/5.0 (Android) Nextcloud-android/3.31.0”
10.1.10.113 - rb [13/Mar/2025:19:55:31 -0400] “PROPFIND /remote.php/dav/files/rb/ HTTP/1.1” 500 301 “-” “Mozilla/5.0 (Android) Nextcloud-android/3.31.0”
10.1.10.113 - - [13/Mar/2025:20:10:40 -0400] “GET /index.php/204 HTTP/1.1” 500 301 “-” “Mozilla/5.0 (Android) Nextcloud-android/3.31.0”
10.1.10.113 - rb [13/Mar/2025:20:10:40 -0400] “PROPFIND /remote.php/dav/files/rb/ HTTP/1.1” 500 301 “-” “Mozilla/5.0 (Android) Nextcloud-android/3.31.0”
10.1.10.113 - - [13/Mar/2025:20:10:40 -0400] “GET /index.php/204 HTTP/1.1” 500 301 “-” “Mozilla/5.0 (Android) Nextcloud-android/3.31.0”
10.1.10.113 - - [13/Mar/2025:20:10:40 -0400] “GET /index.php/204 HTTP/1.1” 500 301 “-” “Mozilla/5.0 (Android) Nextcloud-android/3.31.0”
10.1.10.113 - - [13/Mar/2025:20:25:41 -0400] “GET /index.php/204 HTTP/1.1” 500 301 “-” “Mozilla/5.0 (Android) Nextcloud-android/3.31.0”
10.1.10.113 - - [13/Mar/2025:20:40:42 -0400] “GET /index.php/204 HTTP/1.1” 500 301 “-” “Mozilla/5.0 (Android) Nextcloud-android/3.31.0”
10.1.10.113 - - [13/Mar/2025:20:40:43 -0400] “GET /index.php/204 HTTP/1.1” 500 301 “-” “Mozilla/5.0 (Android) Nextcloud-android/3.31.0”
10.1.10.113 - - [13/Mar/2025:20:44:17 -0400] “GET / HTTP/1.1” 500 301 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36”
10.1.10.113 - - [13/Mar/2025:20:44:17 -0400] “GET /favicon.ico HTTP/1.1” 500 301 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36”
10.1.10.113 - - [13/Mar/2025:20:44:19 -0400] “GET /index.php/apps/files/preview-service-worker.js HTTP/1.1” 500 301 “https://my.web.net/index.php/apps/files/preview-service-worker.js” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36”
10.1.10.113 - - [13/Mar/2025:20:44:49 -0400] “GET /index.php/apps/files/preview-service-worker.js HTTP/1.1” 500 301 “https://my.web.net/index.php/apps/files/preview-service-worker.js” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36”

I’m not sure where to go to start debugging it. Please advise.

First check for correct PHP version. You need PHP 8.3. Because of here you can use PHP 8.3 also for Nextcloud 28. Please upgrade to newer Nextcloud versions look here.

Check for your php versions:
dpkg -l |grep php

Maybe somethink is missing:
php8.3-{gd,intl,zip,bz2,curl,mbstring,xml,imagick,redis}

Check also nginx in you nginx configuration files:

upstream php-handler {
    server unix:/run/php/php8.3-fpm.sock;
}

On change execute
sudo systemctl restart nginx

This can also be triggered by an app that is no longer supported. If this is the case, you must deactivate the app with the occ command.