Nextcloud version (eg, 20.0.5): 25.0.4
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04
PHP version (eg, 7.4): 8.0
The issue you are facing:
Hi!
When I call the website I get a white page with the message “Data directory is invalid Please check that the data directory contains a file “.ocdata” in its root.”
I’m using Plesk and I made a mistake by switching to PHP 8.2 Switching back didn’t work because something was messed up and I had to delete the subdomain. For that I saved the nextcloud folder
deleted the subdomain, created a new subdomain and copied everything back. And now I’m getting this message.
Directory /opt/nextcloud/data
was set on installation and contains a .ocdata file.
All threads concerning this topic seem to be caused by a move of the data directory, but this is not the case for me.
Any help is appreciated!
Best regards
Is this the first time you’ve seen this error? (Y/N): Y
The output of your Nextcloud log in Admin > Logging:
I can't login
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
$CONFIG = array (
'instanceid' => 'id',
'passwordsalt' => 'salt',
'secret' => 'secret',
'trusted_domains' =>
array (
0 => 'nextcloud.my.domain',
),
'datadirectory' => '/opt/nextcloud/data',
'overwrite.cli.url' => 'https://nextcloud.my.domain',
'dbtype' => 'mysql',
'version' => '25.0.4.1',
'dbname' => 'db',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'user',
'dbpassword' => 'password',
'installed' => true,
'maintenance' => true,
'mail_smtpmode' => 'sendmail',
'mail_smtpauthtype' => 'LOGIN',
'mail_from_address' => 'me',
'mail_domain' => 'my.domain',
'mail_smtpsecure' => 'tls',
'mail_smtphost' => 'smtp.my.domain',
'mail_smtpport' => '587',
'theme' => '',
'loglevel' => 2,
'mail_smtpauth' => 1,
'app_install_overwrite' =>
array (
0 => 'calendar',
),
'filelocking.ttl' => 21600,
'default_phone_region' => 'DE',
);