Logo
← Back to blog

How to connect DigitalOcean Spaces to file.rocks

Cover image

DigitalOcean Spaces speaks the same API as Amazon S3, so file.rocks connects to it with the Other S3-compatible option. Your files stay in your Space, and file.rocks gives you a place to browse and upload them.

You'll set up two things in DigitalOcean first: an access key, and a CORS rule so uploads from your browser go through.

1. Find your bucket's endpoint

Your endpoint is your Space's region followed by .digitaloceanspaces.com. For a Space in New York 3, that's https://nyc3.digitaloceanspaces.com.

Use the region your Space actually lives in. Paste only that regional address, without the bucket name in front of it.

2. Create an access key

In the DigitalOcean control panel, click Spaces Object Storage in the left menu, open the Access Keys tab, and click Create Access Key.

You can limit the key to just this bucket. If you do, give it Read/Write/Delete, because a read only key can't upload.

Copy the secret key as soon as it appears. DigitalOcean only shows it once.

3. Allow uploads with CORS

When you upload in file.rocks, the file goes straight from your browser to your Space. Your Space has to allow that, and file.rocks doesn't set it up for you.

Go to Spaces Object Storage, open the Buckets tab, and click your bucket. Open its Settings tab, and under CORS Configurations, click Add.

Fill in the rule:

  • Origin: https://www.file.rocks
  • Allowed Methods: PUT, GET and HEAD
  • Allowed Headers: Content-Type

Then click Save CORS Configuration. While you're testing, DigitalOcean suggests setting Access Control Max Age to 5 seconds, so a change to the rule shows up quickly in your browser.

4. Open the bucket form

In file.rocks, go to Settings, then Buckets, and click Add Bucket. If you don't have any buckets yet, the button reads Create your first bucket.

The Create Bucket window opens. Under Storage Type, pick Bring Your Own. Then open Provider and choose Other S3-compatible.

5. Fill in the details

Access Key ID and Secret Access Key are the pair you made in step 2.

Endpoint is the address from step 1, starting with https://.

Bucket Name is the name of your Space.

For Region, type us-east-1. That's the value DigitalOcean's docs use for S3 tools, and your real region still comes from the endpoint. If file.rocks fills in something different after you leave the Endpoint or Bucket Name box, change it back to us-east-1.

Nickname (optional) is the name you'll see in file.rocks, like "Spaces nyc3".

You won't see a CORS switch or a Public Domain field for this provider. Those only show up for Backblaze and Cloudflare R2.

6. Save, then check Files

Click Save Bucket. file.rocks doesn't test an S3-compatible connection when you save, so the bucket saves even if a detail is wrong.

Open Files to check. If the files in your Space show up, your keys, endpoint and bucket name are right.

If nothing loads, look at these again:

  • The Access Key ID and Secret Access Key
  • The region in the Endpoint
  • The Bucket Name

7. Upload a test file

Drop a file into Files. If it uploads, your CORS rule is working.

If your files list fine but uploads fail, go back to the CORS rule from step 3. Check that the origin is exactly https://www.file.rocks and that PUT is allowed.

For more on uploading, see how to upload files to your own bucket. If you're still choosing a provider, cheapest cloud object storage compares the options, and the MinIO guide walks through another Other S3-compatible setup.

Your files stay in the bucket you connected, and file.rocks is how you manage them.

How to connect DigitalOcean Spaces to file.rocks | file.rocks Blog