S3 Configuration
To store your uploaded files in Mixpost, you need to set up an S3 bucket.
Mixpost supports any S3-compatible storage provider, such as:
Get started
- Set the environment variable
MIXPOST_DISK=s3
. - Configure the necessary environment variables required to support S3.
AWS Setup
Enable ACL
You need to enable the ACL for your bucket.
Access policy
Add following access policy:
{
"Version": "2012-10-17",
"Id": "Policy1692807538499",
"Statement": [
{
"Sid": "Stmt1692807537432",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:*",
"Resource": "arn:aws:s3:::your-bucket-name"
}
]
}
Replace your-bucket-name
with your real bucket name.
CORS policy
Next, scroll down to the Access control list (ACL) -> Cross-origin resource sharing (CORS), and add this:
[
{
"AllowedHeaders": [],
"AllowedMethods": [
"GET",
"PUT",
"POST",
"DELETE"
],
"AllowedOrigins": [
"*"
],
"ExposeHeaders": []
}
]
MinIO Setup
You need to set the AWS_URL
and AWS_ENDPOINT
variables in the .env file to point to the MinIO server and ensure that AWS_USE_PATH_STYLE_ENDPOINT
is set to true
.
Example:
AWS_URL=https://127.0.0.1:9000
AWS_ENDPOINT=https://127.0.0.1:9000
AWS_USE_PATH_STYLE_ENDPOINT=true