Nexcloud in Maintenance mode after Upgrade / Needs Upgrade

after the upgrade from 24.x to 25.x my Nexcloud instance is in maintenance mode.

I have already tried this:

But afterwards it tells me that it needs an update. Then I tried this:

But most of the commands from the second thread don’t work.

It seems to me that this has been an issue for a long time, as there are similar forum threads dating back to upgrades to NC 18.

Is there a way to solve this?

kind regards

OK, I found out that the commands in the second thread are missing the “php” command.

This seems to work
univention-app shell nextcloud sudo -u www-data php /var/www/html/occ upgrade

Unfortunately the Polls App is now deactivated and I get a lot of errors when I try to activate it again

There are some basic administrator maintenance things that should be done before upgrading NextCloud. I first ran NextCloud under UCS so I was not aware of the importance of it at first as I never really needed anything more than the basic functionality.

Before upgrading NextCloud, you should log in as Administrator to NC and run all the updates on the apps and also check the overview in the admin settings for any database maintenance or other items that need to be fixed. Some of the webserver setup recommendations can be ignored if they aren’t important to you.

Once I started checking these things before any update of the app in UCS I have had no more issues with upgrades.

Fixing issues from a failed upgrade can be difficult as it’s not always clear what the particular issue is. I run my server as a VM in ProxMox so I am able to roll back to a previous snapshot when something goes belly up. I highly recommend running servers as VMs. At this point I would not run a server bare metal. The benefits of running as a VM are too nice to go back to bare metal.

the occ commanf file has the permissions -rw-r–r-- instead of -rwxr-xr-x since upgrade to Nextcloud 25.

univention-app shell nextcloud chmod 755 /var/www/html/occ

the occ-command will work withpout preceding “php” again.