Stuck in maintenance mode after container update

Hi all - I run Nexctloud on my Unraid server using the official docker container. Has been fantastic since day one, until a recent update that sees me now stuck in maintenance mode.

I can see other threads with similar problems, but it doesn’t seem clear what the solution is, or the exact syntax required to enter in the terminal is not provided.

If anyone could help I would be hugely appreciative.

Mine has done that once or twice. Give it some time because sometimes it stays in maint mode while wrapping up the update. If it’s really stuck then you can take it out of maint mode manually with occ. or toggle it on/off if it seems stuck.

Hi there, thanks for the response. Unfortunately it has been stuck in maintenance mode for ~3 days now.

I’m not sure what you mean by ‘occ’. Are you able to elaborate?

In terms of toggle on/off are you referring to the docker container? If so, I have already tried that.

Thanks again!

No… I mean use the occ command to toggle maintenance mode.

Thanks for the link. Unfortunately I am not very experienced with the console side of things. I have found the command to toggle maintenance mode off :
sudo -u www-data php occ maintenance:mode --off

I have enterd this into the console for the Nextcloud Docker in UnRaid but it returns the following:
sudo: unknown user: www-data

It’s likely I am missing something obvious here, so hoping you might point me in the right direction?

OCC must be run as the web server user, and run inside the Docker container.

Don’t use sudo inside the container, but rather invoke the container’s shell as the web server user. Typically this is www-data but could be something else on some systems.

I’m not really sure what a web server user is sorry?

The user context under which the web server software (Apache, etc.) is running. The OCC utility must be run as the same user that your web server runs as.

In the case of a docker container, you would execute a shell in the Nextcloud container as that user, and then run occ without sudo. Or eliminate a step and invoke occ directly I. The container as that user.

I can’t give you specific instructions for Unraid as I’ve never used it personally. On other systems it typically looks like this:

docker exec -itu www-data nextcloud php occ <subcommand>

1 Like

I really appreciate your time, thanks again. Will try the UnRaid forums.