Running out of space leads to a complete crash?

Nextcloud version (eg, 20.0.5): 20.0.8
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04
Apache or nginx version (eg, Apache 2.4.25): 2.4.41
PHP version (eg, 7.4): 7.4.3

The issue you are facing:
Everything ran nice and smooth until recently. I’ve ran out of space on my virtual server and Nextcloud sync stopped working for every user. Freeing up space did not help. Trying to log in web portal produced the following error and now cannot log in or do anything:

Error

It looks like you are trying to reinstall your Nextcloud. However the file CAN_INSTALL is missing from your config directory. Please create the file CAN_INSTALL in your config folder to continue.

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Run out of space on you server.
  2. Ignore the syncing failure of several files for couple of weeks.
  3. Try to log in.
  4. Now you’re doomed.

The output of your Nextcloud log in Admin > Logging:

{..."user":"--","app":"PHP","method":"PROPFIND","url":"/nextcloud/index.php","message":{"Exception":"Error","Message":"fwrite(): write of 131 bytes failed with errno=28 No space left on device at /var/www/nextcloud/lib/private/legacy/OC_Util.php#1233"...}...}
{..."user":"--","app":"no app in context","method":"PROPFIND","url":"/nextcloud/index.php","message":"Could not detect any host in http:///nextcloud/data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows) mirall/3.4.0stable-Win64 (build 20211129)"...}
{..."user":"--","app":"no app in context","method":"PROPFIND","url":"/nextcloud/index.php","message":"Could not detect any host in https:///nextcloud/data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows) mirall/3.4.0stable-Win64 (build 20211129)"...}

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'ocaqndvtp0q8',
);

The output of your Apache/nginx/system log in /var/log/____:

... "GET /nextcloud/status.php HTTP/1.1" 200 6351 "-" "Mozilla/5.0 (Windows) mirall/3.4.0stable-Win64 (build 20211129) (Nextcloud, windows-10.0.19042 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
... "PROPFIND /nextcloud/remote.php/dav/files/myname/ HTTP/1.1" 302 647 "-" "Mozilla/5.0 (Windows) mirall/3.4.0stable-Win64 (build 20211129) (Nextcloud, windows-10.0.19042 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
... "PROPFIND /nextcloud/index.php HTTP/1.1" 200 2280 "-" "Mozilla/5.0 (Windows) mirall/3.4.0stable-Win64 (build 20211129) (Nextcloud, windows-10.0.19042 ClientArchitecture: x86_64 OsArchitecture: x86_64)"

The output of config file bugs me a little bit, as I see no info upon database connection etc. Could Nextcloud autoupdate and fail due to the lack of space? What should i do not to screw it up completely?