Re doing nextcloud installation, 2 drive locations

hi all,

So, after trying to setup nextcloud, I’m ready to re “deploy” it but now as intended.

I want two locations for my DATA, on 2 different HDD. But I have some questions.

1(sorta): Is it wise to keep this data outside of the WWW folders, right?
How do I give nextcloud privilege to using that folder?
and when I make a new folder on a different partition than nextcloud, how would I set that up & give it permission as well?

2: BUt, also, say I have one user who is gonna put a lot of videos on nextcloud, I’d like that person to sue that one HDD only for next cloud, and not the other HDD where I keep other data as well. Is there a way to do this?

cheers
Victor

Hi @victoroos

Just create a directory somewhere outside of your www folder like this…

mkdir -p /var/nextcloud-data

…and then change the ownership of this folder to the user of the web server. (www-data on Debian based distributions or httpd on RedHat based distributions).

chown -R www-data:www-data /var/nextcloud-data 

You can only add one “main” storage location to your Nextcloud during the initial setup. After you have set that up, you can add the second hard disk via the External Storage App. The second disk will then be displayed as a folder in the user’s file structure. The user must then put the videos to this folder in order to store them on the second hard disk. To prevent the user from filling up the “main” storage, you can set up a storage quota for the corresponding user account.

That does not really make sense. Perhaps if you have two users and one user for the first HDD and one user for the second HDD. The problem is Nextcloud create all users in the same folder. But perhaps after creating the users you can move them to different places and use symlinks.

1 Like

it’s easily possible using devices/filesystems mounted in the target paths (if this makes sense is another question, though)
inside /data there is a subdir for every user where your devices/filesystems could be mounted. the appropriate perms have to be give to the webserver-user.
(NC will “know” nothing about this as long as it works.)

2 Likes