S3 Primary storage and installation check

Here’s the code that worked for me.

  //S3 as internal storage
  'objectstore' => array(
        'class' => 'OC\\Files\\ObjectStore\\S3',
        'arguments' => array(
                'bucket' => 'bucket-name',       //add your bucket name here
                'key'    => 'keygoeshere',       //add S3 bucket user/admin key here
                'secret' => 'secret-goes-here',  //add S3 bucket user/admin secret phrase here
                'use_ssl' => true,
                'use_path_style'=>true,          //Essential to get S3 working
        ),
    ),

Just add the above to your config/config.php file and fill in the appropriate info, and I’m sure you’ll be good to go. This was tested on NextCloud v12.0.0.29, Ubuntu server 16.04, nginx, php-7 with SSL certs from Let’s Encrypt.

I hope this helps some one. I spent several days to get this working. Some one should edit the official documentation. The optional fields should be removed from the sample code and people should me told to add them if required. Because they are there, I though the fields shouldn’t be removed just filled with empty string. This was a mistake, empty strings will cause the backend to fail.

Vikram

3 Likes