Storage Service Selection
The storage service to use for file uploads.Options:
local- Store files on local diskamazon- Amazon S3google- Google Cloud Storage (GCS)microsoft- Azure Storages3_compatible- S3-compatible services (DigitalOcean Spaces, Minio, etc.)
localEnable direct uploads to cloud storage using signed URLs.When enabled, files are uploaded directly from the browser to your cloud storage, reducing server load.Requirements:
- Proper CORS configuration on your cloud storage bucket
- See Active Storage CORS Configuration
falseLocal Storage
Store files on the local filesystem. Suitable for single-server deployments. Configuration:<rails-root>/storage/
Amazon S3
Store files in Amazon S3 buckets.Configuration Variables
Name of your S3 bucket.Example:
chatwoot-uploadsAWS access key ID with permissions to access the S3 bucket.
AWS secret access key corresponding to the access key ID.
AWS region where your S3 bucket is located.Examples:
us-east-1eu-west-1ap-southeast-1
Example Configuration
S3 Bucket Setup
- Create an S3 bucket in your AWS account
- Configure bucket permissions:
- Create an IAM user with S3 access
- Attach a policy with
s3:PutObject,s3:GetObject,s3:DeleteObjectpermissions
- If using direct uploads, configure CORS:
IAM Policy Example
For detailed S3 setup instructions, see Configuring S3 Bucket as Cloud Storage
Google Cloud Storage (GCS)
Store files in Google Cloud Storage buckets.Configuration Variables
Google Cloud project ID.Example:
my-project-12345Google Cloud service account credentials in JSON format.Note: This should be the entire JSON key file content, not a file path.Format:
{"type":"service_account","project_id":"...","private_key":"..."}Name of your GCS bucket.Example:
chatwoot-uploadsExample Configuration
GCS Bucket Setup
- Create a GCS bucket in your Google Cloud project
- Create a service account with Storage Object Admin role
- Generate and download a JSON key for the service account
- Configure CORS if using direct uploads:
Azure Storage
Store files in Azure Storage containers.Configuration Variables
Azure Storage account name.Example:
chatwootstorageAzure Storage account access key.
Name of the Azure Storage container.Example:
uploadsExample Configuration
Azure Storage Setup
- Create a storage account in Azure Portal
- Create a container within the storage account
- Get the access key from “Access keys” section
- Configure CORS if using direct uploads:
- Allowed origins:
https://your-chatwoot-domain.com - Allowed methods:
GET, PUT, POST, DELETE, OPTIONS - Allowed headers:
* - Exposed headers:
ETag, Content-Type - Max age:
3000
S3-Compatible Storage
Use S3-compatible services like DigitalOcean Spaces, Minio, Wasabi, or other providers.Configuration Variables
Name of your storage bucket.Example:
chatwoot-uploadsAccess key ID for the storage service.
Secret access key for the storage service.
Region or location of your storage bucket.Examples:
us-east-1(AWS-style)nyc3(DigitalOcean)auto(Minio)
Custom endpoint URL for the S3-compatible service.Examples:
- DigitalOcean Spaces:
https://nyc3.digitaloceanspaces.com - Minio:
https://minio.example.com - Wasabi:
https://s3.wasabisys.com
Force path-style URLs instead of virtual-hosted-style.Note: Required for some S3-compatible services like Minio.Default:
falseExample: DigitalOcean Spaces
Example: Minio
Example: Wasabi
Storage Migration
If you need to migrate from one storage provider to another:- Configure the new storage provider
- Update
ACTIVE_STORAGE_SERVICEto the new provider - Use the Rails Active Storage migration task:
Troubleshooting
Files not uploading
- Verify storage credentials are correct
- Check bucket/container exists and is accessible
- Review Chatwoot logs for detailed error messages
- Verify IAM/service account permissions
CORS errors with direct uploads
- Ensure CORS is properly configured on your storage bucket
- Verify allowed origins match your Chatwoot domain exactly
- Check browser console for specific CORS error messages
- Ensure HTTPS is used in production
Permission errors
- Verify the IAM user or service account has required permissions
- For S3: Ensure both bucket-level and object-level permissions
- For GCS: Verify service account has Storage Object Admin role
- For Azure: Check container access level and access key validity
Path-style vs virtual-hosted-style
Some S3-compatible services requireSTORAGE_FORCE_PATH_STYLE=true. If you see URL-related errors, try toggling this setting.
Path-style: https://endpoint.com/bucket/objectVirtual-hosted-style:
https://bucket.endpoint.com/object
Related Configuration
- Environment Variables - Complete environment variable reference
- PostgreSQL Configuration - Database configuration

