Upgrade Nextcloud instance from Ubuntu 20.04.4 LTS to 22.04.1 LTS

Nextcloud version (eg, 20.0.5): 24.0.4
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04.4
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.41
PHP version (eg, 7.4): 7.4.3

Hi,

As said above, I’m currently running the latest Nextcloud version on Ubuntu 20.04.4 along php 7.4.3 and Apache 2.4.41. I’m contemplating upgrading to Ubuntu 22.04.1 LTS. I understand if I do so that I will also have to upgrade to php 8.0 or, better, 8.1.

Anything else I should be aware of before doing so?
Is it worth it at this point?
What is the best approach?
Is there a recipe already available somewhere?

Thanks in advance,
David

Hii @david.samson

Sorry if this comes across as a bit harsh. But during the past few weeks there have been so many threads in the forums from people who have either already upgraded to Ubuntu 22.04 or are planning to upgrade to 22.04. Most of them are asking similar questions, while usually not providing much detail about their setups, and still everybody seems to want personalized consultancy on how to upgrade their systems… :wink:

However, let me try to answer a few of your questions:

Asuming that you are using the standard PHP packages from the Ubuntu repos, the upgrade to Ubuntu 22.04 will automatically upgrade the installed PHP packages to version 8.1. But it’s also possible to use third party repos in order to install diffrent PHP versions independently from your OS version.

At the moment you can still use Ubuntu 20.04 with PHP 7.4 without issues. But at some point in time you will have to upgrade PHP (in a few months probably…) or the OS (Ubuntu 20.04 is supported until 2025)

First do a backup! If you are running it in a VM, you could also take a snapshot of the VM, in order to be able to easily roll back, in case you run into a bigger issue. Then enter sudo do-release-upgrade to the terminal and grab a coffee…

After the OS upgrade is done it is possible that not everything will work right away and you maybe have to re-install and re-configure some PHP modules. But that shouldn’t be that big of an issue because you already did this at least once, otherwise you wouldn’t have a running Nextcloud instance. And maybe you even have documentetd the steps you took while installing Nextcloud. If not, you can search the forum, use the Nextcloud documetation or one of the many guides out there as a reference…

https://docs.nextcloud.com/server/latest/admin_manual/installation/example_ubuntu.html

https://www.learnlinux.tv/build-an-awesome-nextcloud-server-updated-for-ubuntu-22-04/

https://www.howtoforge.com/tutorial/ubuntu-nginx-nextcloud/

Übersicht: Anleitungen Archive - Carsten Rieger IT-Services (German)

if you are running into issues which you’re not able to solve yourself, you can of course also open a new thread. But please use the support template, post logs and error messages and provide as many details about your setup as possible.

Good luck!

1 Like

Awesome answers bb77, thanks!

Sorry if this comes across as a bit harsh.

Not harsh at all… at least, no personal feelings hurt in the process. :wink:

But during the past few weeks there have been so many threads in the forums from people who have either already upgraded to Ubuntu 22.04 or are planning to upgrade to 22.04.

I did search the forum for infos on how users have upgraded their instances to Ubuntu 22.04, but I could’nt find anything relevant. I guess my search skills suck héhéhé

I’m a software developer. Been doing this professionnally for over 20 years, mostly in Java, but my sysadmin skills are more limited. Altought I have setup numerous Ubuntu servers here at home in the past (I have 3 Raspberry Pi running Ubuntu for totally different purposes as well as a seperate Nextcloud server that serves as a test instance before upgrading Nextcloud itself), it’ll be the first time I upgrade an LTS Ubuntu version to the newest LTS version.

I’ll be upgrading my test instance first as it’s, from a software perspective, an absolute equivalent to my production instance.

I was mostly wanting to know if there were any know caveats that I should be aware of. :slight_smile:

Thanks again!

See ya,
David

1 Like