Upgrading Nextcloud: Can I upgrade and migrate in one go?


For reasons I disabled automatic updating and skipped a bunch of updates. Now I can’t update it without also updating the underlying OS due to changes in PHP version.
So in order too minimize the risk of everything turning into a sh*t show I want to migrate to a new server.

It’s not very clear to me, based on the official migration docs, if it’s possible to migrate and upgrade in one go, meaning install new OS (Ubuntu), install newest Nextcloud and then migrate to that without going through the steps of updating Nextcloud after migration (an alternative approach would be to install the same Nextcloud version to the new server, migrate and then upgrade until I reach latest version.

What would you advise me to do?



It should be possible if you don’t skip major NC versions. E.g. if you go from a system with php 7.4 to a system with php 8.2, you can use NC 25 on the old system, then do a migration and manual upgrade at the same time to NC 26:

(but you can go from NC23 to NC 26, if you want to go from php 7.3 to 8.2)

for the manual upgrade: Copy database, datafolder and config folder to the new server. Then put the new code of the new NC version: Nextcloud server changelog
Place the new code, fix the permissions if necessary and run the occ upgrade command.

It is good if you still have the old server running until your new server is working. Keep a full backup!

Awesome. Thanks for a swift and elaborate reply :slight_smile:. Just what I was looking for!

Current version is 25 so I’ll probably do exactly as you suggested and then update continuosly until I hit current version.

Thanks again and have an awesome day!