Nextclound "wants" to reinstall each time I want to connect

Nextcloud version (eg, 20.0.5): 20.0.4
Operating system and version (eg, Ubuntu 20.04): N/A
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4
PHP version (eg, 7.4): 7.3

The issue you are facing:
I cannot connect anymore to my instance. My client (either Windows 10 or Manjaro) states that no connection is possible. If I want to connect via my browser (Firefox or Chromium on Manjaro, Firefox on Windows 10), when I type (mydomain.com)/nextcloud/, I get the admin user creation and configuration of the type of database interface. Via PHPMyAdmin, I checked that my database seems OK. My users are still present (admin+3 other ones). The files index.html, config/config.php, data/index.html, data/.htaccess, data/owncloud.db, and naturally data/Nextcloud.log were overwritten (automatically?). I haven’t modified anything to my server configuration. I attempted to get back to a previous version of PHP 7.3, with no effect.

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

Steps to replicate it:

  1. type (mydomain.com)/nextcloud
  2. stare at strange screen…

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

<?php
$CONFIG = array (
  'instanceid' => 'oce8jjv91et7',
  'passwordsalt' => ''
  'secret' => ',
  'trusted_domains' => 
  array (
    0 => 'mydomain.com',
  ),
  'datadirectory' => '/mydomain.com/www/nextcloud/data',
  'dbtype' => 'sqlite3',
  'version' => '20.0.4.0',
  'overwrite.cli.url' => 'https://mydomain.com/nextcloud',
);

The last lines of data/Nextcloud.log:

{"reqId":"YP-6LFRvIcdQ68n5pJ4D6QAAABA","level":2,"time":"2021-07-27T12:21:00+00:00","remoteAddr":"snip","user":"--","app":"no app in context","method":"POST","url":"/nextcloud/index.php","message":"Could not detect any host in https:///nextcloud/data/htaccesstest.txt","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0","version":""}
{"reqId":"YP-6LFRvIcdQ68n5pJ4D6QAAABA","level":2,"time":"2021-07-27T12:21:00+00:00","remoteAddr":"snip,"user":"--","app":"no app in context","method":"POST","url":"/nextcloud/index.php","message":"Could not detect any host in http:///nextcloud/data/htaccesstest.txt","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0","version":""}
{"reqId":"YP-6LpWlI8vvksB3MMxUzQAAAK0","level":2,"time":"2021-07-27T12:21:02+00:00","remoteAddr":"snip","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.2.2stable-Win64 (build 20210527) (Nextcloud, windows-10.0.19043 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":""}
{"reqId":"YP-6LpWlI8vvksB3MMxUzQAAAK0","level":2,"time":"2021-07-27T12:21:02+00:00","remoteAddr":"snip,"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.2.2stable-Win64 (build 20210527) (Nextcloud, windows-10.0.19043 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":""}

But this type of messages has been present for ages (I cannot install php7-mod-filter AFAIK)

Try adding

‘installed’ => true,

to your config.php.
Also, check if www-data has write permission to the file.

Thank you for answer. Yes, adding the line helped a bit, as I now get the connection interface. Howver, as my config.php is now almost empty and doesn’t have any information about my database, of course I get loads of error messages about it in the nextcloud log. What happened? Where is my config gone :unamused: ? I could try to add a few lines inspired from config.sample.php, but it’s a bit late here tonight and I would not like to make any mistake :sweat_smile:

I’l give it a try tomorrow…