Mount DigitalOcean Spaces with Linux

Introducing DigitalOcean Spaces

DigitalOcean LogoDigitalOcean Spaces is a new product from DigitalOcean, which offers a S3 compatible, flexible storage place for your data – and it’s much simpler to configure compared to Amazon’s S3 or other solutions i know.

Because uploading the whole stuff via a web based interfaces is really annoying, i tried to mount the storage with my Ubuntu Linux. Here’s the result, which may help you to success faster than i did.

Setup

First, you have to create a new “Spaces space” at DigitalOcean. After doing that, use the API menu entry in your DigitalOcean account to create (or get) API credentials for your new space. Create a new file named .passwd-s3fs in your home directory, set the privileges to 0600 (read and write access only for the owner) and enter the following content (similar to this tutorial):

digitalOceanSpaceName:key:secret

Now, install s3fs-fuse into your system. For Ubuntu you can simply use sudo apt-get install s3fs.

After successful setup, use this command to mount  your space:

s3fs digitalOceanSpaceName /your/mount/path -ourl=https://nyc3.digitaloceanspaces.com

3 thoughts to “Mount DigitalOcean Spaces with Linux”

  1. Hi Matthias, thanks for sharing 🙂
    I’m trying to test rw performance of a spaces mounted on a linux droplet fs via s3fs.
    Performances are pretty low and “laggy” and we can’t understand why. We tried to play with s3fs cache and parallels connection with no success. Do you have any hint?

Leave a Reply

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