Recently moved Nextcloud from one server to another and when it opened, noticed the following error in the browser:
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.
In my case, the error occurred because of a damaged MySQL database, so I restored it from another backup and Nextcloud opened.
I assume that the same error can occur when the Nextcloud database exists, but is empty.
See my article:
Install Nextcloud in Ubuntu