DigitalOcean Spaces
DigitalOcean Spaces is S3-compatible storage with a built-in CDN you can switch on for each Space.
-
Create a Space. In the DigitalOcean control panel, create a Space in the region you want. If you like, turn on its CDN.
-
Create a Spaces access key. Under Spaces Object Storage → Access Keys, create a key. Copy the key and the secret. The secret is shown only once.
-
Note the endpoint and region. The endpoint is the region address, for example
https://nyc3.digitaloceanspaces.com. The region is the first part:nyc3. -
Fill in OmniOffloader. Go to OmniOffloader → Settings, choose DigitalOcean Spaces and fill in the fields below.
-
Click Test Connection, then save your settings.
Fields
Section titled “Fields”| Field | Example | Notes |
|---|---|---|
| Spaces Access Key | DO00… |
Your Spaces access key. |
| Spaces Secret Key | •••••••• |
Never shown again after you save. |
| Endpoint URL | https://nyc3.digitaloceanspaces.com |
The region endpoint. Do not put the Space name in front of it. |
| Region | nyc3 |
Must match the endpoint. |
| Space / Bucket Name | my-site-media |
The name of your Space. |
| Custom Domain / Spaces CDN URL (Optional) | https://media.yourdomain.com |
Your Spaces CDN address or custom CDN domain. |
If you leave the last field empty, media is served from https://<space>.<region>.digitaloceanspaces.com.
Good to know
Section titled “Good to know”- Files must be readable by the public. If an offloaded image opens with an
AccessDeniederror, your Space’s files are private. Make them public in the Space’s settings or with a bucket policy. Developers can also set apublic-readACL on every upload with theomnioffloader_object_aclfilter — see Hooks. - Caching. If you replace files and see old versions, turn on Object Versioning in Settings. See Path prefix & object versioning.
Common problems
Section titled “Common problems”| What you see | Likely cause |
|---|---|
Connection failed: … 403 … |
The key or secret is wrong, or the key has no access to this Space. |
Connection failed: … NoSuchBucket … |
The Space name has a typo, or the endpoint is in a different region than the Space. |
| Test Connection works but images are broken | The files are private, or the CDN address is wrong. Open an offloaded file’s URL in a new tab to see the error. |
Next step: Quick start — offload your first files.