Author: David FinsterLast Updated: Fri, Nov 4, 2022
s3cmd is a popular command-line tool for managing S3-compatible object storage.
Vultr Object Storage is a highly scalable solution for storing large quantities of files. Our architecture was designed from the ground up to provide high redundancy and data durability, and backed by blazing fast NVMe caching to make sure you have the best storage performance. Vultr Object Storage is compatible with a subset of the S3 API. See our compatibility matrix for details.
You will need:
Vultr Object Storage configured in your account.
The access key and secret key for your Object Store.
s3cmd, version 2.0.0 or later.
The s3cmd configuration file,
.s3cfg, is located in your home directory. It's a plain text file that defines the default options when you run commands. You can specify a different configuration file with the -c ~/path/to/config/file command-line option. To configure Vultr as the default provider, complete the steps below.
Run s3cmd with the --configure option.
$ s3cmd --configure
Enter your access and secret keys. Find these values in your customer portal.
Access Key: exampleNMWQSG599TB3A Secret Key: exampleCL2s4EgQRhnXafSBHCsjlsz1XVfJBeE4V
Type ENTER to accept the default region. Vultr ignores this value.
Default Region [US]:
Enter one of Vultr's object storage hostnames for the S3 Endpoint. For example, if you choose the New Jersey location, use
S3 Endpoint [s3.amazonaws.com]: ewr1.vultrobjects.com
Vultr's hostnames are:
Enter the DNS-style template. For example, if you choose the New Jersey location, use
DNS-style bucket+hostname:port template for accessing a bucket [%(bucket)s.s3.amazonaws.com]: %(bucket)s.ewr1.vultrobjects.com
Vultr's DNS-style templates are:
Optional Encryption Password: GPG encryption protects objects while stored at Vultr. Setting this password does not automatically encrypt objects; it only makes the option available later. Linux users can usually accept the default path to GPG. macOS users may need to install GPG first, then locate the path with
Encryption password: example Path to GPG program [/usr/bin/gpg]:
Enter ENTER to use HTTPS protocol. Vultr Object Storage requires HTTPS.
Use HTTPS protocol [Yes]:
Optional: If your network requires an HTTP Proxy, enter that here. Otherwise press ENTER.
HTTP Proxy server name:
Press Y + ENTER to test the s3cmd configuration.
Test access with supplied credentials? [Y/n] y Please wait, attempting to list all buckets... Success. Your access key and secret key worked fine :-)
Press Y + ENTER to save the
Save settings? [y/N] y Configuration saved to '~/.s3cfg'
For comprehensive documentation, see the official documentation. These are some of the most commonly-used commands.
Make a bucket.
s3cmd mb s3://mybucket
Remove a bucket.
s3cmd rb s3://mybucket
List the buckets.
List the objects in the bucket.
s3cmd ls s3://mybucket
Delete all objects in a bucket.
s3cmd del --recursive --force s3://mybucket
Upload a file for private access.
s3cmd put photo.jpg s3://mybucket/photo.jpg
Upload a file for public access.
s3cmd put -P photo.jpg s3://mybucket/photo.jpg
Download a file.
s3cmd get s3://mybucket/photo.jpg
Delete a file.
s3cmd rm s3://mybucket/photo.jpg
Change file permission to public access.
s3cmd setacl s3://mybucket/photo.jpg --acl-public
Change file permission to private access.
s3cmd setacl s3://mybucket/photo.jpg --acl-private
Enable public directory listing for a bucket.
s3cmd setacl s3://mybucket/ --acl-public
Disable public directory listing for a bucket.
s3cmd setacl s3://mybucket/ --acl-private