S3 as Primary Storage (code review)

I’m really struggling to get DreamObjects (follows S3 protocol) setup as primary storage. I’ve reviewed the documentation, I’ve read all the similar topics I can find, I’ve tweaked and improved, but no success. It would be really helpful to have some fresh eyes on this. If nothing else, it isn’t clear whether I’m supposed to add the S3 code to the end of the existing config.php script, replace a certain portion of it, etc, so here is the whole thing. I understand from a different post that unused arguments are to be left out rather than nulled, so I have intentionally eliminated the port and region arguments as those are not necessary for connecting to DreamObjects. “XXX” are values that I’ve hidden.

<?php
$CONFIG = array (
  'objectstore' => array (
    'class' => 'OC\\Files\\ObjectStore\\S3',
    'arguments' => array (
      'bucket' => 'bucketname',
      'autocreate' => true,
      'key' => 'XXX',
      'secret' => 'XXX',
      'hostname' => 'objects-us-west-1.dream.io',
      'use_ssl' => true,
      // required for some non amazon s3 implementations
      'use_path_style'=>false
    ),
  ),
);

It would be great that you could add DreamObjects as a separated “Amazon S3” provider, for be easier to the final users to set a connection to a bucket.

The good news are that today i accomplished to create on Files app an “external storage” of type “Amazon S3” but it really connect to a bucket on DreamObjects :slight_smile: It probably will help to you to finish your work. Is quite simple:

  • bucket: my-new-bucket
  • host: objects-us-east-1.dream.io
  • port: 80
  • region: us-east-1
  • Enable SSL: no
  • Enable style path: yes
  • Enable legacy (v2) auth: yes
  • key: DH7FR3**************
  • secret key: ******************************

Maybe you could add a new “type of external storage” template, with almost all fields already populated :wink: or maybe in placeholder attribute. I think that the unique that changes always is 1) bucket, 2) key, 3) secret key. Maybe in the future DreamHost will append new hosts in other regions…

I must to say it: now DreamObjects fees are:

  • storage: $0.025 USD / Gb / month
  • bandwith: $0.050 USD / Gb

In other words: a backup of all my music occupy 20Gb, so just $1USD / month :slight_smile: More info here: Dreamhost Cloud Storage

Cheers!

Oh, i’m sorry, i misinterpreted your question. You were asking about set DreamObjects as your PRIMARY STORAGE unit !! I realize now that i wrote the above comment.

Anyway, i think that maybe with the data i give in my previous comment you shoudl be able to connect at least with DreamObjects bucket.

I don’t know what exactly you wants to store on DreamObjects bucket, but i’ve successfully used that “external storage” in Files app to syncrhonize -for example- a local folder in my desktop computer. So i suppose that you can use that external unit to save almost anything from Nextcloud. Am i wrong?