Skip to content

Using AWS S3 as Primary Storage on Nextcloud

I have been testing/using Nextcloud for the last couple of months in hopes of getting rid of Dropbox, Google Drive, etc. I recently experimented with having external storage connected to it. That’s all fine and dandy, but then I wondered if an external storage could be used as the primary storage? A little searching revealed I wasn’t the first person to think of that. In fact it is supported by Nextcloud and is documented. To get started create a bucket with the desired settings and create an IAM user that has access.

The official Nextcloud documentation gives this example:

‘objectstore’ => array(
‘class’ => ‘OC\\Files\\ObjectStore\\S3’,
‘arguments’ => array(
‘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
),
),


Based on my experience using AWS S3 as an external storage device, I ended up with this as my config:

‘objectstore’ => array(
‘class’ => ‘OC\\Files\\ObjectStore\\S3’,
‘arguments’ => array(
‘bucket’ => ‘’,
‘key’ => ‘’,
‘secret’ => ‘’,
‘use_ssl’ => true,
‘region’ => ‘,
// required for some non amazon s3 implementations
‘use_path_style’=>true
),
),


Specifically, I found it necessary to specify the region (i.e. us-west-2) and SSL otherwise I got errors.

I have been running this for a few days now and have not seen any issues.

Trackbacks

No Trackbacks

Comments

Display comments as Linear | Threaded

No comments

Add Comment

Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
Standard emoticons like :-) and ;-) are converted to images.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

Form options