Partner with experts to accelerate your digital transformation journey
Bobcares

How to Configure s3cmd DigitalOcean Spaces

PDF Header PDF Footer

Full guide on using s3cmd with DigitalOcean Spaces. Learn setup, configuration, access keys, endpoint details, and save your settings easily. Our DigitalOcean Support Team is always here to help you.

How to Configure s3cmd DigitalOcean Spaces

Working with object storage gets much easier when you have a command-line tool to rely on. That’s where s3cmd digitalocean spaces comes in handy. Since DigitalOcean Spaces is fully compatible with the Amazon S3 API, you can set it up quickly and start managing your buckets and files right from your terminal. Below is the complete process, with every detail you’ll need to configure it properly.

s3cmd digitalocean spaces

What You Should Have Ready

  • Install s3cmd version 2.0.0+. Confirm with:
s3cmd --version

If the version is outdated, download the latest from the s3cmd page. Homebrew users can install with:

brew install s3cmd
  • Generate an access key pair in your DigitalOcean Control Panel under the API section.

Start the Configuration

s3cmd stores its settings in a .s3cfg file, usually located in your home directory. To begin, run:

s3cmd --configure

If you already use s3cmd with another provider, you can make a different config file by adding the -c flag and specifying the filename.

Add Access Keys

Enter your keys when asked:

Access Key []: EXAMPLE7UQOTHDTF3GK4
Secret Key []: exampleb8e1ec97b97bff326955375c5
Default Region [US]:

Alternatively, you can store them in environment variables: AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY.

Provide the Endpoint

Input the DigitalOcean Spaces endpoint for your chosen region. For example, if your buckets are in NYC3:

S3 Endpoint [s3.amazonaws.com]: nyc3.digitaloceanspaces.com

Define the Bucket URL

Since Spaces supports DNS-based URLs, set the bucket template as follows:

DNS-style bucket+hostname:port template for accessing a bucket []: %(bucket)s.nyc3.digitaloceanspaces.com

Confirm HTTPS

Spaces does not allow unencrypted transfers, so you must confirm HTTPS:

Use HTTPS protocol [Yes]: Yes

Review and Save

At this stage, s3cmd will show your chosen settings. For example:

New settings:

Access Key: EXAMPLES7UQOTHDTF3GK4
Secret Key: b8e1ec97b97bff326955375c5example
Default Region: US
S3 Endpoint: nyc3.digitaloceanspaces.com
DNS-style bucket+hostname:port template for accessing a bucket: %(bucket)s.nyc3.digitaloceanspaces.com
Encryption password: secure_password
Path to GPG program: /usr/bin/gpg
Use HTTPS protocol: True
HTTP Proxy server name:
HTTP Proxy server port: 0

Test the connection:

Test access with supplied credentials? [Y/n] Y

If everything is correct, you’ll see:

Please wait, attempting to list all buckets...
Success. Your access key and secret key worked fine :-)
Now verifying that encryption works...
Success. Encryption and decryption worked fine :-)
Save settings? [y/N] Y

The configuration will then be saved to your system, usually under /home/username/.s3cfg.

[If needed, Our team is available 24/7 for additional assistance.]

Conclusion

Once your configuration is complete, s3cmd digitalocean spaces gives you full command-line control over your object storage. From uploading and syncing files to managing buckets securely, everything is ready to go. With the setup done correctly, you can focus on using your storage instead of struggling with setup.

This walkthrough highlighted the exact commands and prompts needed to connect s3cmd digitalocean spaces, making sure you won’t miss a thing.

0 Comments

Submit a Comment

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

Get featured on the Bobcares blog and share your expertise with a global tech audience.

WRITE FOR US
Bobcares

Use your time to build great apps. Leave your servers to us.

Managing a server is time consuming. Whether you are an expert or a newbie, that is time you could use to focus on your product or service. Leave your server management to us, and use that time to focus on the growth and success of your business.

TALK TO US Or click here to learn more.

Speed issues driving customers away?
We’ve got your back!