NextCloud: Web interface is unreachable after Update

Recently I did the 28.0.14~1 update and since then the NextCloud instance is borked.
When I open the web interface it always shows the Maintenance Screen (couple of weeks now).
I tried the " Disable Maintenance Mode" and that results in a screen that shows:
" Update needed"
Please use the command line updates because updating via browser is disabled in your config.php.
For help, see documentation

Some logs:

2025-04-19T08:30:15+02:00  Running nextcloud...
2025-04-19T08:30:15+02:00  Starting PostgreSQL db server...
2025-04-19T08:30:15+02:00  waiting for server to start....2025-04-19 06:30:15.458 UTC [84] LOG: starting PostgreSQL 15.11 on x86_64-alpine-linux-musl, compiled by gcc (Alpine 14.2.0) 14.2.0, 64-bit
2025-04-19T08:30:15+02:00  2025-04-19 06:30:15.459 UTC [84] LOG: listening on IPv6 address "::1", port 5432
2025-04-19T08:30:15+02:00  2025-04-19 06:30:15.459 UTC [84] LOG: listening on IPv4 address "127.0.0.1", port 5432
2025-04-19T08:30:15+02:00  2025-04-19 06:30:15.465 UTC [84] LOG: listening on Unix socket "/run/postgresql/.s.PGSQL.5432"
2025-04-19T08:30:15+02:00  2025-04-19 06:30:15.481 UTC [87] LOG: database system was interrupted; last known up at 2025-04-19 06:18:34 UTC
2025-04-19T08:30:15+02:00  2025-04-19 06:30:15.548 UTC [87] LOG: database system was not properly shut down; automatic recovery in progress
2025-04-19T08:30:15+02:00  2025-04-19 06:30:15.555 UTC [87] LOG: redo starts at 2/4189CCE0
2025-04-19T08:30:15+02:00  2025-04-19 06:30:15.555 UTC [87] LOG: invalid record length at 2/4189CD18: wanted 24, got 0
2025-04-19T08:30:15+02:00  2025-04-19 06:30:15.555 UTC [87] LOG: redo done at 2/4189CCE0 system usage: CPU: user: 0.00 s, system: 0.00 s, elapsed: 0.00 s
2025-04-19T08:30:15+02:00  2025-04-19 06:30:15.569 UTC [85] LOG: checkpoint starting: end-of-recovery immediate wait
2025-04-19T08:30:15+02:00  2025-04-19 06:30:15.614 UTC [85] LOG: checkpoint complete: wrote 3 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.001 s, sync=0.012 s, total=0.052 s; sync files=2, longest=0.006 s, average=0.006 s; distance=0 kB, estimate=0 kB
2025-04-19T08:30:15+02:00  2025-04-19 06:30:15.623 UTC [84] LOG: database system is ready to accept connections
2025-04-19T08:30:15+02:00  done
2025-04-19T08:30:15+02:00  server started
2025-04-19T08:30:15+02:00  Starting nginx server...
2025-04-19T08:30:15+02:00  Nextcloud or one of the apps require upgrade - only a limited number of commands are available
2025-04-19T08:30:15+02:00  You may use your browser or the occ upgrade command to do the upgrade
2025-04-19T08:30:15+02:00  Nextcloud 28.0.14
2025-04-19T08:30:16+02:00  The current PHP memory limit is below the recommended value of 512MB.
2025-04-19T08:30:16+02:00  Nextcloud or one of the apps require upgrade - only a limited number of commands are available
2025-04-19T08:30:16+02:00  You may use your browser or the occ upgrade command to do the upgrade
2025-04-19T08:30:16+02:00  Starting Nextcloud frontend...
2025-04-19T08:30:16+02:00  Configuring Nextcloud frontend...
2025-04-19T08:30:16+02:00  Warning: /var/www/html/config/redis.config.php differs from the latest version of this image at /usr/src/nextcloud/config/redis.config.php
2025-04-19T08:30:16+02:00  Warning: /var/www/html/config/reverse-proxy.config.php differs from the latest version of this image at /usr/src/nextcloud/config/reverse-proxy.config.php
2025-04-19T08:30:16+02:00  Warning: /var/www/html/config/s3.config.php differs from the latest version of this image at /usr/src/nextcloud/config/s3.config.php
2025-04-19T08:30:16+02:00  Warning: /var/www/html/config/smtp.config.php differs from the latest version of this image at /usr/src/nextcloud/config/smtp.config.php
2025-04-19T08:30:16+02:00  => Searching for scripts (*.sh) to run, located in the folder: /docker-entrypoint-hooks.d/before-starting
2025-04-19T08:30:16+02:00  [19-Apr-2025 06:30:16] NOTICE: fpm is running, pid 143
2025-04-19T08:30:16+02:00  [19-Apr-2025 06:30:16] NOTICE: ready to handle connections
2025-04-19T08:30:26+02:00  Starting background tasks...
2025-04-19T08:30:26+02:00  crond: crond (busybox 1.37.0) started, log level 0
2025-04-19T08:30:26+02:00  crond: user:www-data entry:*/5 * * * * php -f /var/www/html/cron.php
2025-04-19T08:30:26+02:00  100001000010000100001000010000100001000010000100001000010000
2025-04-19T08:30:26+02:00  111111111111111111111111
2025-04-19T08:30:26+02:00  11111111111111111111111111111111
2025-04-19T08:30:26+02:00  111111111111
2025-04-19T08:30:26+02:00  1111111
2025-04-19T08:30:36+02:00  127.0.0.1 - 19/Apr/2025:06:30:35 +0000 "GET /index.php" 503
2025-04-19T08:30:40+02:00  127.0.0.1 - 19/Apr/2025:06:30:39 +0000 "GET /index.php" 503
2025-04-19T08:30:51+02:00  127.0.0.1 - 19/Apr/2025:06:30:51 +0000 "GET /index.php" 503
2025-04-19T08:31:00+02:00  crond: user:www-data entry:*/5 * * * * php -f /var/www/html/cron.php
2025-04-19T08:31:00+02:00  100001000010000100001000010000100001000010000100001000010000
2025-04-19T08:31:00+02:00  111111111111111111111111
2025-04-19T08:31:00+02:00  11111111111111111111111111111111
2025-04-19T08:31:00+02:00  111111111111
2025-04-19T08:31:00+02:00  1111111
2025-04-19T08:31:00+02:00  crond: wakeup dt=34
2025-04-19T08:31:00+02:00  crond: file www-data:
2025-04-19T08:31:00+02:00  crond: line php -f /var/www/html/cron.php
2025-04-19T08:31:06+02:00  127.0.0.1 - 19/Apr/2025:06:31:06 +0000 "GET /index.php" 503
2025-04-19T08:31:24+02:00  Running nextcloud...
2025-04-19T08:31:24+02:00  Starting PostgreSQL db server...
2025-04-19T08:31:24+02:00  waiting for server to start....2025-04-19 06:31:24.574 UTC [79] LOG: starting PostgreSQL 15.11 on x86_64-alpine-linux-musl, compiled by gcc (Alpine 14.2.0) 14.2.0, 64-bit
2025-04-19T08:31:24+02:00  2025-04-19 06:31:24.574 UTC [79] LOG: listening on IPv6 address "::1", port 5432
2025-04-19T08:31:24+02:00  2025-04-19 06:31:24.574 UTC [79] LOG: listening on IPv4 address "127.0.0.1", port 5432
2025-04-19T08:31:24+02:00  2025-04-19 06:31:24.581 UTC [79] LOG: listening on Unix socket "/run/postgresql/.s.PGSQL.5432"
2025-04-19T08:31:24+02:00  2025-04-19 06:31:24.596 UTC [82] LOG: database system was interrupted; last known up at 2025-04-19 06:30:15 UTC
2025-04-19T08:31:24+02:00  2025-04-19 06:31:24.673 UTC [82] LOG: database system was not properly shut down; automatic recovery in progress
2025-04-19T08:31:24+02:00  2025-04-19 06:31:24.681 UTC [82] LOG: redo starts at 2/4189CD90
2025-04-19T08:31:24+02:00  2025-04-19 06:31:24.681 UTC [82] LOG: invalid record length at 2/4189CDC8: wanted 24, got 0
2025-04-19T08:31:24+02:00  2025-04-19 06:31:24.681 UTC [82] LOG: redo done at 2/4189CD90 system usage: CPU: user: 0.00 s, system: 0.00 s, elapsed: 0.00 s
2025-04-19T08:31:24+02:00  2025-04-19 06:31:24.696 UTC [80] LOG: checkpoint starting: end-of-recovery immediate wait
2025-04-19T08:31:24+02:00  2025-04-19 06:31:24.751 UTC [80] LOG: checkpoint complete: wrote 3 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.001 s, sync=0.014 s, total=0.063 s; sync files=2, longest=0.008 s, average=0.007 s; distance=0 kB, estimate=0 kB
2025-04-19T08:31:24+02:00  2025-04-19 06:31:24.761 UTC [79] LOG: database system is ready to accept connections
2025-04-19T08:31:24+02:00  done
2025-04-19T08:31:24+02:00  server started
2025-04-19T08:31:24+02:00  Starting nginx server...
2025-04-19T08:31:25+02:00  Nextcloud or one of the apps require upgrade - only a limited number of commands are available
2025-04-19T08:31:25+02:00  You may use your browser or the occ upgrade command to do the upgrade
2025-04-19T08:31:25+02:00  Nextcloud 28.0.14
2025-04-19T08:31:25+02:00  The current PHP memory limit is below the recommended value of 512MB.
2025-04-19T08:31:25+02:00  Nextcloud or one of the apps require upgrade - only a limited number of commands are available
2025-04-19T08:31:25+02:00  You may use your browser or the occ upgrade command to do the upgrade
2025-04-19T08:31:25+02:00  Starting Nextcloud frontend...
2025-04-19T08:31:25+02:00  Configuring Nextcloud frontend...
2025-04-19T08:31:25+02:00  Warning: /var/www/html/config/redis.config.php differs from the latest version of this image at /usr/src/nextcloud/config/redis.config.php
2025-04-19T08:31:25+02:00  Warning: /var/www/html/config/reverse-proxy.config.php differs from the latest version of this image at /usr/src/nextcloud/config/reverse-proxy.config.php
2025-04-19T08:31:25+02:00  Warning: /var/www/html/config/s3.config.php differs from the latest version of this image at /usr/src/nextcloud/config/s3.config.php
2025-04-19T08:31:25+02:00  Warning: /var/www/html/config/smtp.config.php differs from the latest version of this image at /usr/src/nextcloud/config/smtp.config.php
2025-04-19T08:31:25+02:00  => Searching for scripts (*.sh) to run, located in the folder: /docker-entrypoint-hooks.d/before-starting
2025-04-19T08:31:25+02:00  [19-Apr-2025 06:31:25] NOTICE: fpm is running, pid 138
2025-04-19T08:31:25+02:00  [19-Apr-2025 06:31:25] NOTICE: ready to handle connections
2025-04-19T08:31:35+02:00  Starting background tasks...
2025-04-19T08:31:35+02:00  crond: crond (busybox 1.37.0) started, log level 0
2025-04-19T08:31:35+02:00  crond: user:www-data entry:*/5 * * * * php -f /var/www/html/cron.php
2025-04-19T08:31:35+02:00  100001000010000100001000010000100001000010000100001000010000
2025-04-19T08:31:35+02:00  111111111111111111111111
2025-04-19T08:31:35+02:00  11111111111111111111111111111111
2025-04-19T08:31:35+02:00  111111111111
2025-04-19T08:31:35+02:00  1111111
2025-04-19T08:31:45+02:00  127.0.0.1 - 19/Apr/2025:06:31:44 +0000 "GET /index.php" 503
2025-04-19T08:32:00+02:00  crond: user:www-data entry:*/5 * * * * php -f /var/www/html/cron.php
2025-04-19T08:32:00+02:00  100001000010000100001000010000100001000010000100001000010000
2025-04-19T08:32:00+02:00  111111111111111111111111
2025-04-19T08:32:00+02:00  11111111111111111111111111111111
2025-04-19T08:32:00+02:00  111111111111
2025-04-19T08:32:00+02:00  1111111
2025-04-19T08:32:00+02:00  crond: wakeup dt=25
2025-04-19T08:32:00+02:00  crond: file www-data:
2025-04-19T08:32:00+02:00  crond: line php -f /var/www/html/cron.php
2025-04-19T08:32:00+02:00  127.0.0.1 - 19/Apr/2025:06:32:00 +0000 "GET /index.php" 503
2025-04-19T08:32:15+02:00  127.0.0.1 - 19/Apr/2025:06:32:15 +0000 "GET /index.php" 503
2025-04-19T08:32:31+02:00  127.0.0.1 - 19/Apr/2025:06:32:31 +0000 "GET /index.php" 503

From your description, since 28.0.14~1 hasn’t been out for the couple of weeks you say you’ve had the problem, I think what you actually did was…

  1. Upgraded to 28.0.14 – upgrade failed and error started
  2. Later upgraded to 28.0.14~1 and the error wasn’t fixed

I think you’ll next need to make sure you have SSH set up so you can access the command line. To do that, follow this guide here: Start9 | Using SSH

When ready, this is the plan…

The fix for users with a broken 28.0.14 installation is:

  1. SSH into the server.

  2. Exec into the nextcloud container (nextcloud needs to be running)

sudo podman exec -it nextcloud.embassy bash
  1. Disable non-default apps by running this command from within the NC container:
sudo podman exec -it nextcloud.embassy bash nextcloud:/var/www/html# declare -A default_map; default_apps=('activity' 'calendar' 'circles' 'cloud_federation_api' 'comments' 'contacts' 'contactsinteraction' 'dashboard' 'dav' 'federatedfilesharing' 'federation' 'files' 'files_pdfviewer' 'files_reminders' 'files_rightclick' 'files_sharing' 'files_trashbin' 'files_versions' 'firstrunwizard' 'logreader' 'lookup_server_connector' 'nextcloud_announcements' 'notifications' 'oauth2' 'password_policy' 'photos' 'privacy' 'provisioning_api' 'recommendations' 'related_resources' 'serverinfo' 'settings' 'sharebymail' 'support' 'survey_client' 'systemtags' 'text' 'theming' 'twofactor_backupcodes' 'updatenotification' 'user_status' 'viewer' 'weather_status' 'workflowengine'); for app in "${default_apps[@]}"; do default_map["$app"]=1; done; enabled_apps=($(sudo -u www-data -E php /var/www/html/occ app:list | awk '/^Enabled:/ {f=1; next} /^Disabled:/ {f=0} f && /^[[:space:]]+-/ {sub(/:$/, "", $2); print $2}')); for enabled_app in "${enabled_apps[@]}"; do if [[ -z "${default_map[$enabled_app]}" ]]; then echo "Disabling non-default app: $enabled_app"; sudo -u www-data -E php /var/www/html/occ app:disable $enabled_app; fi; done

The user should see an output like this:

Disabling non-default app: mail
mail 3.7.24 disabled
Disabling non-default app: richdocuments
richdocuments 8.3.13 disabled
Disabling non-default app: richdocumentscode
richdocumentscode 24.4.1302 disabled

The nextcloud server should now be accessible in the UI (no need to restart).