NC on Raspberry Pi 4 not working

Recently my Nextcloud stopped working. I’m not 100% sure on how to access the config file via say putty so would need some guidance if this is something I would need to do.

I can enter the config at :4443 but cannot make any changes and this is what I get when trying to access Nextcloud

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.

Not sure what happened but need help please!

With current information it could be anything, please post the infos that ncpconfig (ipadress:4443) shows on startpage.
Also from ssh console you can find the Nextcloud logfile at the location listet on that page.

My guess is that the data directory is not reachable or the database is offline

Not sure why there are duplicate trusted domains…

|trusted_domains||
|0|localhost|
|5|nextcloudpi.local|
|7|nextcloudpi|
|8|nextcloudpi.lan|
|11|131.93.87.129|
|1|192.168.99.134|
|3|th3hub.ddns.net|
|2|th3hub.ddns.net|
|20|th3hub.ddns.net|
|21|192.168.99.134|
|12|th3hub.ddns.net|
|22|192.168.99.213|
|datadirectory|/var/www/nextcloud/data|
|dbtype|mysql|
|version|19.0.0.9|
|overwrite.cli.url|https://th3hub.ddns.net/|
|dbname|nextcloud|
|dbhost|localhost|
|dbport||
|dbtableprefix|oc_|
|mysql.utf8mb4|1|
|dbuser|ncadmin|
|installed|1|
|instanceid|oc1njr7k29sp|
|memcache.local|\OC\Memcache\Redis|
|memcache.locking|\OC\Memcache\Redis|
|redis||
|host|/var/run/redis/redis.sock|
|port|0|
|timeout|0|
|tempdirectory|/var/www/nextcloud/data/tmp|
|mail_smtpmode|sendmail|
|mail_smtpauthtype|LOGIN|
|mail_from_address|admin|
|mail_domain|ownyourbits.com|
|preview_max_x|2048|
|preview_max_y|2048|
|jpeg_quality|60|
|overwriteprotocol|https|
|loglevel|2|
|log_type|file|
|maintenance||
|theme||
|updater.release.channel|stable|
|app_install_overwrite||
|0|weather|
|1|breezedark|

I gave up and just redid the install process