How to Configure DigitalOcean Spaces CDN
This guide follows DigitalOcean’s official Spaces documentation to create a bucket and Spaces access keys, then paste them into XFile Ultra.
Sources: Create a Spaces bucket · Manage access / access keys · Configure CORS · Control panel: https://cloud.digitalocean.com/
---
Where this goes in XFile Ultra
Admin → Servers → Servers management → Add new CDN (or edit an existing CDN)
Provider: DigitalOcean Spaces
---
What to paste into XFile Ultra
| XFile Ultra field | Copy from DigitalOcean |
|---|---|
| Access key ID | Spaces Access Key |
| Secret access key | Spaces Secret Key (shown once) |
| Bucket name | Exact Spaces bucket name |
| Region | Datacenter region slug (e.g. nyc3, sfo3, ams3, fra1) |
| Public / custom domain URL | Optional |
You do not paste a separate endpoint. XFile Ultra uses https://<region>.digitaloceanspaces.com.
---
Step 1 — Create a Spaces bucket
Per How to Create a DigitalOcean Spaces Bucket:
1. Sign in to the DigitalOcean Control Panel
2. In the left menu, click Spaces Object Storage
3. In the top right, click Create Bucket (opens Create a Spaces Bucket)
4. Under Choose a datacenter region, pick a region (or open Additional datacenter regions). Note the region slug — it becomes part of the endpoint (examples: nyc3, fra1). Region cannot be changed later
5. Under Choose a Storage type, choose Standard Storage
- Do not choose Cold Storage for XFile Ultra with Performance mode — Cold Storage does not support CORS / CDN features you need for browser uploads
6. Under Content Delivery Network (CDN), optionally enable CDN (only available on Standard Storage). Not required for XFile Ultra to work
7. Under Finalize → Choose a unique Spaces Bucket name:
- 3–63 characters
- Lowercase letters, numbers, dashes only
- Must start with a letter or number
- Globally unique among Spaces users
8. Under Select a project, pick a project
9. Review Summary (top right) → click Create a Spaces Bucket
You land on the bucket’s Files tab. The origin endpoint appears on the top right of the bucket overview (for your records). For XFile Ultra you only need the name + region slug.
---
Step 2 — Create a Spaces access key
Per How to Manage Access to DigitalOcean Spaces:
Spaces access keys are created only in the Control Panel (not via doctl / DigitalOcean API).
1. Left menu → Spaces Object Storage
2. Open the Access Keys tab
3. Click Create Access Key (opens Create Access Key)
4. Under Select access scope:
- Choose Full access for the simplest XFile Ultra setup (all S3 APIs on all buckets, including CORS configuration — so auto CORS often works)
- Or Limited access: select your bucket and set Permissions to Read/Write/Delete (you may need to set CORS manually later)
5. Under Give this access key a name, keep the generated name or enter one (alphanumeric, dashes, periods only)
6. Click Create Access Key
7. On the Access Keys tab, copy:
- The Access Key
- The Secret Key immediately — DigitalOcean shows it only once
If you lose the secret: on that key’s row click … → Regenerate key → confirm → copy the new secret and update XFile Ultra.
---
Step 3 — Map values into XFile Ultra
| Field | Value |
|---|---|
| Access key ID | Access Key from Step 2 |
| Secret access key | Secret Key from Step 2 |
| Bucket name | Bucket name from Step 1 |
| Region | Region slug from Step 1 (e.g. nyc3) |
Finish in XFile Ultra
1. Open Admin → Servers → Servers management → Add new CDN (or edit an existing CDN)
2. Choose the matching CDN provider
3. Paste every value from the “What to paste” table
4. Leave Performance mode on unless you want uploads to proxy through your VPS
5. Set the server status to ON when ready
6. Click Test connection
7. Click Save
If Test connection succeeds but says Performance mode requires bucket CORS, open Performance mode requires bucket CORS and paste the rule for your provider.
---
Common problems
Bucket not found / wrong region or endpoint
The bucket name must match exactly. The region (or Contabo / IDrive endpoint, or Cloudflare Account ID) must be the one for that bucket.
Access denied / bad credentials
Wrong Access Key ID or Secret Access Key, or the key cannot read/write that bucket. Create a new key with the right permissions and paste again.
Secret key lost
Almost every provider shows the secret once. You cannot look it up later — create or regenerate a key, update XFile Ultra, and stop using the old key.
Test connection OK, browser upload fails
Usually CORS. Use the Performance mode CORS article, or turn Performance mode off temporarily while you fix it.
Manual CORS (if Test connection asks for it)
Per DigitalOcean CORS docs:
1. Left menu → Spaces Object Storage
2. Under Buckets, open your bucket
3. Open the Settings tab
4. Under CORS Configurations, click Add
5. Paste origins / methods / headers from Performance mode requires bucket CORS → Save CORS Configuration