Articles on: Object storage

S3cmd: configuration and use


Install s3cmd
Have created your identifier

Configuring s3cmd

Execute the configuration command
s3cmd --configure

Access Key: <available in dashboard leviia>
Secret Key: <available in dashboard leviia>

Default Region: default
S3 Endpoint:
DNS-style bucket+hostname:port template for accessing a bucket: %(bucket)
Encryption password: 
Path to GPG program: /usr/bin/gpg
Use HTTPS protocol: True
HTTP Proxy server name: 
HTTP Proxy server port: 0
Test access with supplied credentials? [Y/n] y
Please wait, attempting to list all buckets...
Success. Your access key and secret key worked fine :-)

Now verifying that encryption works...
Not configured. Never mind.

Save settings? [y/N] y

s3cmd settings

To optimize s3cmd for your Internet connection, you can set the size of packets sent.
To do this, simply use the following option:


The default value is 15, but you can go as low as 5 (slow upload rate) or as high as 5000 (ultra-fast upload rate).
We recommend testing different settings to suit your needs.

Using s3cmd

Information bucket

List buckets
s3cmd ls
List bucket contents
s3cmd ls s3://<bucket_name>
Get the size of your bucket
s3cmd du s3://<bucket_name>

Action on bucket

Create a new bucket
s3cmd mb s3://<bucket_name>
Delete a bucket
s3cmd rb s3://<bucket_name>

File management

Send a file to the new bucket
s3cmd put index.html s3://<bucket_name> --multipart-chunk-size-mb=5000
Send a file to the new bucket
s3cmd put -r myfolder s3://<bucket_name> --multipart-chunk-size-mb=5000
Download a file
s3cmd get s3://<bucket_name>/file.html --multipart-chunk-size-mb=5000
Move a file (only if on the same bucket)
s3cmd mv s3://<bucket_name>/file1/file.html s3://<bucket_name>/file2/file.html

Updated on: 05/01/2024

Was this article helpful?

Share your feedback


Thank you!