# Migrating from ownCloud to Nextcloud

**URL:** <https://help.nextcloud.com/t/migrating-from-owncloud-to-nextcloud/551>\
**Category:** 📑 How to\
**Tags:** owncloud, oc\_migration\_issue\
**Created:** [June 14, 2016, 12:27pm UTC](https://help.nextcloud.com/t/migrating-from-owncloud-to-nextcloud/551 "2016-06-14T12:27:39Z")\
**Posts on this page:** 20\
**Page:** 4

<div class="post-metadata">

**Author:** ![jknockaert](https://help.nextcloud.com/letter_avatar/jknockaert/32/6_22734026db12803ebb3e059622ac3534.png) [@jknockaert](https://help.nextcloud.com/u/jknockaert)\
**Post date:** [August 1, 2016, 6:36pm UTC](https://help.nextcloud.com/t/migrating-from-owncloud-to-nextcloud/551/63 "2016-08-01T18:36:12Z")

</div>

Apart from the fact that I don’t yet see a sustainable transition path from ownCloud to Nextcloud I also still couldn’t find a compelling reason to do so (within the context of my use case for ownCloud). Honestly, I fail to understand what Nextcloud is about.

---

<div class="post-metadata">

**Author:** ![Bugsbane](https://help.nextcloud.com/user_avatar/help.nextcloud.com/bugsbane/32/172_2.png) [@Bugsbane](https://help.nextcloud.com/u/Bugsbane)\
**Post date:** [August 6, 2016, 4:34am UTC](https://help.nextcloud.com/t/migrating-from-owncloud-to-nextcloud/551/64 "2016-08-06T04:34:26Z")

</div>

> [@jknockaert](#):
>
> I fail to understand what Nextcloud is about.

Improving development, and making a product that works in a more transparent and open-source friendly manner, if I had to summarise (note: I don’t work for Nextcloud).

The codebases started the same, so yes, you won’t see huge differences yet, but expect these to grow over time.

---

<div class="post-metadata">

**Author:** ![rpedrica](https://help.nextcloud.com/letter_avatar/rpedrica/32/6_22734026db12803ebb3e059622ac3534.png) [@rpedrica](https://help.nextcloud.com/u/rpedrica)\
**Post date:** [August 13, 2016, 9:53am UTC](https://help.nextcloud.com/t/migrating-from-owncloud-to-nextcloud/551/65 "2016-08-13T09:53:11Z")

</div>

Most of the info on migrating here relates to oc9.0.2 to nc9.0.50. Is this the only path supported or could you go from oc9.0.4 to nc9.0.53 ( the current versions )? Can I keep my calendar and contacts folders from the oc installation or do I need to reinstall them after? If reinstall, do I get them from [apps.owncloud.org](http://apps.owncloud.org) or just enable them from within nextcloud?

---

<div class="post-metadata">

**Author:** ![tflidd](https://help.nextcloud.com/letter_avatar/tflidd/32/6_22734026db12803ebb3e059622ac3534.png) [@tflidd](https://help.nextcloud.com/u/tflidd)\
**Post date:** [August 13, 2016, 10:18am UTC](https://help.nextcloud.com/t/migrating-from-owncloud-to-nextcloud/551/66 "2016-08-13T10:18:43Z")

</div>

> [@rpedrica](#):
>
> oc9.0.2 to nc9.0.50. Is this the only path supported or could you go from oc9.0.4 to nc9.0.53 ( the current versions )?

Yes, the migration from oc9.0.4 to nc9.0.53 will be exactly the same. You should be able to install apps from the web-interface as you were used to it on ownCloud (currently, it will get the apps from [apps.owncloud.com](http://apps.owncloud.com)). Your calendar should be fully compatible. However, it is always recommended to make a full backup.

---

<div class="post-metadata">

**Author:** ![Mack\_Baise](https://help.nextcloud.com/user_avatar/help.nextcloud.com/mack_baise/32/30987_2.png) [@Mack\_Baise](https://help.nextcloud.com/u/Mack_Baise)\
**Post date:** [August 15, 2016, 7:05am UTC](https://help.nextcloud.com/t/migrating-from-owncloud-to-nextcloud/551/67 "2016-08-15T07:05:53Z")

</div>

Hey everyone,

The support was a little vague on the Nextcloud site.

Here are some more specific directions:

😄

1. First you want to make a copy/backup of your Owncloud folder.

sudo cp -r /var/www/owncloud /var/www/owncloud.old

1. Then remove everything inside your owncloud folder.

sudo rm -rf /var/www/owncloud/\*  
sudo rm -rf /var/www/owncloud/.\*

1. The reason we made a backup of the Owncloud folder was to make sure we still  
have the config and data, so cp that in to the owncloud folder again

sudo cp -r /var/www/owncloud.old/config /var/www/owncloud/  
sudo cp -r /var/www/owncloud.old/data /var/www/owncloud/  
sudo cp /var/www/owncloud.old/.htaccess /var/www/owncloud/  
sudo cp /var/www/owncloud.old/.user.ini /var/www/owncloud/

1. Install Nextcloud

We are going to download nextcloud, make sure you get the latest release

cd /temp  
wget [https://download.nextcloud.com/server/releases/nextcloud-9.0.50.tar.bz2](https://download.nextcloud.com/server/releases/nextcloud-9.0.50.tar.bz2)

1. Extract the tar ball and move it to Apache’s web root.

tar -vxjf nextcloud-9.0.50.tar.bz2  
cd nextcloud  
mv \* /var/www/owncloud/

1. Change the permissions while in the owncloud directory(it now has newcloud files inside of it):

wwwrun:www \* -R or chown www-data

1. The last thing we will need to do is the upgrade to Nextcloud.

cd /var/www/owncloud  
sudo -u www-data php occ upgrade

And that should be it! open up your browser and enter your IP/FQDN to confirm it works!

I did copy most of this information from:  
[https://techknight.eu/2016/06/15/migrate-owncloud-nextcloud-linux/](https://techknight.eu/2016/06/15/migrate-owncloud-nextcloud-linux/)

> **[Migrating to Nextcloud 9](https://blog.jospoortvliet.com/2016/06/migrating-to-nextcloud-9.html)**
>
> A blog about Community Management, Open Source and Linux.

and

> [@ownCloud 9.0.2 Stable to NextCloud](https://help.nextcloud.com/t/owncloud-9-0-2-stable-to-nextcloud/1279):
>
> Hi All - Running ownCloud 9.0.2 and would like to migrate to NextCloud. I am using Server Side Encryption. Can anyone provide details on how to migrate? This is on Ubuntu 14.04.4 LTS btw. Thanks, Jon

They were good posts, but missing some commands. Hopefully this helps!

Cheers,

Mack

---

<div class="post-metadata">

**Author:** ![notaduck](https://help.nextcloud.com/user_avatar/help.nextcloud.com/notaduck/32/518_2.png) [@notaduck](https://help.nextcloud.com/u/notaduck)\
**Post date:** [August 16, 2016, 8:12am UTC](https://help.nextcloud.com/t/migrating-from-owncloud-to-nextcloud/551/68 "2016-08-16T08:12:45Z")

</div>

Can I as which commands are missing in the post from techknight ? (author here)  
I have done it that way without any issue 😉

---

<div class="post-metadata">

**Author:** ![Mack\_Baise](https://help.nextcloud.com/user_avatar/help.nextcloud.com/mack_baise/32/30987_2.png) [@Mack\_Baise](https://help.nextcloud.com/u/Mack_Baise)\
**Post date:** [August 17, 2016, 2:22am UTC](https://help.nextcloud.com/t/migrating-from-owncloud-to-nextcloud/551/69 "2016-08-17T02:22:49Z")

</div>

Yes, unless I am mistaken, you have to change the permissions for the nextcloud files after  
they are copied to the owncloud folder. Anyways, your work was the best I found, it helped my migration immensly. Thank you so much.

🙂

---

<div class="post-metadata">

**Author:** ![notaduck](https://help.nextcloud.com/user_avatar/help.nextcloud.com/notaduck/32/518_2.png) [@notaduck](https://help.nextcloud.com/u/notaduck)\
**Post date:** [August 17, 2016, 12:36pm UTC](https://help.nextcloud.com/t/migrating-from-owncloud-to-nextcloud/551/70 "2016-08-17T12:36:27Z")

</div>

Thanks for the reply and you are one hundred procent right 😃  
the article have been edited by now

---

<div class="post-metadata">

**Author:** ![Tum](https://help.nextcloud.com/letter_avatar/tum/32/6_22734026db12803ebb3e059622ac3534.png) [@Tum](https://help.nextcloud.com/u/Tum)\
**Post date:** [August 24, 2016, 9:33am UTC](https://help.nextcloud.com/t/migrating-from-owncloud-to-nextcloud/551/71 "2016-08-24T09:33:57Z")

</div>

I got error from migrating, says “Directory is unavailable…”.  
Is it because that I’m migrating from ownCloud 9.1.x to Nextcloud 9.0.53?  
I’m running nextcloud on CentOS 7.

---

<div class="post-metadata">

**Author:** ![nickvergessen](https://help.nextcloud.com/user_avatar/help.nextcloud.com/nickvergessen/32/66965_2.png) [@nickvergessen](https://help.nextcloud.com/u/nickvergessen)\
**Post date:** [August 24, 2016, 9:43am UTC](https://help.nextcloud.com/t/migrating-from-owncloud-to-nextcloud/551/72 "2016-08-24T09:43:29Z")

</div>

> [@Tum](#):
>
> Is it because that I’m migrating from ownCloud 9.1.x to Nextcloud 9.0.53?

> [@Migrating from Owncloud 9.1 to Nextcloud](https://help.nextcloud.com/t/migrating-from-owncloud-9-1-to-nextcloud/1816/5):
>
> Possible migrations paths: ownCloud 9.0 =\> Nextcloud 9 white_check_mark ownCloud 9.0 =\> Nextcloud 10 white_check_mark ownCloud 9.1 =\> Nextcloud 10 white_check_mark ownCloud 10.0.0 =\> Nextcloud 12.0.0 white_check_mark ownCloud 10.0.1 =\> Nextcloud 12.0.1 white_check_mark ownCloud 9.1 =\> Nextcloud 9 x ownCloud 10.0.1 =\> Nextcloud 12.0.0 x

---

<div class="post-metadata">

**Author:** ![Tum](https://help.nextcloud.com/letter_avatar/tum/32/6_22734026db12803ebb3e059622ac3534.png) [@Tum](https://help.nextcloud.com/u/Tum)\
**Post date:** [August 25, 2016, 9:46am UTC](https://help.nextcloud.com/t/migrating-from-owncloud-to-nextcloud/551/73 "2016-08-25T09:46:51Z")

</div>

Ok, so I did try migrate from ownCloud 8.2.7 -\> Nextcloud 9.0.53

I still got the same issue which is directory is not showing.

I get many errors similar to this: fopen(/var/www/html/nextcloud/data/admin/thumbnails/27/150-150.png): failed to open stream: No such file or directory at /var/www/html/nextcloud/lib/private/files/storage/local.php#261

Both files 150-150.png, and local.php exist in those directory.  
How do I fix this?

---

<div class="post-metadata">

**Author:** ![anon65833978](https://help.nextcloud.com/letter_avatar/anon65833978/32/6_22734026db12803ebb3e059622ac3534.png) [@anon65833978](https://help.nextcloud.com/u/anon65833978)\
**Post date:** [September 5, 2016, 7:38pm UTC](https://help.nextcloud.com/t/migrating-from-owncloud-to-nextcloud/551/74 "2016-09-05T19:38:07Z")

</div>

Is this also possible with updating to Nextcloud 10 (from owncloud 9)? And is there this mentioned automatic process available?

---

<div class="post-metadata">

**Author:** ![tflidd](https://help.nextcloud.com/letter_avatar/tflidd/32/6_22734026db12803ebb3e059622ac3534.png) [@tflidd](https://help.nextcloud.com/u/tflidd)\
**Post date:** [September 6, 2016, 9:04am UTC](https://help.nextcloud.com/t/migrating-from-owncloud-to-nextcloud/551/75 "2016-09-06T09:04:07Z")

</div>

> [@anon65833978](#):
>
> Is this also possible with updating to Nextcloud 10 (from owncloud 9)? And is there this mentioned automatic process available?

The updater app is not ready yet. I would go OC 9.0-\>NC 9.0.53 → NC 10. OC 9.0-\>NC 10 could be possible, if not, it should show you an error that you cannot skip major versions.

---

<div class="post-metadata">

**Author:** ![Ed\_Clay](https://help.nextcloud.com/letter_avatar/ed_clay/32/6_22734026db12803ebb3e059622ac3534.png) [@Ed\_Clay](https://help.nextcloud.com/u/Ed_Clay)\
**Post date:** [September 14, 2016, 10:01pm UTC](https://help.nextcloud.com/t/migrating-from-owncloud-to-nextcloud/551/76 "2016-09-14T22:01:01Z")

</div>

Am I good to use this method to upgrade from OC 9.1.0-1.1 to NC 10?

---

<div class="post-metadata">

**Author:** ![Jason\_Hunter](https://help.nextcloud.com/user_avatar/help.nextcloud.com/jason_hunter/32/14266_2.png) [@Jason\_Hunter](https://help.nextcloud.com/u/Jason_Hunter)\
**Post date:** [September 17, 2016, 12:02am UTC](https://help.nextcloud.com/t/migrating-from-owncloud-to-nextcloud/551/77 "2016-09-17T00:02:34Z")

</div>

Can we also have some function to mirror an account on an owncloud system? I have a hosted owncloud and I don’t have access to the raw data, just the user credentials. It seems like a big job to get that data into nextcloud and I even have over 20 accounts.

---

<div class="post-metadata">

**Author:** ![tflidd](https://help.nextcloud.com/letter_avatar/tflidd/32/6_22734026db12803ebb3e059622ac3534.png) [@tflidd](https://help.nextcloud.com/u/tflidd)\
**Post date:** [September 17, 2016, 7:57am UTC](https://help.nextcloud.com/t/migrating-from-owncloud-to-nextcloud/551/78 "2016-09-17T07:57:40Z")

</div>

> [@Jason\_Hunter](#):
>
> Can we also have some function to mirror an account on an owncloud system? I have a hosted owncloud and I don’t have access to the raw data, just the user credentials. It seems like a big job to get that data into nextcloud and I even have over 20 accounts.

No you can’t just mirror or migrate an account. On the new system, you can use the federated cloud sharing to include the owncloud folder into your nextcloud account. The files stay in the owncloud account, but you can then copy the files to your local Nextcloud folder (either via webinterface or via webdav).

---

<div class="post-metadata">

**Author:** ![A.ccc.A](https://help.nextcloud.com/user_avatar/help.nextcloud.com/a.ccc.a/32/1164_2.png) [@A.ccc.A](https://help.nextcloud.com/u/A.ccc.A)\
**Post date:** [September 20, 2016, 11:22am UTC](https://help.nextcloud.com/t/migrating-from-owncloud-to-nextcloud/551/79 "2016-09-20T11:22:19Z")

</div>

Thank you for the detailed upgrade instructions. Unfortunately I managed to destroy my server by running the [set-nextcloud-permissions.sh](http://set-nextcloud-permissions.sh) script.

I set the ocpath and ocdata variables matching my system, but somehow the “find” commands still changed the permissions of all files and directories in my system. When the script was done running I had an unusable system and I could not log back into the server. Sad. I’m now restoring the backup from 4 days ago.

---

<div class="post-metadata">

**Author:** ![Schnello](https://help.nextcloud.com/user_avatar/help.nextcloud.com/schnello/32/14954_2.png) [@Schnello](https://help.nextcloud.com/u/Schnello)\
**Post date:** [September 20, 2016, 1:00pm UTC](https://help.nextcloud.com/t/migrating-from-owncloud-to-nextcloud/551/80 "2016-09-20T13:00:33Z")

</div>

The script at this page?  
[https://docs.nextcloud.com/server/9/admin\_manual/installation/installation\_wizard.html](https://docs.nextcloud.com/server/9/admin_manual/installation/installation_wizard.html)

---

<div class="post-metadata">

**Author:** ![A.ccc.A](https://help.nextcloud.com/user_avatar/help.nextcloud.com/a.ccc.a/32/1164_2.png) [@A.ccc.A](https://help.nextcloud.com/u/A.ccc.A)\
**Post date:** [September 20, 2016, 1:21pm UTC](https://help.nextcloud.com/t/migrating-from-owncloud-to-nextcloud/551/81 "2016-09-20T13:21:30Z")

</div>

The script that was shared above by mvance, which is based on the one you linked. I don’t know how it happened, as the script looks ok. Unfortunately since I lost access to the server I can’t see the content of the script. But the symptoms were those: I did not have permission to ‘ls’, nor to stop or start apache, and when I tried logging out and in again, my access was refused. I log in as non-root with my public key.

Anyway, I just lost an hour and maybe a few e-mails, no much harm caused.

---

<div class="post-metadata">

**Author:** ![Schnello](https://help.nextcloud.com/user_avatar/help.nextcloud.com/schnello/32/14954_2.png) [@Schnello](https://help.nextcloud.com/u/Schnello)\
**Post date:** [September 20, 2016, 2:24pm UTC](https://help.nextcloud.com/t/migrating-from-owncloud-to-nextcloud/551/82 "2016-09-20T14:24:53Z")

</div>

The script from @mvance works but it is dangerous. One typo at the variables … and the system is broken.  
The script at the [doc.nextcloud.com](http://doc.nextcloud.com) is wrong regarding the missing “/” behind the variable

find ${ncpath} **/** -type f -print0 | xargs -0 chmod 0640

[Previous page](https://help.nextcloud.com/t/migrating-from-owncloud-to-nextcloud/551.md?page=3)

[Next page](https://help.nextcloud.com/t/migrating-from-owncloud-to-nextcloud/551.md?page=5)
