dm3yb.dev brand logodm3yb.dev
DigitalOcean

Complex to Simple: DigitalOcean Spaces

DigitalOcean Spaces is a simple, scalable cloud storage solution for managing files like media, backups, and logs outside your application. With S3 compatibility, stateless architecture support, and easy setup, it’s a practical choice for handling data efficiently while keeping your app lightweight and independent.

Published
December 14, 2025
Dmytro Bobryshev Profile
Written by
Dmytro Bobryshev
Reading time
2 min read
DO Detail

What is DigitalOcean (DO) Spaces ?


DigitalOcean Spaces - is a cloud storage service, where you can keep all your digital items in a “spaces bucket” — our special cloud-based folder.

Usage

Features

Stateless architecture

No worries about disk space

Backups

Independent storage

Archive logs

External service that manages data storage

Media data (photos, videos, docs, etc.)

Sharing access

Personal / Secret data (contracts, invoices, passports, etc.)

Ability to have Stateless architecture


Differences between DO Spaces & AWS S3


DigitalOcean Spaces

AWS S3

Very simple console

Functional console

Compatible with S3 API

  • External CDN support
  • ACL policy

Compatible with AWS services such as:

  • Amazon CloudFront (for content delivery)
  • Amazon Glacier (for long-term archival)
  • AWS Lambda (for server-less computing)

Scalability: Petabyte-scale

Scalability: Virtually unlimited


Video/image compressor/convertor

DO ConsoleAWS S3 Console


How to create DO Space ?


  1. Go to the DigitalOcean Console
  2. Choose the “Spaces Object Storage“ in the sidebar
DO Sidebar


DO Console
  1. Click to the “Create Spaces Bucket“ for create single space:
  2. Fill in the following fields in the image shown:
    For most cases on EU projects, Frankfurt will be the best option as it is supposed to be in the same data center as the VPS/Database
Create DO spaces
  1. Paste the shown DO variables to config and Forge environments.


Setup DigitalOcean CORS domains


if you see the same error, follow the steps below:
Show CROS Errors the Console

1. Select the Relevant Project and Space:

  1. In the sidebar, choose the project or DO spaces directly.
  2. Select the space or spaces (if we have more that one).

Select DO Spaces
  1. Update CORS Configurations
Add new CORS settingConfiguring CORS
All "API" or "Monolith apps" domains could support all HTTP methods (GET, PUT, DELETE, POST, HEAD). The basic domain (like apps which only reached the content from API) could only allow the GET method for enhanced security, limiting interactions to data retrieval.

Example configuration:


# API or Monolith apps domains:

Origin: https://example-api-domain.com
Allowed Methods: GET, PUT, DELETE, POST, HEAD
Allowed Headers: # No additional headers selected
Access Control Max Age: 0 # set this up by your requirements
# Reached content domains:

Origin: https://example-domain.com
Allowed Methods: GET
Allowed Headers: # No additional headers selected
Access Control Max Age: 0 # set this up by your requirements 


Implement DO Spaces to Laravel Project


  1. Install the following package to your Laravel project:
  2. Update configs:
-  'default_media_disk_name' => 'media',
+  'default_media_disk_name' => 'do_spaces',
Don’t forget add/update variables to “Environments“
/* filesystems.php config file */

'do_spaces' => [
    'driver' => 's3',
    'key' => env('DO_SPACES_KEY'),
    'secret' => env('DO_SPACES_SECRET'),
    'endpoint' => env('DO_SPACES_ENDPOINT'),
    'region' => env('DO_SPACES_REGION'),
    'bucket' => env('DO_SPACES_BUCKET'),
],
Currently available for new projects

Let’s build something great together!

Have an idea, product, or challenge in mind? I help startups and businesses turn concepts into scalable, high-performing digital experiences through thoughtful design and modern technology.

Book a call