Create a Storage Space (optional)

Django is a fantastic in almost all respects. But it isn't optimized for serving media content. If you plan on serving large media files through your application, consider creating a storage space.

Django is not great at serving static content, it's true. And while we include pre-configured NGINX configurations with our products, you may still want to consider getting a dedicated storage space. Some of our products even come pre-configured for using a Digital Ocean storage space, so all you'll need to do is enter in your credentials. But in all honesty, this should only be necessary if you are intent on serving large static media volumes, or intend on building an application which allows users to upload large static files.

Note that you may also reference the Digital Ocean guide for these steps.

Create your Space

To get started, access your Digital ocean dashboard, and find the 'Create > Spaces' option. You'll be presented with a couple of options, which we will work through step-by-step below.

Choose a Region

As with the droplet and managed database, you'll need to select a region to locate your space. We recommend you locate this in the same region as your droplet if possible. Or at least in as close proximity as possible.


Next, you'll have the option of enabling a Content Delivery Network (CDN). This service provides some performance improvement by caching your files at the edge. It's optional, and not necessary. So you may want to leave this as disabled so you can simplify the setup.

File Listing

Finally, you need to select whether you would like to allow anonymous users (those not accessing the space through your application for example) with permissions to list your space content. Make the choice, but do note that selecting 'restricted' won't make your files private. For that, you'll need to ensure you change the file property manually through Digital Ocean's space browser, or ensure that you are uploading the file using our custom private media storage class.