Maintenance Mode Configuration

Introduction

You must put your ownCloud server into maintenance mode before performing upgrades. The same applies to performing troubleshooting and maintenance tasks. See Using the occ Command to learn how to put your server into the various maintenance modes (maintenance:mode, maintenance:singleuser, and maintenance:repair) with the occ command. You can also use the config.php file for setting maintenance modes.

maintenance:mode locks the sessions of logged-in users and prevents new logins. This is the mode to use for upgrades.

Enable Maintenance Mode

To enable maintenance mode, run the following command:

sudo -u www-data php occ maintenance:mode --on

You may also put your server into this mode by editing config/config.php.

'maintenance' => true,

Disable Maintenance Mode

To disable maintenance mode, run the following command:

sudo -u www-data php occ maintenance:mode --off

You may also put your server into this mode by editing config/config.php.

'maintenance' => false,