I’m using the latest version, have had good consistent luck with it since the above. I’ve found using the nextcloud docker image is a good approach as you can set the S3 details up and then the set-up process creates the config.php, so less chance of getting the file itself wrong.
Probably worth noting in the below example I’ve been using Wasabi for S3 rather than Amazon… this is what I’ve been using both locally and on my digital ocean droplet (should it help anyone)
version: '2.3'
services:
db:
image: mariadb
restart: always
volumes:
- db:/var/lib/mysql/data
environment:
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_PASSWORD=nextcloud
app:
image: nextcloud
restart: always
ports:
- 80:80
volumes:
- nextcloud:/var/www/html
environment:
- MYSQL_HOST=db
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_PASSWORD=nextcloud
- OBJECTSTORE_S3_HOST=s3.eu-central-1.wasabisys.com
- OBJECTSTORE_S3_BUCKET=nextcloud-test
- OBJECTSTORE_S3_SECRET=XXXXXXXXXX
- OBJECTSTORE_S3_KEY=XXXXXXXXXX
- OBJECTSTORE_S3_REGION=eu-central-1
- OBJECTSTORE_S3_SSL=true
depends_on:
- db
cron:
image: nextcloud
restart: always
volumes:
- nextcloud:/var/www/html
entrypoint: /cron.sh
depends_on:
- db
volumes:
db:
nextcloud:
Just bare in mind if you use in production, you really need to make sure your nextcloud config.php and MySQL database are backed up, as if you lose either of these, your data isn’t very nice to recover.
When it saves in S3 as primary storage, all the meta data is stored in MySQL (filename, etc.) and then it names the files stored in S3 by database ID (it seems) rather than filename.type… so although the files are all there for you. It would be hideous to recover as you can’t tell what is what.