What the message looks like
Nextcloud is in maintenance mode, no apps are loaded.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.
Check
- 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 - Is the web updater stuck?
ls -la /var/www/nextcloud/data/updater-*/
Fix
- 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. - Fix ownership:
chown -R www-data:www-data /var/www/nextcloud. - Use
trapin backup scripts so maintenance mode is switched off even on failure.
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.