Move to new server plus upgrade

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face: is for home/non-enterprise users. If you’re running a business, paid support can be accessed via where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:


Or for longer, use three backticks above and below the code snippet:


Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 24.0.1): replace me
Operating system and version (eg, Ubuntu 20.04): replace me
Apache or nginx version Apache 2.4.25: replace me
PHP version (eg, 8.1): replace me

The issue you are facing:
I have to move my selfhosted Nextcloud to a new server. At the same time I want to upgrade to the latest version. Can I make a fresh install on the new server and then connect to the old db and move the data folder

Is this the first time you’ve seen this error? (Y/N):

Steps to replicate it:

The output of your Nextcloud log in Admin > Logging:


The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):


The output of your Apache/nginx/system log in /var/log/____:



Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.


No this will create a new instance id. Here for migrating the server:

When you restore, you could already place the code of the new version and run the upgrade to the next major version directly (without running in the older version code, e.g. when you want to use a newer php version that was not supported on the old platform).

Well the problem is that I cant restore one time but need to upgrade many times bewfore I come to the newest version. Its just not possible.