How to create Digital Ocean Space Storage and Generate API Keys

    • Here is a quick step-by-step guide on how do you create a Digital Ocean Space bucket on Digital Ocean and get the credentials to access it. Please consider the official documentation created by Digital Ocean itself for the latest changes and updates

    • Official Documentation by Digital Ocean to create bucket. Click Here

    • Sign in to Digital Ocean Sign in

    • Once logged in find Spaces Object Storage under Manage in sidebar and click on Create Spaces Bucket.

    do
    • This will open a page like below where you can fill all the required details.

    do

      From here, you need to:

        1. Choose a datacenter region. The datacenter region you choose also becomes part of a bucket’s endpoint URL. See a regional availability for Spaces for more information on the available options.

        2. Optionally, enable the Spaces CDN (Content Delivery Network). If you click Enable CDN, you can customize the Edge Cache TTL, which is the amount of time the edge servers cache your content.

        3. Choose to restrict file listing or enable file listing. The visibility of a bucket’s file listing has no effect on the visibility of the files themselves. You can change the file listing visibility at any time after creation.

        4. Choose a unique name for your bucket. The name of the bucket makes up part of its endpoint URL and cannot be changed once it is created. Names must:

        • Be unique among all users in all regions. If the name you choose is already in use, a message appears which says Space already exists.

        • Be between 3 and 63 characters long.

        • Contain only lowercase letters, numbers, and dashes.

        • Begin with a letter or number.

        5. Select a project to add the bucket to.

      After choosing your settings, click Create a Spaces Bucket. This takes you to the newly-created bucket’s Files tab, which displays the files and folders in its root.

Generate Access Key and Secret Key for DigitalOcean Spaces.

    • Find the API tab on sidebar and click on it.

    • This will lead you Application & API page. Select Spaces Keys tab on that page and click on Generate New Key button.

    do
  • This will open a pop up to give a name to your key. Enter name and click Create button.

  • Once you click on Create button, you will get your Access Key and Secret Key.

  • do
  • Copy your Access Key and Secret Key and save it.

    • Now again go to Spaces Object Storage page and click on your bucket.

    • do
    • Here on this page we will collect required credentials.

    • We have already Access Key and Secret key

    • Now, As shown above, on Top left corner you will find DO_SPACE_BUCKET

    • On Top right side, Find the DO_SPACE_REGION between the URL as shown above.

    • Now, If you select Origin Endpoint (Green Box) you will get DO_SPACE_ENDPOINT

    • And Once you add CDN Endpoint (Blue Box) you will get DO_SPACE_URL

Want to talk with us?