diff --git a/docs/s3.md b/docs/s3.md new file mode 100644 index 0000000..7ff2db7 --- /dev/null +++ b/docs/s3.md @@ -0,0 +1,39 @@ +## Use AWS S3 (or any other cloud-based S3) + +Generally, you need to collect the following information from the S3 service provider for use in the subsequent steps: + +- Access Key ID +- Secret Access Key +- Endpoint +- Region name (Some service providers do not require this item, such as Storj) +- Bucket name + +There are three files that need to be modified: + +- docker-compose.yml +- .env.override +- docker-generateconfig\etc\filenode.yml + +Steps: + +1. `make down` +2. In [docker-generateconfig\etc\filenode.yml](https://github.com/anyproto/any-sync-dockercompose/blob/main/docker-generateconfig/etc/filenode.yml), replace the endpoint with yours, and comment out or delete "**forcePathStyle**", unless your S3 allows the use of Path Style. + + > [!NOTE] + > compare Path Style & Virtual Hosted Style + > + > For example, if you need to access myobject.txt in mybucket. + > + > Path Style: + > `https://region.example.com/mybucket/myobject.txt` + > + > Virtual Hosted Style: + > `https://mybucket.region.example.com/myobject.txt` + +3. Specify your current AWS S3 **region** in [docker-generateconfig\etc\filenode.yml](https://github.com/anyproto/any-sync-dockercompose/blob/main/docker-generateconfig/etc/filenode.yml#L6). +4. Specify your valid `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY` and `MINIO_BUCKET` (just use the name AWS S3 bucket) in **.env.override** file. +5. Remove or commented out **minio** and **create-bucket** services from [docker-compose.yml](https://github.com/anyproto/any-sync-dockercompose/blob/main/docker-compose.yml#L56). Remove or commented out [dependency](https://github.com/anyproto/any-sync-dockercompose/blob/main/docker-compose.yml#L127) within any-sync-filenode service. +6. If you have already uploaded files to MINIO previously, you also need to upload the data in the MINIO bucket to the S3 bucket. If you haven't modified the location of the STORAGE_DIR, go to `storage/minio/minio-bucket`, and you can find the previous data. Upload all the files to the S3 bucket. +7. `make start` + +Once the files are uploaded to the Anytype space, they will be uploaded to the bucket in encrypted form. \ No newline at end of file