Configuring Non-Amazon hosted S3 as Primary Storage

I have installed my nextcloud successfully. and resolved all warnings. it’s working fine.

But now I want to add Non-Amazon hosted S3 as Primary Storage. but getting some error .

what can i do?

I try with this , vim /var/www/nextcloud/config/config.php

‘objectstore’ => [
‘class’ => ‘\OC\Files\ObjectStore\S3’,
‘arguments’ => [
‘bucket’ => ‘my-nextcloud-store’,
‘hostname’ => ‘s3.example.com’,
‘key’ => ‘EJ39ITYZEUH5BGWDRUFY’,
‘secret’ => ‘M5MrXTRjkyMaxXPe2FRXMTfTfbKEnZCu+7uRTVSj’,
‘port’ => 8443,
// required for some non-Amazon S3 implementations
‘use_path_style’ => true,
],
],

But not working !

Also Try with GUI


, here is also some error, I attached the screenshot.

please give me the solution.

I can’t tell you the cause when you tried to use it as Primary Storage since you didn’t provide the Nextcloud log output from that. But when you tried to use it as External Storage, the cause looks to be a slash / at the end of your endpoint name which created a weird URL that you likely don’t have permissions for.

Endpoint should just be a hostname (the 2nd field in the GUI).

Also, your Primary Storage config looks to be a copy of the example from the docs. I assume your real config has actual port, etc parameters from your S3 provider/platform, correct? That 8443 is just an example!

2 Likes

Hi @jtr

I did it through CLI . Yes, you are right. My port is 443! It works Fantastically.

Thanks

1 Like