Nextcloud 16 failed to add primary storage as digital ocean spaces


I got a problem. I can not set digital ocean spaces as nextcloud 16 primary storage. I don’t want to use it as external storage. When I follow nextcloud instructions, I have modified config.php file, and then after change it I can see this error on my all nextcloud 16 web pages

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the web server log.

Then I have checked the error log on nextcloud 16 error login showing this error.

[03-Jul-2019 11:55:52 UTC] PHP Parse error:  syntax error, unexpected ',' in /home/xxxxxx/public_html/dash/config/config.php on line 27

This is config.php file sample contents.

$CONFIG = array (
  'instanceid' => 
  'passwordsalt' => 
  'secret' => 
  'trusted_domains' => 
  array (
    0 => 'xxxxxxxxxxxx',
    1 => '',
    2 => '',
    3 => '',

  'datadirectory' => '/home/xxxxxx/nextdata',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => 'https://xxxxxxxx',
  'dbname' => 'xxxxxx',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'xxxxxxxxxx',
  'dbpassword' => 'xxxxxxx',
  'installed' => true,


  'objectstore' => array(
        'class' => '\\OC\\Files\\ObjectStore\\S3',
        'arguments' => array(
                'bucket' => 'xxxxxxx',
                'key'    => 'xxxxxxxxxx',
                'secret' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
                'hostname' => '',
                'port' => 443,
                'use_ssl' => true,
                'region' => 'fra1',
                // required for some non Amazon S3 implementations


I’m exhausted about seeking solutions from other web sites and videos. I’m looking for some expert help about the issue


did you “migrate” your users data?

if you just added 'objectstore' => array to the config.php the “home directory” of all users is still here 'datadirectory' => '/home/xxxxxx/nextdata' but not accessible any more.

i don’t know if there is a more elegant way but i delete all users, change to objectstore and recreate the user. if you do this right after installation it’s easy. if you do this with nextcloud full of data, good luck.

1 Like

Thanks for the reply. Let me follow the instructions and i’ll update later :slight_smile:

if you are looking for an easy way to setup a test machine. since you are using digital ocean look at the folder cloud-stuff. not sure if it works on digital ocean. just give it a try.

i didn’t integrate automatic setup of object store as primary storage due to the fact that i have to delete the admin user afterwards.

1 Like