Logo
← Back to blog

How to connect IDrive e2 to file.rocks

Cover image

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

You'll set up three things at IDrive first: an enabled region, an access key, and a CORS rule so uploads from your browser go through. All three happen in the IDrive e2 web console, so you won't need a terminal.

1. What you need

  • Your Access Key ID
  • Your Secret Access Key
  • Your region's endpoint, like https://s3.us-west-1.idrivee2.com
  • Your bucket name

2. Enable a region and find your endpoint

Sign in to IDrive e2 and open the Dashboard. The Enabled regions section shows the endpoint URL for each region you've turned on.

To add one, click Add New Region, pick a region from the dropdown, and click Enable.

Your endpoint is s3., then your region code, then .idrivee2.com. A few examples from IDrive's endpoint list:

  • Oregon: https://s3.us-west-1.idrivee2.com
  • Virginia: https://s3.us-east-1.idrivee2.com
  • Ireland: https://s3.eu-west-1.idrivee2.com
  • Singapore: https://s3.ap-southeast-1.idrivee2.com

Use the endpoint for the region your bucket is in. Paste it with https:// in front and without the bucket name.

If you don't have a bucket yet, click Create Bucket on the Dashboard and pick the region you just enabled.

3. Create an access key

Open the Access Key tab and click Create Access Key. Give it a name you'll recognize, like "file-rocks".

Pick a region from the list of enabled regions. Choose the one your bucket is in. Then set an expiry date and time for the key.

For permission, choose Read and write. IDrive will then ask how you want to handle object and bucket deletion.

Under buckets, pick the bucket you want to connect. IDrive selects all buckets by default, so narrow it down if you only want this one.

Click Create Access Key. Copy the Access Key ID and Secret Access Key, or download them, before you close the window.

4. Allow uploads with CORS

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

In IDrive e2, go to Buckets, hover over the bucket and open its settings. Open the Bucket CORS tab and click Add CORS.

IDrive asks for the rule in JSON. Here's an example that uses standard S3 fields. Paste it, then click Apply:

{
  "CORSRules": [
    {
      "AllowedOrigins": ["https://www.file.rocks"],
      "AllowedMethods": ["PUT", "GET", "HEAD"],
      "AllowedHeaders": ["Content-Type"]
    }
  ]
}

file.rocks needs PUT because that's how your browser sends the file. GET and HEAD let it read what's there.

Set this on the bucket's own Bucket CORS tab. IDrive has discontinued the older region-level CORS setting.

5. 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.

6. Fill in the details

Access Key ID and Secret Access Key are the pair from step 3.

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

Bucket Name is just the name of your bucket.

For Region, type your region code, like us-west-1. If file.rocks puts in something different after you leave the Endpoint or Bucket Name box, change it back to your region code.

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

7. 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 bucket 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. IDrive's endpoint list says to "select the one that matches your bucket's region."
  • The Bucket Name, and that it's one of the buckets you assigned to the key

8. Upload a test file

Drop a small file into Files and see if it lands.

If your files list fine but uploads fail, check the CORS rule from step 4 first. Open the Bucket CORS tab again and make sure the origin is exactly https://www.file.rocks and PUT is in the list.

If the rule looks right, check the key. It needs Read and write, not Read only. Make a new key with Read and write for this bucket, then update the keys in file.rocks.

For more on uploading, see how to upload files to your own bucket. To send a file to someone, see how to share a file from your own bucket. The Storj guide, the Contabo guide, the Scaleway guide and the Hetzner guide walk through other Other S3-compatible setups.

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

How to connect IDrive e2 to file.rocks | file.rocks Blog