Utilizing MinIO server for S3 compatible object storage
MinIO is an S3-compatible object storage server solution that is cloud-native by default but easy to deploy on on-prem servers or VPSes or cloud servers for your use as an alternative to Amazon AWS S3 or other systems, and is compatible with Discourse when configured right.
This section presupposes that the following are true in your environment:
- You have a fully configured MinIO server instance
- You have Domain Support enabled in the MinIO configuration
- You have DNS configuration properly set up for MinIO so that bucket subdomains properly resolve to the MinIO server
- The bucket
discourse-dataexists on the MinIO server and has a “public” policy set on it
- The bucket
discourse-backupsexists on the MinIO server and is a private bucket for uploads to be put into (and not publicly reachable - the default policy for new buckets)
- Your S3 CDN URL is a properly configured CDN pointing to the bucket and cache requests, as stated earlier in this document.
If you have all of the above requirements available, then you should be good to go.
An example configuration would be like this:
DISCOURSE_USE_S3: true DISCOURSE_S3_REGION: anything DISCOURSE_S3_ENDPOINT: https://minio.example.com DISCOURSE_S3_ACCESS_KEY_ID: myaccesskey DISCOURSE_S3_SECRET_ACCESS_KEY: mysecretkey DISCOURSE_S3_CDN_URL: https://discourse-data-cdn.example.com DISCOURSE_S3_BUCKET: discourse-data DISCOURSE_S3_BACKUP_BUCKET: discourse-backups DISCOURSE_BACKUP_LOCATION: s3
This will provide you with a basic MinIO configuration with a MinIO server in place of Amazon S3.