How to migrate from ownCloud to Nextcloud

We’ll show you, how to migrate from ownCloud to Nextcloud. Nextcloud is a fork of ownCloud which is quickly gaining in popularity and many ownCloud users are migrating from ownCloud to Nextcloud. The migration process is quick and quite simple. In one of our previous articles we wrote about how to Install Nextcloud on an Ubuntu 16.04 VPS and today we will show you how to migrate from ownCloud to Nextcloud. The transfer from ownCloud to Nextcloud should be seamless, as the user interface and features of both apps are quite similar. Migrating from ownCloud to Nextcloud is not so complicated task, just follow this tutorial bellow and you should have it done in less then 10 minutes.

At the time of writing, the following migration paths are possible:

  • From ownCloud 9.0 to Nextcloud 9
  • From ownCloud 9.0 to Nextcloud 10
  • From ownCloud 9.1 to Nextcloud 10

We will assume that ownCloud is installed in the /var/www/oc directory and that the web server runs as www-data user. You can change the commands below according to your server’s setup.

1. Backup the old ownCloud installation

First, let’s make a copy/backup of the ownCloud directory. It’s always smart to do a backup before doing anything that alters your configuration and data.

[user]$ sudo mv /var/www/oc /var/www/oc-backup

2. Download and extract the latest Nextcloud archive

We will download and extract the latest Nextcloud release from https://nextcloud.com/install/#instructions-server

[user]$ sudo wget https://download.nextcloud.com/server/releases/nextcloud-10.0.0.tar.bz2
[user]$ sudo tar -xjf nextcloud-10.0.0.tar.bz2

At the time of writing this tutorial, the latest version of Nextcloud is 10.0.0, but you can update the commands above according to the current Nextcloud version.

3. Move the Nextcloud files and set the correct permissions and ownership

Next, we need to move all Nextcloud files and directories to the /var/www/oc directory

[user]$ sudo mv nextcloud /var/www/oc

and set the correct permissions and ownership of the files and directories

[user]$ sudo chown www-data: -R /var/www/oc
[user]$ sudo find /var/www/oc -type d -exec chmod 755 {} \;
[user]$ sudo find /var/www/oc -type f -exec chmod 644 {} \;
[user]$ sudo chmod +x /var/www/oc/occ

4. Upgrade

Finally we can trigger the update either via web or via OCC. In this example we’ll use the command line and occ upgrade which is a more reliable method:

[user]$ sudo cd /var/www/oc
[user]$ sudo -u www-data php occ upgrade

That’s it. The migration process from ownCloud to Nextcloud is done. The migration steps may be different for you based on your server environment. If you encounter any problems feel free to comment below.

Of course you don’t have to migrate from ownCloud to Nextcloud, if you use one of our Nextcloud Hosting services, in which case you can simply ask our expert Linux admins to do the ownCloud/Nextcloud migration for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post, on How to migrate from ownCloud to Nextcloud,  please share it with your friends on the social networks using the buttons below or simply leave a reply in the comments. Thanks.

Categories Tutorials
admin :

View Comments (1)

  • Instead of "sudo -u www-data php occ upgrade", I first had to run "sudo -u www-data php occ maintenance:install" and then the upgrade command.
    I also copied my config.php file to my new install.
    For the rest great guide. Thanks a lot.


GDPR Compliance

By using this web site you agree to our privacy policy as shown at https://www.rosehosting.com/priv.html

Privacy Settings

This website uses cookies.