This method allows you to connect your own storage server to Fileflare so that you are in control of your own storage and bandwidth. Doing this allows you to pay for your own storage via your Cloudflare account.
Cloudflare also doesn’t charge for bandwidth usage, so you can deliver many terabytes to your customers at no extra cost.
1. Sign up to Cloudflare R2
- Go to Cloudflare.com
- In the left navigation, go to “R2”
- Add your payment details
2. Create a bucket
3. Specify jurisdiction
We will want to specify a jurisdiction so that we know what the “Region” is. We will need to enter this into Fileflare later in this tutorial. Just remember where you set it to.
In this guide, we are using the EU.
Click “Create bucket” once you have set it.
4. In your bucket, click Settings
Go to your “Settings” for the bucket. Here is where we are going to paste some things into Fileflare.
4.1 Copy the URL from “Bucket details”
Copy the URL without the bucket name so that we can paste it to Fileflare in the “Endpoint” box.
Go to Fileflare > Settings > Configure custom S3. Paste the URL to Fileflare’s “Endpoint” box (without the bucket name at the end of the URL).
4.2 Copy and paste the CORS text from Fileflare to Cloudflare
Go back to Fileflare’s custom S3 settings page and copy the below code.
Go to the Cloudflare bucket settings page again. Scroll down until you see the CORS setting. Click on the “Add CORS policy” button.
Paste the CORS text you copied from Fileflare to this box and overwrite the text there and save.
3. Create the API keys
Go to the Overview page and click “Manage R2 API Tokens”.
Create API token.
Make sure you choose “Admin Read & Write”. This is important.
Click the “Create API Token” button to create it.
All you need is the Access Key ID and the Secret Access Key. Copy them to the Fileflare page in the correct boxes.
7. In Fileflare, fill out the final details
In the “Bucket” box, enter your bucket name.
In the “Region” box, enter the region that you selected when creating the bucket. Use the code in the left column in the table below.
|Region text to enter into the “Region” box
|Western North America
|Eastern North America
Because we chosen Eastern EU, we entered “eeur”.
Leave the “Folder” box as it is.
Adjust the checkboxes to suit your needs. We would recommend these settings in the image below.
Now click “Save”, and all should be done.