Maintenance mode does not work

my NC is running in a hosted environment. I have no root access. Therefore I edited the config.php to put NC in maintenance mode:

$CONFIG = array (
  'maintenance' => true,

But nothing happend. NC is still serving. Is there more I have to do?

Nextcloud version: 20.0.4

I have no real idea. But have you set AJAX in
SettingsAdministration - > Basic Settings https://cloud.server.tld/settings/admin

I think the reload of config.php is sheduled from AJAX. Perhaps you must wait and execute some Nextcloud actions.

It is not a good idea to run Nextcloud “in a hosted environment” … with … “no root access” (or shell access from another user). Search for Managed Nextcloud for small money (or free) or for hoster with shell access.

yes, AJAX is set.
Probably you’re right: will look for another provider.
Thanks a lot.

Is there a way to force NC to reload the config.php again?

Problem solved:
php occ maintenance:mode --on
did the job.

Yes. You do not need root access. You need shell access to the webserver/nextcloud user.
Then you can use all occ-commands, too.

In that case your system is also well suited for nextcloud.
But you can also look around for Managed Nextcloud.
I use self-hosted and Managed Nextclouds, too.