Skip to main content

Configuring S3 Bucket as storage in Chatwoot

Using Amazon S3

You can get started with Creating an S3 bucket and Create an IAM user to configure the following details.

Configure the following env variables.


S3 Bucket policy

Inorder to use S3 bucket in Chatwoot, a policy has to be set with the correct credentials. A sample policy is given below, as the listed actions are required for the storage to work.

"Version": "2012-10-17",
"Id": "Policyxxx",
"Statement": [
"Sid": "Stmtxxx",
"Effect": "Allow",
"Principal": {
"AWS": "your-user-arn"
"Action": [
"Resource": [

Replace your bucket name in the appropriate places.

User ARN can be found using the following steps:

  1. Login to AWS Console. Go to IAM, and click on Users from the left sidebar. You will be to see the list of users as follows.


  1. Click on the user, you will be to see a screen as shown below. Copy the User ARN and paste it in the above policy.


Add CORS Configuration on your S3 buckets

You need to configure CORS settings to the respective storage cloud to support Direct file uploads from the widget and the Chatwoot dashboard.

Refer to this link for more information:

To make CORS configuration changes on S3:

  1. Go to your S3 bucket
  2. Click on the permissions tab.
  3. Scroll to Cross-origin resource sharing (CORS) and click on Edit and add the respective changes shown below.


Add your Chatwoot URL to the AllowedOrigin as shown below.

"AllowedHeaders": [
"AllowedMethods": [
"AllowedOrigins": [
"<add-your-domain-here eg:>"
"ExposeHeaders": [
"MaxAgeSeconds": 3600