2025-07-12 18:35:54,715: DEBUG - Your data directory is invalid.
2025-07-12 18:35:54,715: DEBUG - Ensure there is a file called ".ocdata" in the root of the data director
I don’t know if this is why the Nextcloud installation is failing, but you could try adding this file:
-rw-r----- 1 nextcloud nextcloud 0 Dec 13 2019 .ocdata
Is that good ?
I tried a new update but I do have the same error :
Info: DEBUG - Your data directory is invalid.
Info: DEBUG - Ensure there is a file called ".ocdata" in the root of the data directory.
Info: DEBUG -
Info: DEBUG - An unhandled exception has been thrown:
Info: DEBUG - Exception: Environment not properly prepared. in /var/www/nextcloud/lib/private/Console/Application.php:167
Info: DEBUG - Stack trace:
Info: DEBUG - #0 /var/www/nextcloud/console.php(101): OC\Console\Application->loadCommands()
Info: DEBUG - #1 /var/www/nextcloud/occ(11): require_once('...')
Info: DEBUG - #2 {main}+ ynh_exit_properly