Nextcloud is in maintenance mode and blocks the web UI, clients and most occ commands – either set on purpose or left behind by an update that did not finish cleanly.
Common causes
- The web updater or a package update was aborted and
occ upgradenever completed. - A backup script enabled maintenance mode and failed before turning it off.
-
'maintenance' => trueis still set inconfig/config.php. - Wrong file ownership after the update, so occ cannot write
config.php.
How to check it
Show status and versions
sudo -u www-data php /var/www/nextcloud/occ status Check maintenance in the config
grep -n maintenance /var/www/nextcloud/config/config.php Latest errors in the Nextcloud log
tail -n 20 /var/www/nextcloud/data/nextcloud.log What actually helps
- Finish the pending upgrade:
sudo -u www-data php occ upgrade. - Then turn it off:
sudo -u www-data php occ maintenance:mode --off. - Stuck web updater: remove the
.stepfile indata/updater-*/and rerun the update withphp updater/updater.phar.
FAQ
Can I just set maintenance to false in config.php?
Yes, but only if no upgrade is pending. Otherwise Nextcloud shows the update page or errors afterwards. Check occ status first.
How is this different from maintenance:singleuser?
Single-user mode still lets admins in through the browser; regular maintenance mode locks out everyone.
Full page with every command and the German/Italian version: daniele-michelin.com/en/errors/nextcloud-maintenance-mode-enabled/
First published at daniele-michelin.com. The error lexicon covers HTTP, DNS, TLS, mail, database, PHP, nginx, systemd and Nextcloud, in German, English and Italian.
