You are not logged in.

#1 2016-10-28 19:08:20

chittu
Member
Registered: 2014-01-26
Posts: 19

[Solved] Nextcloud, change Data folder location

How to change data folder location in nextcloud? I just installed next cloud and it is up and running. At the moment the data folder is located under /usr/share/webapps/nextcloud/data (I need to move this to /mnt/drivex/data) and I don't have any conf folder under /usr/share/webapps/nextcloud

The only conf file I found is; /etc/httpd/conf/extra/nextcloud.conf

Alias /nextcloud "/usr/share/webapps/nextcloud"

<Directory /usr/share/webapps/nextcloud/>
  Options +FollowSymlinks
  AllowOverride All
  Require all granted

 <IfModule mod_dav.c>
  Dav off
 </IfModule>

 SetEnv HOME /usr/share/webapps/nextcloud
 SetEnv HTTP_HOME /usr/share/webapps/nextcloud

</Directory>

any suggestions on "how to change the location of data folder?" thank you

Last edited by chittu (2016-11-05 05:31:29)

Offline

#2 2016-10-28 21:31:42

smirky
Member
From: Bulgaria
Registered: 2013-02-23
Posts: 277
Website

Re: [Solved] Nextcloud, change Data folder location

In /usr/share/webapps/nextcloud/config/config.php

  'datadirectory' => '<your_data_storage_path>'


Personal spot  ::  https://www.smirky.net/  ::  Try not to get lost!

Offline

#3 2016-10-29 06:20:10

chittu
Member
Registered: 2014-01-26
Posts: 19

Re: [Solved] Nextcloud, change Data folder location

smirky wrote:

In /usr/share/webapps/nextcloud/config/config.php

  'datadirectory' => '<your_data_storage_path>'

I got into  "Can't create or write into the data directory /mnt/nextcloud"

Now I tried to setup a fresh nextcloud where I want to choose the location during the installation and still I am having the same problem, I did change the permission as below and have the same error (Can't create or write into the data directory /mnt/nextcloud)

sudo chown -R http:http /mnt/nextcloud
sudo chmod 755 /mnt/nextcloud
drwxr-xr-x 1 http   http  186 Oct  8  2016 next cloud
or
drwxrwxrwx 1 http   http    0 Oct  7 23:06 nextcloud

New installation accepts only the location "/usr/share/webapps/nextcloud/data"

drwxr-x--- 1 http http    64 Oct  7 23:24 data

where is the problem and how do I fix this? thanks

Last edited by chittu (2016-11-05 05:34:10)

Offline

#4 2016-10-29 07:32:37

smirky
Member
From: Bulgaria
Registered: 2013-02-23
Posts: 277
Website

Re: [Solved] Nextcloud, change Data folder location

Honestly, I configured nextcloud, based on owncloud.
As for owncloud itself, I configured it manually, not via the installer it provides, so I can't help you here.


Personal spot  ::  https://www.smirky.net/  ::  Try not to get lost!

Offline

#5 2016-11-05 05:37:52

chittu
Member
Registered: 2014-01-26
Posts: 19

Re: [Solved] Nextcloud, change Data folder location

Found solution from a reddit discussion

sudo mount --bind /mnt/kids /usr/share/webapps/nextcloud/data

Offline

#6 2017-04-08 08:55:48

PeachKisser
Member
Registered: 2017-04-08
Posts: 1

Re: [Solved] Nextcloud, change Data folder location

No need to mess with fstab ,

All you need to do is append the path of your new data directory in the file

/etc/httpd/conf/extra/nextcloud.conf

like so

php_admin_value open_basedir "/srv/http/:/dev/urandom:/tmp/:/usr/share/pear/:/usr/share/webapps/nextcloud/:/etc/webapps/nextcloud:/srv/clouddata"

Last : part is your data directory

Offline

Board footer

Powered by FluxBB