What the message looks like
Internal Server Error. The server encountered an internal error and was unable to complete your request. Request ID: aB3xYz9QkLmN0pRsCommon causes
- Database unreachable, password changed or tables locked.
- Data directory or config.php not writable for the web server user.
- Incomplete update: code and database schema do not match.
- Missing or incompatible PHP extension after a PHP update.
- A broken app after an app update.
Check
- Check basic Nextcloud status
sudo -u www-data php /var/www/nextcloud/occ status - Find the log entry for the request ID
grep 'aB3xYz9QkLmN0pRs' /var/www/nextcloud/data/nextcloud.log | jq -r '.message, .exception.Message? // empty' - Show the last entries of nextcloud.log in readable form
tail -n 20 /var/www/nextcloud/data/nextcloud.log | jq -r '[.time, .app, .message] | @tsv' - Check for errors at web server level
tail -n 20 /var/log/nginx/error.log
Fix
- Read the message for the request ID – it usually names the app, file or SQL error.
- For an incomplete update run
occ upgrade, thenocc maintenance:repair. - Disable a broken app:
occ app:disable appname. - Fix ownership:
chown -R www-data:www-data /var/www/nextcloud(check the data directory separately if it lives elsewhere). - Test the database connection directly with the values from config.php.
Typical scenario
After a PHP upgrade from 8.2 to 8.3, Nextcloud shows 'Internal Server Error' on every page with a request ID such as Ab3dEf…. The page itself gives no cause. Search the log file for exactly that ID, for example with grep Ab3dEf data/nextcloud.log. The line contains the exception, file and line number. After PHP upgrades, a typical cause is a module that was not installed for the new version.
FAQ
Where is nextcloud.log if it is not in the data directory?
The path is in config.php under logfile. With log_type => syslog or systemd you find the entries with journalctl.
What if the log stays empty?
Then the request fails before Nextcloud, usually in PHP-FPM or nginx. Check their logs and set loglevel to 0 temporarily.
Why does the error page show no details?
For security reasons. Error messages can reveal paths and internal information. The request ID links browser and log without giving anything away. For debugging you can set 'debug' => true in config.php, but be sure to remove it again afterwards.
Where is the log file?
By default nextcloud.log in the data directory; the path can be changed through logfile in config.php. If logging goes through syslog or systemd, the entries are in the journal. Filter for the request ID with journalctl then.
How do I find out whether an app triggers the error?
If the log shows paths under apps/ or custom_apps/, an app is usually to blame. occ app:disable NAME switches it off even when the interface does not load. The site often becomes reachable again afterwards.