Skip to content

Connect to a bucket with the MinIO CLI or s3cmd

View as Markdown

Connect the MinIO CLI (mc) or s3cmd to a bucket from your own machine or from an instance. Any S3-compatible tool works against a bucket, and the portal recommends the MinIO CLI.

  • A bucket; see Create a bucket.
  • Permission to read datasets in the project. A Member gets it through a policy that allows reading datasets. With it, you can open the bucket’s Setup tab.

In TIR, open your project. In the side menu, under Storage, select Object Storage (EOS Dataset), then select the row of the bucket. The Setup tab opens first. It says “Configure EOS Bucket to upload data”, and it has two sections, Setup Minio CLI and Setup s3cmd. Each has ready-to-paste text with this bucket’s endpoint and keys filled in. The secret key is written out in full, so keep what you copy to yourself.

The Setup Minio CLI section lists, in order:

  1. Install mc, with tabs for macOS, Linux, and Using Windows.
  2. Check the version.
  3. Update mc.
  4. Setup Host, which saves the bucket’s endpoint and keys under a name of your choice.
  5. Copy Folder to Bucket, which copies a local folder into the bucket.

The two commands have this shape. Replace each placeholder with the value the portal prints:

mc alias set <host name> <endpoint> <access key> <secret key>
mc cp -r $LOCAL_FOLDER_NAME <host name>/<bucket name>

The portal fills in the bucket’s alias as the name in Setup Host. That name is only a nickname that mc saves on your computer for this endpoint and key pair, so you can choose any name you like.

An older mc, from before release RELEASE.2025-05-21T01-59-54Z, uses this command in place of mc alias set. The macOS tab shows a note about it:

mc config host add <host name> <endpoint> <access key> <secret key>

The Setup s3cmd section gives the settings for your s3cmd configuration file. The endpoint goes in both the host and the bucket-host lines, and your keys go in the key lines. The connection uses HTTPS.

host_base = <endpoint>
host_bucket = <endpoint>
use_https = True
access_key = <access key>
secret_key = <secret key>
signature_v2 = False

To copy a folder and list the bucket with s3cmd, run these commands. <bucket name> is the bucket’s Bucket Name, and ./local-data/ is the folder on your machine:

s3cmd put -r ./local-data/ s3://<bucket name>/
s3cmd ls s3://<bucket name>/

Copy a folder into the bucket with Copy Folder to Bucket, then open the Data Objects tab and refresh the list. The uploaded files appear in the list. If they have yet to appear, list the bucket with your S3 tool to confirm the upload finished.

Your S3 tool is now connected to the bucket. For large uploads, see Upload data to a bucket. If the tool answers “Access Denied”, see Troubleshooting TIR Object Storage.