Skip to content

Install & Configure s3cmd ​

This guide walks you through installing and configuring s3cmd, an S3‑compatible command‑line client you can use to manage buckets and objects.

What you’ll need ​

  • Your S3 Access Key ID and Secret Access Key.

S3 Gateway ​

To manage your storage, you can use the S3 Gateway endpoint directly or use the button below to open it:

🪣S3 Gateway↗

Install s3cmd ​

macOS (Homebrew) ​

bash
brew install s3cmd

Debian/Ubuntu ​

bash
sudo apt update
sudo apt install -y s3cmd
# If not available or you prefer Python tools:
# python3 -m pip install --user s3cmd

RHEL/CentOS/Rocky/Alma ​

bash
sudo dnf install -y s3cmd
# or on older systems: sudo yum install -y s3cmd

Windows ​

  • Option 1: Use WSL (Windows Subsystem for Linux) and follow the Linux instructions inside your distro.
  • Option 2: Install Python and use pip:
    bash
    py -m pip install --user s3cmd
    Make sure your Python user Scripts directory is on PATH.

Configure s3cmd ​

Run the interactive configuration:

bash
s3cmd --configure

When prompted, provide:

  • Access Key and Secret Key
  • Default Region (if applicable)
  • S3 Endpoint (Host): your provider’s endpoint, e.g. s3.example.cloud
  • DNS‑style vs. Path‑style buckets:
    • Path‑style (common with some S3‑compatible services):
      • host_base: s3.example.cloud
      • host_bucket: s3.example.cloud
    • Virtual‑host style:
      • host_base: s3.example.cloud
      • host_bucket: %(bucket)s.s3.example.cloud
  • Signature version: choose the one your provider supports (SigV4 is common; some require V2).
  • Use HTTPS: Yes (recommended)

You can also edit the config file directly (typically ~/.s3cfg). Minimal example:

s3cfg
[default]
access_key = <YOUR_ACCESS_KEY_ID>
secret_key = <YOUR_SECRET_ACCESS_KEY>
host_base = rgw.storage.ams-01.eu-c1-tst.stud-io.cloud/
host_bucket = rgw.storage.ams-01.eu-c1-tst.stud-io.cloud/
use_https = True

Test your setup ​

List your buckets:

bash
s3cmd ls

If this returns a list of buckets (or an empty list without errors), your configuration is working. You can now upload files: see Upload Objects to a Bucket (s3cmd).