Nextcloud and Digitalocean Spaces

Hey Guys,

I want to install Nextcloud with Digital ocean spaces as Main storage. How can I do that :slight_smile: ?

It’s only the installation of Nextcloud. But not how to connect them to Spaces (Of I am wrong?)

$CONFIG = array (
  'instanceid' => 'oc834w1vpd7s',
  'passwordsalt' => 'Q40tn2fg5ZBZMjEW10VLDK6MP1VINX',
  'secret' => 'm2X51CRMJHj25eNtbm4iCRmvOTWMeqibSaXpewlitve15GYN',
  'trusted_domains' => 
  array (
    0 => '',

  'dbtype' => 'sqlite3',
  'version' => '',
  'installed' => true,
'objectstore' => array(
        'class' => 'OC\\Files\\ObjectStore\\S3',
        'arguments' => array(
                'bucket' => 'flexcloud',
                'autocreate' => true,
                'key'    => 'IR6RxMZJDGYO',
                'secret' => 'rYWxxxVUM+UnPKw',
                'hostname' => '',
                'use_ssl' => true,
                'region' => 'ams3',
                // required for some non amazon s3 implementations
                // 'use_path_style'=>true

I got an internal error

Did you see this post:

They refer to a topic on github:

if you have the same issue, we could either ask to reopen the topic or create a new one.

Actually, you can use DigitalOcean spaces by mounting it to filesystem with s3fs

I have this setup, but have been unable to download files from Space through Nextcloud. I can browse files though.

Spaces works well with other integrations like RAI drive which I’m now using. I suspect the S3 integration in Nextcloud is not 100%. The logs don’t give any clues. UI just says: Service Unavailable after trying to download a file.

Please let me know if you manage to download files through Nextcloud successfully and what setting you used to achieve that.

Finally fixed my issue with Digital Ocean Spaces on nextcloud which proved to be related to the (wrong) root certificate path for PHP on Ubuntu.

When you have the error below in your Nextcloud log you are likely facing the same problem:

OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed at /var/www/nextcloud/lib/private/Files/ObjectStore/S3ObjectTrait.php

Than it is likely that your php certificate store settings are pointing to an empty folder or the wrong folder. Try the following command to find out:

php -r “print_r(openssl_get_cert_locations());”

That would return something like this:

[default_cert_file] => /usr/local/ssl/cert.pem
[default_cert_file_env] => SSL_CERT_FILE
[default_cert_dir] => /usr/local/ssl/certs
[default_cert_dir_env] => SSL_CERT_DIR
[default_private_dir] => /usr/local/ssl/private
[default_default_cert_area] => /usr/local/ssl
[ini_cafile] =>
[ini_capath] =>

It is likely that if you go to the folder for the [default_cert_file] e.g. /usr/local/ssl/certs that this will be empty by default. So PHP can’t validate any certificates.

From here on you can either change the PHP settings (in config) so they are pointing to a folder with the root certificates e.g. /etc/ssl/certs or copy all the root certs into your PHP path settings (e.g. usr/local/ssl/certs).