I am running minio in a docker container and I want files that are uploaded to be accessible by the public. I have tried with nginx however that is just a reverse proxy. The problem is that minio has a access key and a secret so if I setup nginx as a reverse proxy I still need to login.
I want to make it possible to download files through nginx or apache. Is there a way to make files/buckets within minio publicly accessible without having to login so that I can create direct links to the file?
To open up the MongoDB shell, run the mongo command from your server prompt. By default, the mongo command opens a shell connected to a locally-installed MongoDB instance running on port 27017 . Try running the mongo command with no additional parameters: mongo.
To set the default policy for unauthenticated users, the command is mc policy set download minio_alias/bucketname
Source: https://docs.min.io/docs/minio-client-complete-guide.html
For an example of using nginx for hosting the files, here's a github gist: How to configure static website using Nginx with MinIO?
# list default hosts after install:
mc config host ls
# remove all hosts: mc config host rm {hostName}
mc config host rm local
# add your host: mc config host add {hostName} {url} {apiKey} {apiSecret}
mc config host add local http://127.0.0.1:9000 ClientIdASSDSD ClientSecretASASASdsasdasdasdasd
# create bucket: mc mb {host}/{bucket}
mc mb local/mybucket
# change bucket policy: mc policy {policy} {host}/{bucket}
mc policy set public local/mybucket
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With