Cannot reinstall Nextcloud - SOLVED

I have been using Nextcloud very successfully for a while now. Recently I had an error message come up when logging on to my instance:

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

As my userdata folder is held on a second removeable ssd, and as the ssd seemed to be unmounted, I have been trying various solutions but without success. I have been able to backup the contents of the drive, and decided to reinstall Nextcloud using “dietpi-software reinstall 114”

This produces the error:

root@HP4520-server:~# dietpi-software reinstall 114
[  OK  ] DietPi-Software | Initialised database
[  OK  ] DietPi-Software | Reading database

 Mode: Automated reinstall

[  OK  ] DietPi-Software | Reinstalling Nextcloud: File sync, sharing and collaboration platform
[  OK  ] DietPi-Software | Free space check: path=/ | available=207763 MiB | required=500 MiB
[FAILED] DietPi-Software | DietPi-Userdata validation: /mnt/data_ed871d75-b1db-43b7-a266-6c584e663ed3/dietpi_userdata

I can see /mnt/ed871d75-b1db-43b7-a266-6c584e663ed3/dietpi_userdata with Filemanager on Webmin, and this holds my original files. I can also see /mnt/data_ed871d75-b1db-43b7-a266-6c584e663ed3, but this is an empty directory.

Any help to solve the problem would be most welcome. Let me know if any further details are needed.

Thanks in advance.

I am assuming this is relevant, but just checked a few more things, and have discovered that Mariadb is not running (my knowledge is somewhat limited, but I believe that this runs the database for Nextcloud). The error message given is:

MariaDB error message
The full MariaDB error message was : connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)' Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!

Update: After looking again at the userdata location, it would appear that it was pointing to /mnt/**data_**ed871d75-b1db-43b7-a266-6c584e663ed3/dietpi_userdata, but the actual files were held in /mnt/ed871d75-b1db-43b7-a266-6c584e663ed3/dietpi_userdata

No idea how that happened, but by renaming /mnt/ed871d75-b1db-43b7-a266-6c584e663ed3/dietpi_userdata to /mnt/data_ed871d75-b1db-43b7-a266-6c584e663ed3/dietpi_userdata and rebooting, all is working again.

Hope this might help someone else.


it looks like your mount point changed to a new name. Did you re-mounted your drive in between under a new name? This actually would explain why your mount point is available on a new directory. And of course with an incorrect mount your system will not start correctly. At least the database can not start because all database related files are located on your external drive.