Skip to content

Instantly share code, notes, and snippets.

@gilangvperdana
Last active December 31, 2022 02:22
Show Gist options
  • Save gilangvperdana/48a20a851ffd484ebd67c7dfb4b2ae74 to your computer and use it in GitHub Desktop.
Save gilangvperdana/48a20a851ffd484ebd67c7dfb4b2ae74 to your computer and use it in GitHub Desktop.
Minio with S3CMD

Goals

Can operate Minio on Linux Ubuntu with S3CMD

Install Minio

docker run -d \
   --restart always \
   -p 9000:9000 \
   -p 9091:9090 \
   --name minio \
   -v /mnt/storage:/data \
   -e "MINIO_ROOT_USER=USER!" \
   -e "MINIO_ROOT_PASSWORD=PASSWORD!" \
   -e "MINIO_SERVER_URL=https://minio.example.org:9000" \
   quay.io/minio/minio server /data --console-address ":9090"

Install s3cmd

apt install -y s3cmd

Configure s3cmd to minio

  • Lets assume minio endpoint is on 172.20.1.219:9090 & 172.20.1.219:9000
  • We have create an access_key & secret_key on minio GUI
  • Lets assume minio endpoint are not TLS, if TLS please change use_https==True
nano ~/.s3cfg
# Setup endpoint
host_base = 172.20.1.219:9000
host_bucket = 172.20.1.219:9000
bucket_location = us-east-1
use_https = False

# Setup access keys
access_key =  9QFhbywA0VJgL1Rf
secret_key = fA2aGnp4BVuvDHYADI4JBHcrvMKGxmr1

# Enable S3 v4 signature APIs
signature_v2 = False

Operational

s3cmd ls

Running behind reverse proxy

Reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment