Skip to content

OBJECTSTORE_S3_SSL does not work as documented #2308

@vbrandl

Description

@vbrandl

The documentation for OBJECTSTORE_S3_SSL states that it defaults to true:

(default: true): Whether or not SSL/TLS should be used to communicate with object storage server

I would assume, not setting OBJECTSTORE_S3_SSL at all would cause Nextcloud to connect to my S3 bucket via HTTPS.

I use the following compose.yml for testing.

services:
  nextcloud:
    image: nextcloud
    volumes:
      - ./data/nextcloud:/var/www/html
    environment:
      - SQLITE_DATABASE=/tmp/nc.db
      - NEXTCLOUD_ADMIN_USER=admin
      - NEXTCLOUD_ADMIN_PASSWORD=this-is-not-a-password
      - NEXTCLOUD_TRUSTED_DOMAINS=example.com

      - OBJECTSTORE_S3_BUCKET=${OBJECTSTORE_S3_BUCKET}
      - OBJECTSTORE_S3_HOST=${OBJECTSTORE_S3_HOST}
      - OBJECTSTORE_S3_PORT=${OBJECTSTORE_S3_PORT}
      - OBJECTSTORE_S3_KEY=${OBJECTSTORE_S3_KEY}
      - OBJECTSTORE_S3_SECRET=${OBJECTSTORE_S3_SECRET}
        #- OBJECTSTORE_S3_SSL=true

If i start a new instance like this, I get the following config.php:

objectstore' =>
  array (
    'class' => '\\OC\\Files\\ObjectStore\\S3',
    'arguments' =>
    array (
      'bucket' => '<snip>',
      'region' => '',
      'hostname' => '<snip>',
      'port' => '443',
      'storageClass' => '',
      'objectPrefix' => 'urn:oid:',
      'autocreate' => false,
      'use_ssl' => false,
      'use_path_style' => false,
      'legacy_auth' => false,
      'key' => '<snip>',
      'secret' => '<snip>',
    ),
  ),

use_ssl is set to false but I would expect it to be true.

Now I delete ./data/nextcloud, uncomment - OBJECTSTORE_S3_SSL=true in compose.yml and start the compose project again and use_ssl in config.php will be set to true.

So the documentation does not match how the image actually behaves.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions