Skip to content

Cloudflare R2

Integrate Cloudflare R2 with Sngine in a few easy steps.

Create an API token

  1. Go to https://dash.cloudflare.com/ and sign in with your Cloudflare account

  2. Click R2 Object Storage

    Click R2 Object Storage

  3. Click on API then click on Manage API Token

    Click on API then click on Manage API Token

  4. Click Create Account API Token

    Click Create Account API Token

  5. Create the token with the following permissions:

    Create the token with the following permissions:

  6. Copy the Access Key ID, Secret Access Key and S3 client endpoint — you will paste them into Sngine Admin Panel → Settings → Upload Settings

    Copy the Access Key ID, Secret Access Key and S3 client endpoint — you will paste them into Sngine Admin Panel → Settings →…

Create and configure the bucket

  1. You will need to create a bucket, so click on Create bucket

    You will need to create a bucket, so click on Create bucket

  2. You will need to configure the bucket CORS policy, so click on Settings then from CORS Policy section click on Add

    You will need to configure the bucket CORS policy, so click on Settings then from CORS Policy section click on Add

  3. Add the following CORS policy:

    [
      {
        "AllowedOrigins": ["*"],
        "AllowedMethods": ["GET", "HEAD"],
        "AllowedHeaders": ["range"],
        "ExposeHeaders": [
          "Content-Type",
          "Access-Control-Allow-Origin",
          "ETag"
        ],
        "MaxAgeSeconds": 3600
      }
    ]
                      

    Add the following CORS policy:

  4. You will need to use Custom Domain so from Custom Domains section click on Add

    You will need to use Custom Domain so from Custom Domains section click on Add

    You will need to use Custom Domain so from Custom Domains section click on Add

    You will need to use Custom Domain so from Custom Domains section click on Add

Add the keys to Sngine

  1. Finally you need to copy and paste the data in Sngine Admin Panel → Settings → Upload Settings

    Finally you need to copy and paste the data in Sngine Admin Panel → Settings → Upload Settings