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…