Storage / DigitalOcean SpacesMenu

DigitalOcean SpacesDigitalOcean Spaces

Store your SFTP server's files in your own DigitalOcean Spaces bucket, with a limited-access key for that bucket.

Spaces has simple pricing: the $5 monthly subscription includes 250 GiB of storage and 1,024 GiB of outbound transfer, shared across your buckets.

Before you start

  • A DigitalOcean account with access to Spaces Object Storage.
  • The region you want, for example fra1 (Frankfurt) or ams3 (Amsterdam).

1. Create the bucket

  1. In the control panel, go to Spaces Object Storage and choose Create Bucket.
  2. Under Choose a datacenter region, pick a region. It can’t be changed later.
  3. Choose Standard Storage. Cold Storage is meant for rarely read data.
  4. Leave the CDN off; CloudFile doesn’t use it.
  5. Enter a name, pick a project and choose Create a Spaces Bucket.

2. Create an access key

  1. Go to Spaces Object Storage → Access Keys and choose Create Access Key.
  2. Under Select access scope, choose Limited access.
  3. Select your bucket and set its permission to Read/Write/Delete.
  4. Name the key, for example cloudfile, and choose Create Access Key.
  5. Copy the access key ID and the secret key. The secret is shown only once.

Limited-access keys can’t be used on a bucket that has a bucket policy set through the S3 API. If your bucket has one, remove it or use a different bucket.

3. Connect it

In CloudFile, go to Storage → Add bucket and choose DigitalOcean Spaces:

Field Value
Bucket Your bucket name
Region The bucket’s region, e.g. fra1
Endpoint https://<region>.digitaloceanspaces.com (filled in from the region)
Access key ID The access key ID from step 2
Secret access key The secret key from step 2
Name Optional, e.g. Production
Path-style URLs Off

Click Test connection, then Save. To use the bucket, open a server and pick it under Settings → Storage.

Troubleshooting

  • Writing a test file failed with a NoSuchBucket error. The region doesn’t match the bucket. The bucket’s endpoint is shown at the top right of its overview page, for example fra1.digitaloceanspaces.com.
  • Writing a test file failed: Access Denied. The key is limited to a different bucket or only has Read. Create a key with Read/Write/Delete on this bucket.
  • Writing a test file failed with an invalid access key error. The key was deleted, or you pasted a DigitalOcean API token instead of a Spaces access key.
  • Deleting the test file failed. The key has Read instead of Read/Write/Delete.

See Your own bucket for how files are laid out in the bucket.