DigitalOcean dashboard

Use Amazon AWS S3 or Digital Ocean's object storage to store media files


Having used Jekyll as the blog engine I decided to store my entire web page in the git repository. Version control lets me fiddle with design and writing drafts, but what about big files? Nowadays a blog shall not lack media, not to mention a thumbnail. But pushing images to git repo is not a desired solution. Instead, try to


Add Spaces in DigitalOcean dashborad

  • choose region
  • name it Go to API->Spaces acces keys-> Generate New Key
The secret key will be displayed only once, so write it in the password manager!

Install s3cmd

sudo apt-get install python-pip
sudo pip install s3cmd
s3cmd --configure

Configure it. Below is the example of config (your Acces and secret key will vary). Change ny3 region accordingly.

Secret Key []: b8e1ec97b97bff326955375c5example
Default Region [US]:
S3 Endpoint []:
DNS-style bucket+hostname:port template for accessing a bucket []: %(bucket)
Path to GPG program [/usr/bin/gpg]:/usr/bin/gpg2
Use HTTPS protocol [Yes]: Yes
HTTP Proxy server name:


Put images to your object storage space:

s3cmd put -r s3cmd01.png s3://mindefragnet/posts/object-storage/ --acl-public

Note the --acl-public flag. Otherwise the uploaded file will be private and not visible outside your account. You will see something like this: s3cmd

Now copy the public URL of the object and use it as a regular image, like this