Setting up S3 Object Storage as primary storage, but confused by documentation

How is the implementation of S3 as primary storage handled? Still according to the Docs at Configuring Object Storage as Primary Storage — Nextcloud latest Administration Manual latest documentation or will there be an option to choose whether to go local or with S3 at the initial installation?

So far, placing the code shown in the Docs in an empty config.php works well but will it remain to be configured this way? Little information on this has been published yet.

Best regards,

Oliver

What works for me is:

  1. create a folder ‘config’ in your target folder
  2. create file ‘storage.config.php’ in that folder
  3. put this in that file:
<?php
$CONFIG = array (
  'objectstore' => array(
          'class' => 'OC\\Files\\ObjectStore\\S3',
          'arguments' => array(
                  'bucket' => '[your bucket name]',
                  'autocreate' => true,
                  'key'    => '[your key]',
                  'secret' => '[your secret]',
                  'hostname' => '[target host]',
                  'port' => 443,
                  'use_ssl' => true,
                  'region' => '[your region]',
                  'use_path_style'=>false
  // required for some non Amazon S3 implementations
  //                'use_path_style'=>true
          ),
  ),
);
  1. do your installation
  2. it’s probably a good idea to remove storage.config.php, as the data is included in your config.php
1 Like

Thanks for the input - I managed to get it working for me by directly putting the specific code into the config.php so everything worked from the scratch from an initial installation on.

I remembered that the “storage.inc.php” was the way in the past but good to know it still works in v25, too.

Last time I did this was with version 23 or 24, but I expect this still works in version 25.

When not, well, then indeed use the name ‘config.php’