Rescuing Nextcloud In Maintenance Mode

It's happened a couple of times to me - when updating Nextcloud through the browser, the browser crashes or (more likely) a mistimed Ctrl+W makes everything disappear.

When you go back - eeek! - you're stuck in maintenance mode, with seemingly no way out.

Don't despair, it's easy. If you can get a root (or Nextcloud system user account) shell via SSH.

Navigate to your public Nextcloud folder (not data folder), enter the config folder, and edit the config.php file. Change 'maintenance' to 'false', save and exit.

Reload Nextcloud in the browser and you should, fingers crossed, see the 'Update Now' button to continue your update :)