Hello,
I am new to nextcloud and I am working to perform a clean, secured, install on a amazon EC2 server from docker and docker-compose, with an amazon S3 bucket as primary external storage.
Yesterday I managed to install Nextcloud from docker-compose without external storage nor ssl encryption. I could use it normally.
Today, I tried a new install with a primary external storage. I :
- cleaned the docker volumes
- run sudo docker-compose up db to create the database
- run sudo docker-compose up to install nextcloud
- updated the config.php file generated during the nextcloud install with the info regarding the s3 bucket
- relaunched docker-compose up
- accessed nextcloud
- logged in
- received an Internal Server Error
Please find below my docker-compose.yml file
version: ‘3’
services:
nextcloud:
image: nextcloud
container_name: nextcloud
ports:
- 80:80
- 443:443
links:
- db
volumes:
- ./apps:/var/www/html/apps
- ./config:/var/www/html/config
- ./storage:/var/www/html/data
restart: always
db:
image: mariadb
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
container_name: db
volumes:
- ./db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=******
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_PASSWORD=******
restart: always
And my config.php file after adding the external primary storage :
<?php
$CONFIG = array (
'passwordsalt' => 'F0NH9SobnkK/NlzcrYVfK7min1IkYP',
'secret' => 'QGhxRlXGneEBKcTXcrHCGKGLnNCdcmmdknWf3O/3LFd5iJAC',
'trusted_domains' =>
array (
0 => 'localhost',
1 => '****',
2 => '****',
),
'datadirectory' => '/var/www/html/data',
'dbtype' => 'mysql',
'version' => '15.0.2.0',
'overwrite.cli.url' => 'http://localhost',
'dbname' => 'nextcloud',
'dbhost' => 'db',
'dbport' => '',
'dbtableprefix' => '',
'mysql.utf8mb4' => true,
'dbuser' => 'nextcloud',
'dbpassword' => '****',
'installed' => true,
'objectstore' =>
array (
'class' => 'OC\\Files\\ObjectStore\\S3',
'arguments' =>
array (
'bucket' => 'nextclouds3storage',
'autocreate' => true,
'key' => '****',
'secret' => '****',
'use_ssl' => true,
'region' => 'eu-west-3',
),
),
'instanceid' => 'oc5pvrh3m5r2',
);
Am I missing something ?
Does setting AWS S3 as a primary external storage requires ssl encryption, if so why ? (as the communication between ec2 and s3 should already be encrypted) Is there some incompatibility between setting AWS S3 as external storage and docker ?
EDIT: For information, the S3 bucket is correctly created.