How to upgrade Ubuntu, php and Nextcloud

I have NC19.0.8 installed on ubuntu18.04.1 and PHP 7.3.19-1. When using the built in updater I start updating all apps, and get stalled before it finishes. I assume that I cannot update the NC either but have not tried as the update of apps did not work.
Is that because of the old serverinstallation? I am considering inactivating and removing unnecessary apps - will that help? Or should I upgrade Ubuntu and php first? Or migrate to a completely new installation?

Update :wink: - it worked. After disabling and removing a lot of apps that I did not need for the moment the update went smooth.

Now I wonder - can I upgrade Ubuntu? And php?

As for the LTS-Upgrade of Ubuntu: If you are going from 18.04 to 20.04 I recommend you to do a fresh install onto empty HDD’s rather than doing a release upgrade. As from my own experiences at the end release upgrades are bringing more pain than satisfaction.

Update 2: well smooth is a bit overenthusiastic. I have some issues to take care of:

  • Your web server is not properly set up to resolve “/.well-known/webfinger”. Further information can be found in the documentation.

  • Your web server is not properly set up to resolve “/.well-known/nodeinfo”. Further information can be found in the documentation.

  • Your installation has no default phone region set. This is required to validate phone numbers in the profile settings without a country code. To allow numbers without a country code, please add “default_phone_region” with the respective ISO 3166-1 code :arrow_upper_right: of the region to your config file.

  • The database is missing some indexes. Due to the fact that adding indexes on big tables could take some time they were not added automatically. By running “occ db:add-missing-indices” those missing indexes could be added manually while the instance keeps running. Once the indexes are added queries to those tables are usually much faster.

    • Missing index “fs_size” in table “oc_filecache”.

And it seems some remaining rests of previous versions of apps need to be removed.
I understand that upgrading Ubuntu is not a good idea. and 18.0.4 will still be OK some more years, I dont know if the same apply to php 7.3.

Maybe better to start from scratch and migrate?

better: backup. update. hope. check.
in case it crashed. start from scratch and restore.

i just updated from nc17 to nc20 on a ubuntu 16. that works without starting from scratch. all error messages could be googled.

the real trick is to always have a working backup and tested restore. :wink: