NextCloud stuck on maintenance mode after upgrading to NC 30

My NextCloud got stuck on maintenance mode after trying to upgrade to version 30.
I run the command su -s /bin/bash www-data -c ‘php maintenance:mode --off’ to enable NextCloud
However, I have this message now (Update Needed).
The problem is that everything is updated in the Scale GUI for the Apps.
I speculate that the PostgreSQL version 13 currently installed is too old.
Any idea?
Thanks in advance

I am using Scale Dragonfish-24.04.2.2.
My NextCloud is built on TrueNas charts and using nginx.
I have four folders for NextCloud, including one for the Database (PostgreSQL)
image

You need to get a shell in the container and run php occ upgrade. As the error message is telling you: “use the command line updater”.

1 Like

Patrick, thanks so much
Working again
Just adjust the command for my case
su -s /bin/bash www-data -c ‘php occ upgrade’

I encountered the same issue here but a slight nuance is that when I disabled maintenance mode, there was an option to continue the upgrade in the browser but that failed. When I ran through the command line that succeeded.
Also here’s the commands you need to run (formatted so you can paste into shell)

su -s /bin/bash -c "php occ maintenance:mode --off" www-data
su -s /bin/bash -c "php occ upgrade" www-data

Hallo I’am using TrueNAS Version:

25.04.2.6 and NC 31.0.9.

I can’t figure out how to update Nextcloud on the console.

I go to Nextcloud in the apps in the NAS and from there to the Nextcloud console.

After entering su, the display changes to root@xxxxx:/var/www/html#

Now follos: su -m www-data -c ‘php occ maintenance:mode –on’

maintenance mode enabled

root@xxxxx:/var/www/html#

I can no longer access Nextcloud via the web:
"Maintenance mode

This instance of Nextcloud is currently in maintenance mode, which may take a while."

If I exit maintenance mode after a long period of time, one hour, and log in to Nextcloud, no update has been performed.

What am I doing wrong?
Thanks for your help.

:/var/www/html# su -m www-data -c ‘php occ app:update --all’
All apps are up-to-date or no updates could be found

But Nextcloud shows me the latest version is Nextcloud 31.0.12.

then the image the truenas app uses hasn’t been updated yet. You have to wait for the maintainer to push the new image. Then the truenas webui will inform you that an update is available.

Edit:
May have spoken to fast, according to the apps catalogue nextcloud is already on 32.0.3

I downloaded the nextcloud 31.0.12 archive to my download folder on my PC (not server). When using the command: “su -m www-data -c ‘php occ app:update --all’ ”
do I first have to tell the Nextcloud system where the new archive is stored?

the admin-manual from nextcloud says: Command line upgrade

These commands are available only after you have downloaded upgraded packages or tar archives, and before you complete the upgrade.

That should only be true if nextcloud is not running as a dockerized version. The docker version gets updated if the image used to deploy nextcloud gets replaced by an image with the newer version. The app updates, restarts an is then on the newer version.

I can’t imagine that this is the only way to keep Nextcloud up to date on TrueNAS Scale.
Under Apps, my installed version 31.0.9 is shown as up to date.
I think something is wrong here.

yes it is, that’s how docker works.

If you installed as an app, an update of the app is the only way.

You can only update Nextcloud independently if you installed manually in a container (LXC) or a VM.

Apps are updated via the apps framework. No user serviceable parts inside.

Thank you .