Bobcares

Configure s3cmd with Vultr Object Storage

by | Oct 23, 2021

Use s3cmd with Vultr Object Storage like a pro. Our Support Team offers you this in-depth tutorial to get you started.

At Bobcares, we answer similar queries as a part of our Server Management Services.

Let’s dive in and find out how to use s3cmd with Vultr Object Storage!

What is s3cmd?

s3cmd is a popular command-line tool and client utilized to manage S3-compatible object storage. It is used to upload, retrieve as well as manage data in Amazon S3 as well as other cloud storage service providers like DreamHost Dream Objects or Google Cloud Storage that use S3 protocol.

What is Vultr Object Storage?

Vultr Object Storage is a highly scalable tool to store large quantities of files. Its architecture is designed from the ground up to ensure high redundancy as well as data durability.

Moreover, it is backed by extremely fast NVMe caching, resulting in optimal storage performance. Furthermore, Vultr Object Storage is compatible with a subset of the S3 API.

Prerequisites to use s3cmd with Vultr Object Storage

The prerequisites to use s3cmd with Vultr Object Storage include:

  • Vultr Object Storage configured in the account.
  • Access key & secret key for the Object Store.
  • s3cmd version 2.0.0 or higher.

How to set default s3cmd configuration with Vultr Object Storage

The s3cmd configuration file, known as -s3cfg is located in the home directory. It is a plain text file that contains the default options when commands are run, You can opt for a different configuration file by using -c ~/path/to/config/file command-line option.

  1. First, our Support Engineers recommend using the –configure option to configure Vultr as the default provider. For instance:
    $ s3cmd –configure
  2. Next, s3cmd will request your access and request keys. You can find these values in your customer portal.
    Access Key: exampleNMWQSG599TB2A Secret Key: exampleCL2s4EgQRhnXafSBHCsjlsz1XVfJBeE3V
  3. After that, type ENTER and accept the default region as this value is ignored by Vultr.
  4. Then, enter ewr1.vultrobjects.com as the S3 Endpoint as seen below:
    S3 Endpoint [s3.amazonaws.com]: ewr1.vultrobjects.com
  5. Next, enter %(bucket)s.ewr1.vultrobjects.com as the DNS-style template as seen below:
    DNS-style bucket+hostname:port template for accessing a bucket [%(bucket)s.s3.amazonaws.com]: %(bucket)s.ewr1.vultrobjects.com
  6. Optional step: You can opt to have your objects protected with GPG encryption by setting the password. This offers you the option to encrypt objects later. According to our Support Engineers, Linux users can accept the default path, while macOS users will have to install GPG and locate the path using which gpg.
    Encryption password: example
    Path to GPG program [/usr/bin/gpg]:
  7. Then, enter ENTER to utilize HTTP protocol as Vultr Object Storage requires HTTP.
    Use HTTPS protocol [Yes]:
  8. In case your network needs an HTTP Proxy, you can enter that here, else select ENTER.
  9. After that, press Y+ENTER to verify 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 :-)
  10. Finally, press Y+ENTER to save the configuration file as seen below:
    Save settings? [y/N] y
    Configuration saved to '~/.s3cfg'

How to use s3cmd with Vultr Object Storage

Our Support Techs have put together a list of commonly used s3cmd commands to get you started:

  • Make a bucket:
    s3cmd mb s3://mybucket
  • Remove a bucket:
    s3cmd rb s3://mybucket
  • List buckets:
    s3cmd ls
  • List objects in a bucket:
    s3cmd ls s3://mybucket
  • Upload a file for public access:
    s3cmd put -P photo1.jpg s3://mybucket/photo1.jpg
  • Upload a file for private access:
    s3cmd put photo1.jpg s3://mybucket/photo1.jpg
  • Delete a file:
    s3cmd rm s3://mybucket/photo1.jpg
  • Download a file:
    s3cmd get s3://mybucket/photo1.jpg
  • 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
  • Change file permission to private access.
    s3cmd setacl s3://mybucket/photo1.jpg –acl-private
  • Change file permission to public access.
    s3cmd setacl s3://mybucket/photo1.jpg --acl-public

[Server Management giving you trouble? We are just a click away.]

Conclusion

In brief, we learned how to set the default configuration of s3cmd and how to use it with Vultr Object Storage under the skilled guidance of the Support Team.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.