Update to 13 - "Nextcloud is in maintenance mode"

I apologize if the question is trivial, but I made an automatic update to ver. 13. The process went as expected, but finally a screen appeared saying that Nextcloud is in maintenance mode.
And unfortunately I do not know how to unlock it to get to the login page.

could you pls provide us with a screenshot or something?

aaaand: where is your NC hosted? could you access it via commandline?

1 Like

Hi,

There are two ways to set Maintenance Mode on or off:

  1. via config.php

    • go to your nextcloud folder and then open config/config.php
    • search for 'maintenance' => true,
    • change true to false
    • save your changes
    • reload your web page
  2. via “occ” command on the command line

    • find out the user which runs the web server (usually www-data, http or apache)
      • if you don’t know how, copy and paste the following command and execute it:
        ps -ef | grep -Ei "apache|nginx" | grep -Ev "grep|root" | awk '{print $1}' | sort | uniq
    • go to your nextcloud folder with cd (example: cd /var/www/nextcloud )
    • as root user run the following command and replace WEBUSER with the username you just discovered:
      sudo -u WEBUSER php occ maintenance:mode --off
      (for example: sudo -u www-data php occ maintenance:mode --off )
4 Likes

Cool! Thanks for the help. The first method worked for me.

1 Like

Hi,

unfortunately, both ways are not working to get my nextcloud 13 running on a syncloud device out of maintenance mode.

There is no line containing “maintenance” in /opt/data/nextcloud/config/config.php or /opt/data/nextcloud/nextcloud/config/config.php. Adding 'maintenance' => false, to either of these files doesn’t solve the Problem.

running ps -ef | grep -Ei "apache|nginx" | grep -Ev "grep|root" | awk '{print $1}' | sort | uniq gives nextclo+
The path /var/www/nextcloud does not exist on my device. That’s why i went to /opt/app/nextcloud/nextcloud because there lies a file named occ (you see i don’t really know what i’m doing.) There I executed sudo -u nextclo+ php occ maintenance:mode --off, which gave sudo: unknown user: nextclo+. Then I tried sudo -u nextcloud php occ maintenance:mode --off which gave sudo: php: unknown command. I repeated the process at /opt/app/nextcloud because there lies a file named php but this just gave the same results as above.

What is it that I’m doing wrong? Any hints would be very appreaciated.

Best regards,
Sebastian