Spaces How-Tos

Generated on 5 May 2025

Spaces Object Storage is an S3-compatible object storage service. Spaces buckets let you store and serve large amounts of data, and the built-in CDN minimizes page load times and improves performance.

Getting Started

How to Create a Spaces Bucket

Create a Spaces bucket to store and serve large amounts of data. Create multiple Spaces buckets at no additional cost to use as logical units for segmenting content.

How to Upload, Download, and Delete Files

Upload files from your local computer to make them available in a Spaces bucket, download files from a bucket to your local computer, and delete files from a bucket to stop serving them.

How to Organize Files with Folders

Use folders to organize files in a Space and make them conceptually easier to manage.

How to Destroy Spaces

Destroy a Spaces bucket to permanently and irrecoverably destroy the bucket and all of the files in it. Your Spaces subscription ends automatically when you destroy your last bucket.

How to Migrate Spaces with Flexify.IO

Migrate buckets to and from DigitalOcean Spaces with Flexify.IO

Transfer DigitalOcean Spaces Buckets Between Regions Using Rclone

Migrate data between regions by using Rclone to transfer data between two Spaces buckets.

Access Control

How to Share Links to Files with File Permissions and Presigned URLs

Choose how you share files by setting the file permissions to public (visible to the internet) or private (visible to owners of the bucket). Use presigned URLs to give time-bound access to private files.

How to Set File Listing Permissions for Spaces

Set the permissions of a Spaces bucket’s file listing, which is an XML list of the bucket’s contents, to public (visible to anyone on the internet) or private (visible only to users with access keys to the bucket).

How to Manage Access to Spaces

Allow people or programs to co-manage Spaces with the owner of the Spaces bucket using access keys or DigitalOcean Teams.

Content Delivery Network

How to Enable the Spaces CDN

Enable the built-in Spaces content delivery network (CDN) to deliver content faster and more reliably and add an extra layer of redundancy for websites.

How to Manage the Spaces CDN Cache

Set the Spaces CDN’s edge cache TTL or purge the cache to manage when edge servers refresh their content.

How to Customize the Spaces CDN Endpoint with a Subdomain

Use a secure subdomain you own as an alternative endpoint for the Spaces CDN.

Advanced

How to Configure Bucket Policies

Configure bucket policies to control access and permissions for Spaces buckets using the Spaces API, AWS CLI, or s3cmd. Use bucket policies to define who can access your bucket and what actions they can perform.

How to Configure Lifecycle Rules

Configure lifecycle rules to automatically manage object storage in your Space using the Spaces API, AWS CLI, or s3cmd. Use lifecycle rules to delete objects after a set period or remove incomplete multipart uploads.

How to Enable Spaces Versioning

You can preserve, retrieve, and restore every version of every object stored in your buckets using S3 Versioning.

How to Set File Metadata

Set file metadata like Content-Type, Cache-Control, Content-Encoding, Content-Disposition, and custom key-value headers.

How to Configure CORS on DigitalOcean Spaces

Configure Cross-Origin Resource Sharing (CORS) to let client web applications loaded in one domain interact with resources in a Spaces bucket.

How to Use DigitalOcean Spaces with AWS S3 SDKs

The Spaces API is inter-operable with the AWS S3 API, meaning you can use existing S3 tools and libraries with it. These examples demonstrate how to perform a number of common Spaces operations in JavaScript, Go, PHP, Python 3, and Ruby.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.