Default storage location for all users

Hi everyone,

I’ve got my NextCloud instance up and running through Linode with separate object storage attached.

By default, all new users are added to the local storage that is running my NextCloud instance. This is limited on storage space and I want to point all users over to my external object storage that is attached to my NextCloud account.

Is there anyway to do this? Ideally I’d like a new folder to be added for each user in the external object storage that only they (and the admin) can access. i can’t find anything in the documentation that shows how to do this.

Kind regards
DG

hello.

assuming you have your external storage mounted localy say at /storage1

give your webserver access to it

meaning usually (debian/ubuntu) user www-data needs read/write access

copy existing data from current DATA location to /storage1

then set it as your data directory in your config.php

‘datadirectory’ => ‘/storage1’,

https://docs.nextcloud.com/server/latest/admin_manual/search.html?q=data+directory&check_keywords=yes&area=default

if all works and new users are created in /storage1 you can remove old DATA

Hi @Vincent_Stans,

Thanks for the reply. My external storage is within Linode and I need the absolute path to be able to link it to.

Currently I have the url and name for the object storage bucket which I somehow need to add to my config.php. I’ve found the following example but I’m not if this will work here and if it replaces the ‘datadirectory’ entry entirely…

https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/primary_storage.html

‘objectstore’ => [
‘class’ => ‘\OC\Files\ObjectStore\S3’,
‘arguments’ => [
‘bucket’ => ‘nextcloud’,
‘autocreate’ => true,
‘key’ => ‘EJ39ITYZEUH5BGWDRUFY’,
‘secret’ => ‘M5MrXTRjkyMaxXPe2FRXMTfTfbKEnZCu+7uRTVSj’,
‘hostname’ => ‘example.com’,
‘port’ => 1234,
‘use_ssl’ => true,
‘region’ => ‘optional’,
// required for some non Amazon S3 implementations
‘use_path_style’=>true
],
],

Any thoughts on this at all?

DG

https://docs.nextcloud.com/server/stable/admin_manual/configuration_files/primary_storage.html#configuring-object-storage-as-primary-storage