DADI has rebranded to Edge. Find out more.

How to Configure DADI CDN for Digital Ocean Spaces

Since the very beginning, DADI CDN has had built-in support for serving assets from Amazon S3 buckets. Released earlier this week, DADI CDN 3.0 ships with additional support for Digital Ocean Spaces.

Image

Spaces uses an S3-compatible API and, as such, the existing S3 configuration in CDN is almost all that’s needed to connect your CDN installation to your Digital Ocean Space - only one extra endpoint configuration property is required to tell CDN where to find your assets.

"images": {
  "s3": {
    "enabled": true,
    "accessKey": "your-access-key",
    "secretKey": "your-secret",
    "bucketName": "your-space-name",
    "region": "your-region",
    "endpoint": "your-digital-ocean-endpoint" // new endpoint configuration
  }
}

🔗Configuring CDN for Digital Ocean Spaces

🔗Creating a Space

If you don’t have a Space already, click the “Spaces” menu item in your Digital Ocean account to load the Spaces overview, then “Create a Space”. Give your Space a name, choose a region and click “Create a Space” to finish.

Image
Image
Image

When creating a Space you are given a URL for the Space that contains the Space name and the region you selected:

https://<name>.<region>.digitaloceanspaces.com

The endpoint for configuring CDN is the <region>.digitaloceanspaces.com portion of this URL, for example sgp1.digitaloceanspaces.com. Add this to the endpoint property in CDN’s S3 configuration block:

"images": {
  "s3": {
    "enabled": true,
    "accessKey": "your-access-key",
    "secretKey": "your-secret",
    "bucketName": "cdn-demo",
    "region": "sgp1",
    "endpoint": "sgp1.digitaloceanspaces.com"
  }
}

🔗Access Keys

Spaces access keys can be found under the “API” menu when logged into your Digital Ocean account. If you don’t have one already, generate a new key and use the key and secret in the S3 configuration block in your CDN configuration file:

"images": {
  "s3": {
    "enabled": true,
    "accessKey": "KJGWLK7S4DON3R5TNAKT",
    "secretKey": "your-secret",
    "bucketName": "cdn-demo",
    "region": "sgp1",
    "endpoint": "sgp1.digitaloceanspaces.com"
  }
}

Image
Image
Image

🔗Further reading

The above information (and a lot more besides) can be found in the latest CDN documentation at https://docs.dadi.cloud/cdn/3.2#amazon-s3-and-digital-ocean-spaces.

Related articles

More tutorials articles
Mail icon

Like what you are reading? Want to earn tokens by becoming an Edge Node? Save money on your hosting services? Build amazing digital products on top of Edge services? Join our mailing list.

To hear about our news, events, products and services, subscribe now. You can also indicate which services you are interested in, which we use for research and to inform the content that we send.

* You can unsubscribe at any time by emailing us at data@edge.network or by clicking on the unsubscribe link which can be found in our emails to you. Read our Privacy Policy.
Winner Best Edge Computing Platform Technology & Innovation Awards
Presented by Juniper Research