# S3 File Adapter with minIO

**URL:** <https://community.parseplatform.org/t/s3-file-adapter-with-minio/1200>\
**Category:** Parse Server 📡\
**Tags:** s3, minio\
**Created:** [January 5, 2021, 11:22am UTC](https://community.parseplatform.org/t/s3-file-adapter-with-minio/1200 "2021-01-05T11:22:58Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnbraum](https://community.parseplatform.org/letter_avatar_proxy/v4/letter/j/dfb087/32.png) [@johnbraum](https://community.parseplatform.org/u/johnbraum)\
**Post date:** [January 5, 2021, 11:22am UTC](https://community.parseplatform.org/t/s3-file-adapter-with-minio/1200/1 "2021-01-05T11:22:58Z")

</div>

Hey guys,

I want to use minio with the s3-adapter, but don’t know how to configure it with docker-compose.

I have following Config:

`- PARSE_SERVER_FILES_ADAPTER={"module":"@parse/s3-files-adapter", "options":{"bucket":"parsemedia","directAccess":true,"s3overrides":{"s3ForcePathStyle":true,"endpoint":"http://mydomain.de:9000/","accessKeyId":"accessKey","secretAccessKey":"secretKey"}}}`

But it still connects to AWS Servers.

The documentation is not clear about that, but I read that it is possible.

---

<div class="post-metadata">

**Author:** ![uzaysan](https://community.parseplatform.org/user_avatar/community.parseplatform.org/uzaysan/32/59_2.png) [@uzaysan](https://community.parseplatform.org/u/uzaysan)\
**Post date:** [January 6, 2021, 7:09am UTC](https://community.parseplatform.org/t/s3-file-adapter-with-minio/1200/2 "2021-01-06T07:09:13Z")

</div>

~~Can you try this? İ was using this configuration and it was working~~

~~`{"module":"@parse/s3-files-adapter", "options":{"bucket":"parsemedia","directAccess":true,"endpoint":"http://mydomain.de:9000/","accessKeyId":"accessKey","secretAccessKey":"secretKey"}}`  
 ~~

Edit: I thought this was Minio adapter. You should set baseUrl. otherwise parse server will return default aws endpoint.

Try this:

`{"module":"@parse/s3-files-adapter", "options":{"bucket":"parsemedia","directAccess":true,"baseUrlDirect": true,"baseUrl": "http://mydomain.de:9000","s3overrides":{"endpoint":"http://mydomain.de:9000","accessKeyId":"accessKey","secretAccessKey":"secretKey"}}}`

---

<div class="post-metadata">

**Author:** ![johnbraum](https://community.parseplatform.org/letter_avatar_proxy/v4/letter/j/dfb087/32.png) [@johnbraum](https://community.parseplatform.org/u/johnbraum)\
**Post date:** [January 6, 2021, 11:53am UTC](https://community.parseplatform.org/t/s3-file-adapter-with-minio/1200/3 "2021-01-06T11:53:57Z")

</div>

> [@uzaysan](#):
>
> {“module”:“@parse/s3-files-adapter”, “options”:{“bucket”:“parsemedia”,“directAccess”:true,“baseUrlDirect”: true,“baseUrl”: “[http://mydomain.de:9000](http://mydomain.de:9000)”,“s3overrides”:{“endpoint”:“[http://mydomain.de:9000](http://mydomain.de:9000)”,“accessKeyId”:“accessKey”,“secretAccessKey”:“secretKey”}}}

Thanks for your answer. When I try to save a ParseFile now it says:

`The XML you provided was not well-formed or did not validate against our published schema.`

Also when I retrieve an image with following URL:

`http://mydomain.de:9000/b272d92fa2b1d9504bbad49ae9b5e0bd_image.jpg`

It doesn’t display when I access it through the browser it redirects me to the minio login screen.

It is very sad, that there are no documentation about that. I try minio because the normal file adapter doesn’t support the byte range header, which iOS needs to show a video in an tag. A real S3 is not an option for the customer. Data must be on their servers…

---

<div class="post-metadata">

**Author:** ![uzaysan](https://community.parseplatform.org/user_avatar/community.parseplatform.org/uzaysan/32/59_2.png) [@uzaysan](https://community.parseplatform.org/u/uzaysan)\
**Post date:** [January 6, 2021, 1:29pm UTC](https://community.parseplatform.org/t/s3-file-adapter-with-minio/1200/4 "2021-01-06T13:29:55Z")

</div>

My bad. You need to add bucket name at the end of the base url.

Your base url must be like this  
[http://mydomain.de:9000/parsemedia](http://mydomain.de:9000/parsemedia)

And you can get your file like this  
[http://mydomain.de:9000/parsemedia/b272d92fa2b1d9504bbad49ae9b5e0bd\_image.jpg](http://mydomain.de:9000/parsemedia/b272d92fa2b1d9504bbad49ae9b5e0bd_image.jpg)

---

<div class="post-metadata">

**Author:** ![johnbraum](https://community.parseplatform.org/letter_avatar_proxy/v4/letter/j/dfb087/32.png) [@johnbraum](https://community.parseplatform.org/u/johnbraum)\
**Post date:** [January 7, 2021, 3:34pm UTC](https://community.parseplatform.org/t/s3-file-adapter-with-minio/1200/5 "2021-01-07T15:34:45Z")

</div>

It worked!  
Thanks so much! If I can spend you a coffee, just tell me 🙂

Following config for docker-compose:

Note: You need to set the right access policies in the minio interface.

- PARSE\_SERVER\_FILES\_ADAPTER={“module”:"@parse/s3-files-adapter",“options”:{“bucket”:“parsemedia”,“directAccess”:true,“baseUrlDirect”:true,“baseUrl”:“[http://mydomain.de:9000/parsemedia",“s3overrides”:{“endpoint”:“http://mydomain.de:9000/parsemedia”,“accessKeyId”:“accessKey”,“secretAccessKey”:“key”,"s3BucketEndpoint](http://mydomain.de:9000/parsemedia%22,%22s3overrides%22:%7B%22endpoint%22:%22http://mydomain.de:9000/parsemedia%22,%22accessKeyId%22:%22accessKey%22,%22secretAccessKey%22:%22key%22,%22s3BucketEndpoint)”:true}}}

---

<div class="post-metadata">

**Author:** ![ericdai](https://community.parseplatform.org/letter_avatar_proxy/v4/letter/e/b9e5f3/32.png) [@ericdai](https://community.parseplatform.org/u/ericdai)\
**Post date:** [March 5, 2021, 3:17am UTC](https://community.parseplatform.org/t/s3-file-adapter-with-minio/1200/6 "2021-03-05T03:17:48Z")

</div>

I have both minio and parse docker image running on same server  
so how to config the minio URL?

---

<div class="post-metadata">

**Author:** ![uzaysan](https://community.parseplatform.org/user_avatar/community.parseplatform.org/uzaysan/32/59_2.png) [@uzaysan](https://community.parseplatform.org/u/uzaysan)\
**Post date:** [March 5, 2021, 8:47am UTC](https://community.parseplatform.org/t/s3-file-adapter-with-minio/1200/7 "2021-03-05T08:47:47Z")

</div>

Have you tried 127.0.0.1:9000?

---

<div class="post-metadata">

**Author:** ![johnbraum](https://community.parseplatform.org/letter_avatar_proxy/v4/letter/j/dfb087/32.png) [@johnbraum](https://community.parseplatform.org/u/johnbraum)\
**Post date:** [March 5, 2021, 9:00am UTC](https://community.parseplatform.org/t/s3-file-adapter-with-minio/1200/8 "2021-03-05T09:00:23Z")

</div>

I am using minio also on the same server.  
Works with the config above.

I have also a nginx container in front of the minio server

---

<div class="post-metadata">

**Author:** ![ericdai](https://community.parseplatform.org/letter_avatar_proxy/v4/letter/e/b9e5f3/32.png) [@ericdai](https://community.parseplatform.org/u/ericdai)\
**Post date:** [March 6, 2021, 8:31am UTC](https://community.parseplatform.org/t/s3-file-adapter-with-minio/1200/9 "2021-03-06T08:31:46Z")

</div>

I found that the office docker image did not include the S3 file adapter
