Nextcloud, how to change data directory?

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
crik91
Posts: 48
Joined: Mon Mar 20, 2017 7:51 am

Nextcloud, how to change data directory?

Post by crik91 »

Hi, I have Nextcloud on my Raspberry Pi 3. It runs fine but I need to change the data directory because I need to use a folder inside an external HDD.

I tried different ways with no succes, what can I do?

Thank you.
User avatar
Fourdee
Site Admin
Posts: 2782
Joined: Tue Feb 06, 2007 1:36 pm

Re: Nextcloud, how to change data directory?

Post by Fourdee »

Hi,

We recommend changing DietPi user data locationt:
http://dietpi.com/phpbb/viewtopic.php?f=8&t=478#p2087
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
crik91
Posts: 48
Joined: Mon Mar 20, 2017 7:51 am

Re: Nextcloud, how to change data directory?

Post by crik91 »

I don't want to change my DietPi user data folder, I prefer to let it as default. Is it possible to change the next cloud folder?
User avatar
Fourdee
Site Admin
Posts: 2782
Joined: Tue Feb 06, 2007 1:36 pm

Re: Nextcloud, how to change data directory?

Post by Fourdee »

crik91 wrote:I don't want to change my DietPi user data folder, I prefer to let it as default. Is it possible to change the next cloud folder?
https://help.nextcloud.com/t/is-there-a ... oot/3642/2

config should be in:

Code: Select all

/var/www/nextcloud/
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
crik91
Posts: 48
Joined: Mon Mar 20, 2017 7:51 am

Re: Nextcloud, how to change data directory?

Post by crik91 »

Hi, yes. Tried all that things!
I tried to change the path of the data directory. I moved all /mnt/dietpi_userdata/nextcloud_data files to /mnt/myexternaldrive/nextcloud, then done

Code: Select all

chown -R www-data:www-data /mnt/myexternaldrive/nextcloud
and changed settings in config.php and in oc_storage in the database.

I still get Data directory (/mnt/myexternaldrive/nextcloud) is invalid. Please check that the data directory contains a file ".ocdata" in its root.

I can't find any nextcloud.conf. What may I do?

Thank you
Morvar

Re: Nextcloud, how to change data directory?

Post by Morvar »

Bump.

I'd also like to see clear instruction for how to change the data directory to be within Nextcloud.

How does one for example edit oc_storage and where it might even be located? Everything's well hidden for a linux newbie like me.
User avatar
WarHawk
Posts: 635
Joined: Thu Jul 20, 2017 8:55 am

Re: Nextcloud, how to change data directory?

Post by WarHawk »

Fourdee wrote:Hi,

We recommend changing DietPi user data locationt:
http://dietpi.com/phpbb/viewtopic.php?f=8&t=478#p2087
I used this method...mounted an external 1TB harddrive, moved all user data, it's now all on the external harddrive

THANKS!!!!
User avatar
WarHawk
Posts: 635
Joined: Thu Jul 20, 2017 8:55 am

Re: Nextcloud, how to change data directory?

Post by WarHawk »

Just ran the web updater too

Worked like a champ!
przemko
Posts: 101
Joined: Sun Mar 15, 2020 5:40 pm

Re: Nextcloud, how to change data directory?

Post by przemko »

Fourdee wrote: Sun May 07, 2017 11:28 am Hi,

We recommend changing DietPi user data locationt:
http://dietpi.com/phpbb/viewtopic.php?f=8&t=478#p2087
Hi, I use that method to move my data but when I open nextcloud and users tab I see that my data is in `/mnt/dietpi_userdata/nextcloud_data/`. I have also my data in `/mnt/Toshiba/dietpi_userdata/nextcloud_data/`
User avatar
Joulinar
Posts: 2638
Joined: Sat Nov 16, 2019 12:49 am

Re: Nextcloud, how to change data directory?

Post by Joulinar »

pls can you past output of

Code: Select all

ls -la /mnt/
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply