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



Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

You have an error in your configuration, remove the ), part before ‘objectstore’ => array(