# S3 bucket setup

**URL:** <https://forum.mattermost.com/t/s3-bucket-setup/16570>\
**Category:** Troubleshooting\
**Created:** [August 1, 2023, 10:42am UTC](https://forum.mattermost.com/t/s3-bucket-setup/16570 "2023-08-01T10:42:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sadman](https://avatars.discourse-cdn.com/v4/letter/s/9de053/32.png) [@Sadman](https://forum.mattermost.com/u/Sadman)\
**Post date:** [August 1, 2023, 10:42am UTC](https://forum.mattermost.com/t/s3-bucket-setup/16570/1 "2023-08-01T10:42:01Z")

</div>

**Summary**  
Files are storing to local storage instead of S3 bucket

**Steps to reproduce**  
I have deployed Mattermost enterprise version using docker. In the file storage settings, I have configured S3 bucket for storing data instead of local file system. AWS S3 configurations are given correctly I guess cause it shows test connection successful. But it keeps storing data to local file system, not in AWS S3

**Expected behavior**  
Data should be stored to S3 bucket

**Observed behavior**  
I have checked the postgres container and found that files are storing in the container database. But not in S3 bucket

---

<div class="post-metadata">

**Author:** ![Sadman](https://avatars.discourse-cdn.com/v4/letter/s/9de053/32.png) [@Sadman](https://forum.mattermost.com/u/Sadman)\
**Post date:** [August 3, 2023, 8:14am UTC](https://forum.mattermost.com/t/s3-bucket-setup/16570/2 "2023-08-03T08:14:13Z")

</div>

I have solved this by adding the AWS S3 bucket related environment variables in the .env file. Just changing the local file system to the S3 bucket from file storage settings didn’t work.
