Changing Data Directory

Hello, I’m new to NextCloud and just getting started, so please go easy on me :slight_smile:

I have a new fresh install of NextCloud 11.0.2 Stable on Ubuntu a 16.04 LTS Server setup and when following the main instructions placed the data direction into /var/www/nextcloud/data.

But I keep all of my data in a separate Unraid server.

So, I first edited fstab and mapped my unraid shares. This works fine and I can navigate to them without issue. These are located at /mnt/unraid and I want the nextcloud data directory to /mnt/unraid/Media (which does exist)

In reading here and the web and I changed the data directory in nextcloud/config/config.php to be

And then I added an .ocdata file via

But after a restart of Apache2 as well as restart, when I log into nextcloud it is showing the new data directory location.

There’s a little bit of reading for you. In short moving the data directory is not supported and if the install is indeed brand new, you’d be better reinstalling it and picking the correct directory rather than potentially suffering the consequences of moving it.

I dear hope you are doing well ! I had being lot of work on this , I this is clear that if you want to change the directory you may do it’s on the initial setup page , once it’s setup you have to go with lots of pain to migrate to new location ,
Second my target was , i had to attach my WD nas device 8 TB , first I was attaching its with CFS or NFS still again stuck on the permission issue after all the pain finally got a point I have added iscsi target to my os and after the adding things work perfectly fine , in my case my nas had a built-in open iscsi server so this helped me