My Nextcloud went into Maintenance Mode?!?

Support intro

I am running Nextcloud on Unraid and my Unraid docker is completely up to date. Inside of Nextcloud it told me I could do a update. I went through the process and it acted like everything was fine and said all the apps were compatible with the update I was going too, then it started the update process and failed somewhere along the way and went into Maintenance Mode.

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): going from 19.x to 20.x
Operating system and version (eg, Ubuntu 20.04): Unraid
Apache or nginx version (eg, Apache 2.4.25): nginx
PHP version (eg, 7.4): not sure how to tell but the latest MariaDB available in Unraid and I have it fully updated

The issue you are facing:
Inside of Nextcloud it told me I could do a update. I went through the process and it acted like everything was fine and said all the apps were compatible with the update I was doing, then it started the update process and failed somewhere along the way and went into Maintenance Mode. I am not very computer knowledgeable and have no idea how to resolve this. I can not even log in to my Nextcloud.

Is this the first time you’ve seen this error? (Y/N): Yes

Steps to replicate it:

The output of your Nextcloud log in Admin > Logging:

I can not log in to access that

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

maybe someone can tell me how to do this

The output of your Apache/nginx/system log in /var/log/____:

maybe someone can tell me how to do this

Maybe I should add that in the past all of the Updates went fine. Also, just hours before the update I added a app that was recommended in the Nextcloud newsletter, it was for group sharing folders.

Hopefully someone can give me some advice and that is there something besides ‘delete the whole thing and start over’. That would be terrible.

The usual recommendation is to check the content of the Nextcloud log file for any errors. The file can be accessed on the console and is stored in the Nextcloud data directory by default, except you’ve configured a different path for it.

Hi @SPOautos, during an update nextcloud automatically went into Maintenace mode, after the upgrade you have the choice to keep it on or turn it off. But in your case, the upgrade has broken so you need to use a terminal on your physical machine to restart the upgrade of nextcloud.

  • Go in a terminal command line.
  • done this command( if you have some issues, you have to send them to us:
    cd /var/www/html/nextcloud (maybe you nextcloud directory is in other way so go inside your nextcloud directory)

sudo -u www-data php occ upgrade ( this command start the upgrade of your nextcloud )

sudo -u www-data php occ maintenance:repair ( this command will fix some issue you you have it on your nextcloud )

sudo -u www-data php occ maintenance:mode --off ( this command turn off the Maintenance mode ).

See : Using the occ command — Nextcloud latest Administration Manual latest documentation

1 Like

I’m sorry for the delay, I didnt get a email saying there was a reply.

Regarding the 3 commands you gave me, should I do them in that order? Upgrade, then repair, then turn off maintenance mode? So I should do the upgrade then the repair?

Hi @SPOautos,
Yes, launch the upgrade. If there is still an error during the upgrade, then launch the repair command and retry the upgrade. Finally, turn off maintenance mode.

1 Like

THANK YOU! I was able to fix it but for anyone else using Unraid, I was getting user errors and found that with Unraid I had to change the commands.

I ran this first…
sudo -u abc php7 /config/www/nextcloud/occ upgrade

It upgraded fine. Then I ran this to turn off maintenance mode…
sudo -u abc php7 /config/www/nextcloud/occ maintenance:mode --off

I’m back in business. Thank you Mageunic, what you gave me pointed me in the right direction. Much appreciated as I was completely lost, I dont know anything about terminal commands…thank goodness for Google and forums!

1 Like