Moving from old server Ubuntu 22.04 with nextcloud in root folder of a vhost subdomain to a new server with Ubuntu 24.04.01. Both using Apache2 and php8.3
Before updating made sure nextcloud and apps were all up to date (from memory NC updated to 28.x.y.z - can’t remember exactly which sub version - but the updater was happy and all was functioning normally before backup.
Followed instruction exactly - uploaded the backup files, set all to be owner www-data and permissions 775. Restored database backup sql file - actually using phpmyadmin as easier - to same database name with same username and password - all data seems present and correct.
Go to home page and just get a message
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.
There are no “technical details” below - just a blank page, and nothing in any logs.
Since then I have tried removing all the files aside from the data and config directories and restoring fresh ones from a download (which appeared to be a later version 29.x.y.z than the one which was current when I did the backup 6 days ago) but still same result. So i then deleted all the files and did a fresh install with the web-installer script (setup-nextcloud.php) and then replaced the data and config folders with the original keeping the same database - but again the same result.
What has gone wrong? I have no idea and no info to work from. Is nextcloud compatible with Ubuntu 24.04 ??? Why are no errors being reported?
Any helpful suggestions?
If push comes to shove I could simply upload the files from the backup (there aren’t many and they are not critical) once I have a working install, but the killer is all the calendar data which is in the database - how can I transfer that with the same users and calendars (several of them) into a new instance. I have paused all syncing while I sort this out - but once the holiday period is over I need to have it working without loosing any calendar/task/deck/vjournal info which is the main use of this NC.
Internal server error can have multiple causes, even just a “simple” configuration mistake. First step would be to check the logfiles, depending on how exactly you installed, something like /var/logs/apache2/error.log or the like. It should contain more details to the internal server error. Also check your nextcloud log, by default it should be in the data directory and called nextcloud.log.
Unfortunately there is nothing in either server log or apache log or php error log. I’ve tried clearing the logs and reloading the index page but the result is zero sized log files - nothing is being written to them by nextcloud.
I wasn’t aware of the nextcloud log in the data directory but unfortunately that had nothing in it apart from entries from the original installation. Again I deleted it, and running the index page creates a new zero size log file but no data gets written to it.
Oddly (to my mind) the permissions on the data directory seem to have been changed to be only readable by the owner (www-data) and not the group. Sudo does allow the directory to be listed and files (like the log file) to be deleted.
I have set the permissions back to 775 for all files (read write and execute for owner and group, read and execute for others) but no improvement.
I still have access (until 1 Jan) to the old server and there the data folder has permissions 770 and the contents are all permission 777 so I replicated this on the new one, but same result.
Other subdomains and domain vhosts on the new server are all working ok so something is screwed in the nextcloud instance - but what? More importantly any suggestions for how to rebuild it and restore the data (expecially the database data))?
OK, some progress. After poking around I discovered that running console.php was giving an error about 'memcache.local' => '\OC\Memcache\APCu', so I removed that line from the config.ini and now it starts up - but it is saying that it will update NC to v30.0.4 and that several apps that I use will be disabled because they are not compatible. There is no option to NOT do the upgrade (apart from crashing out - but then it comes back the same next time I go to the home page.
How do I stop it enforcing an unwanted update please?
This suggests the Nextcloud Server installation directory on your target directory is already v30.0.4 (the message you’re seeing is about upgrading the database and apps to match the version of Nextcloud Server that is already located on-disk).
If you are trying to migrate between two different environments, the target environment should be the same Nextcloud Server version as your source.
From your earlier posts, that would be v28.x.x. However, it also appears you bypassed the usual migration process and did two other clean installations (while troubleshooting). Perhaps something got mixed up there?
Thanks @jtr - you were quite right, the installation directory must have persisted from the previous failed attempt to get a fresh install working through the more recent restore (I thought I had deleted or overwritten everything - my bad)
After a fresh restore and removing the (now) duff OC\memcache reference it started to work.
Strangely at first it displayed a login screen with no login form - but after throwing up my hands in despair, opening a fresh bottle of solace, and a good night’s sleep it came good all by itself.
Thanks to all who replied. Now onwards and upwards…