With regard to the use of docker containers to create nextcloud, the backend will not automatically create buckets when using s3 storage

About using the docker container to create nextcloud, when the backend uses s3 storage, the bucket will not be automatically createdI used docker-compose.yml to edit the content and run the docker-compose up - d command, but I found the following problems

root@localhost:~/nextcloud# docker logs -f nextcloudConfiguring Redis as session handlerInitializing nextcloud 32.0.0.13 …New nextcloud instanceInstalling with MySQL database=> Searching for hook scripts (*.sh) to run, located in the folder “/docker-entrypoint-hooks.d/pre-installation”==> Skipped: the “pre-installation” folder is empty (or does not exist)Starting nextcloud installation

In ObjectStoreStorage.php line 546:
Error while writing stream to object store
In WrappedHttpHandler.php line 196:
Error executing “PutObject” on “http://nginx_to_rustfs:9000/nextcloud/urn%3Aoid%3A3”; AWS HTTP error: Client error: PUT http://nginx_to_rustfs:9000/n   extcloud/urn%3Aoid%3A3 resulted in a 404 Not Found response:
<?xml version="1.0" encoding="UTF-8"?><Error><Code>NoSuchBucket</Code><Mess
age>Volume not foundNoSuchBucket (client): Volume not found - NoSuchBucketVolume not found</Error>
In RequestException.php line 111:
Client error: PUT http://nginx_to_rustfs:9000/nextcloud/urn%3Aoid%3A3 resulted in a 404 Not Found response:
<?xml version="1.0" encoding="UTF-8"?><Error><Code>NoSuchBucket</Code><Mess
age>Volume not found
maintenance:install [–database DATABASE] [–database-name DATABASE-NAME] [–database-host DATABASE-HOST] [–database-port DATABASE-PORT] [–database-user DATABASE-USER] [–database-pass [DATABASE-PASS]] [–database-table-space [DATABASE-TABLE-SPACE]] [–disable-admin-user] [–admin-user ADMIN-USER] [–admin-pass ADMIN-PASS] [–admin-email [ADMIN-EMAIL]] [–data-dir DATA-DIR]
Retrying install…

That is to say, if the bucket is not created in advance, this will happen, but I found that it is possible to create a bucket in the
- OBJECTSTORE_S3_AUTOCREATE=true
But it didn’t work

  - OBJECTSTORE_S3_BUCKET=nextcloud
  - OBJECTSTORE_S3_HOST=nginx_to_rustfs
  - OBJECTSTORE_S3_PORT=9000
  - OBJECTSTORE_S3_SSL=false
  - OBJECTSTORE_S3_USEPATH_STYLE=true
  - OBJECTSTORE_S3_KEY=admin
  - OBJECTSTORE_S3_SECRET=admin
  - OBJECTSTORE_S3_AUTOCREATE=true

This is part of my creation of nextcloud environment variables, including the scheme of interfacing with s3 storage.

Flag added by @sam229:

This problem is caused by the s3API port error. Please delete this topic directly.

@sam229 - If you found the root cause of the problem please describe the details e.g. affected versions so other users can benefit from this learning.

Hello administrator, the problem in the discussion has been solved, mainly due to the ineffective configuration file, but I found a new problem.

First, I used rustfs as the back-end storage (s3), and nginx as the balance.

No matter what kind of deployment mode I use, it will cause an exception when I upload files with more than 1-2GB using this architecture (which means that after uploading, I will be prompted that they are 0kb and cannot be downloaded or accessed)

I attach my docker-compose.yml file next. All files (folders) use absolute paths. The corresponding folder needs to be created in advance.

I also gave feedback to the rustfs community, and I also want to give feedback to the nextcloud (that is, this discussion).

Attach install command (incloud docker-compose.yml) and screenshot

the command incloud docker-compose.yml

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.