Error in rebuilding using minio as object store

Forward what ports? 80/443 so http/https works? That’s all it needs, you should NEVER have to configure port 9000 on a separate port. The separate bucket will have the same endpoint as s3.example.com - it’s not something separate, so you’re doing THAT configuration wrong. Don’t forget also that in MinIO speak, if you’re using path authentication you would end up with s3.example.com/BUCKETNAME or with DNS authentication like you should use BUCKET.s3.example.com for the URL endpoints that you need to accept on the nginx side and forward to the internal port 9000. You don’t need to configure that on your end though, that needs to be configured on the MinIO side.

The MinIO client supports both path and dns style setup. To my knowledge, Discourse uses a URL based mechanism for bucket identification, not path style setups (feel free to correct me Discourse devs). Therefore the ‘default’ behavior you’re configuring is incorrect.

Now, my MinIO is not dockerized, but to be compliant here with Discourse, you need to use DNS style pathing, i.e. you need to add in the environment variable of MINIO_DOMAIN=BASEDOMAINHERE so that DNS style pathing that DIscourse wants to use works. In your example it would be MINIO_DOMAIN=s3.example.com and then your NGINX would need to be configured to pass the Host header to the backend on port 9000 or wherever the base non-console server components run. You then need to make sure that NGINX accepts for *.s3.example.com and forwards it properly to the MinIO container. This is part of MinIO Federation setup, but for single-node instances with multiple bucket names on a base URL you need to make sure it’s properly configured anyways if you want it to work with Discourse.

Unfortunately, though, this is where you have to start delving into the MinIO configurations. And one of the requisites I specify in the document is that you have a fully functional properly configured MinIO instance which is beyond the scope of Discourse’s site. I believe that your MinIO is not properly configured for DNS style bucket resolution like AWS S3 does (bucket.s3.example.com for instance) and as such does not function.

Note that I run the Discourse instance for the Lubuntu Project (lubuntu.me) (a variant of Ubuntu that uses LXQt) using a MinIO with DNS style bucket URL resolution in order to make it work properly with Discourse, otherwise a request for BUCKET.basedomain.example.com would fail.

Fun fact, I even state you need your MinIO properly configured for DNS style paths, if you did not include the MINIO_DOMAIN during setup of MinIO it won’t do DNS style paths. Which it needs here for Discourse, as per item 3 in my caveats section I wrote:

2 Likes