Ubuntu Upgrade on a Nextcloud instance
|During the last update of various Nextcloud apps, I received a warning that my PHP 8.1 would no longer be supported in the future. I took this as an opportunity to upgrade.
Introduction
This Nextcloud instance, which runs on my Proxmox server, was installed on Ubuntu 22.04. Even though it is possible to install PHP 8.2 on Ubuntu 22.04, I decided to upgrade the underlying Ubuntu version as well. Ubuntu 24.04 was released in April 2024, and I had already attempted an upgrade using the do-release-upgrade script back then, but it failed. But perhaps now was the time to try again.
Preparations
The first attempt to upgrade the Ubuntu version resulted in many error messages, which were also confirmed by the community. Therefore, there was no other option than to restore the backup of the LXC container. This option is still available now. However, it is also possible to take a snapshot on a ZFS file system, which also allows you to revert to the current version relatively easily.
And I also know that it would have been possible to install PHP 8.2 in version 22.04, especially since external repositories are used anyway.
The Upgrade Process
If you start the upgrade process with the script, hundreds of new packages are downloaded first.
During this process, the script asks whether services should be restarted without further prompting. I confirmed this.
The downloaded packages are then unpacked and installed.
During the update process, it also checks whether configuration files have been changed, for example, by the user. Here, you have the option of leaving the configuration file unchanged.
Afterward, my Nextcloud instance reported the new version 24.04.2 on the login screen after a reboot.
Still having problems logging in
The attempt to log in to the Nextcloud instance failed with an internal server error. I first tried running a local PHP file, which wasn’t a problem. It took quite a while, and only with the help of not only the web server log files, but especially the PHP interpreter log files, did I realize that this wasn’t the otherwise typical internal server error 500, but rather an internal server error without the 500.
It was only after looking at the PHP log files themselves, which can be accessed with the OCC tool, that I was notified that a login failed because a connection to the MariaDB database, which isn’t running on this machine, was not possible. Here, too, it took a while until a check of the installed modules revealed that the module for the MySQL or MariaDB database was not installed. This was a bit surprising, since it was running on the old instance.
After installing the corresponding PHP module, I was able to log in, but I still received an error message stating that the second missing module, the XML module, was not installed. After that, the login worked without any problems.
Conclusion
Although the upgrade worked this time, it’s still a little surprising that the most important PHP module, namely the one for connecting to a MySQL or Maria DB database, wasn’t installed or updated.
Presumably, this happens because external repositories are used for PHP anyway, and they aren’t included in the Ubuntu upgrade process.
So much for my experience. But now I have a Nextcloud instance running on Ubuntu 24.04 with PHP 8.2.
ciao tuxoche