Open the CDN zone → Origins tab in my.cubepath.com.

Origins are the backends the CDN pulls content from on a cache miss: your web server, an API, or an S3-compatible bucket. A zone needs at least one before it can serve anything.

Add an origin

Click Add Origin and fill in:

FieldWhat it does
NameA label to recognize this backend
AddressThe hostname or IP of your backend
Protocol / PortHow the edge connects to it
Host HeaderThe Host header sent upstream. Leave empty to use the origin address — set it only when your backend does name-based virtual hosting
Verify SSLValidate the origin's certificate. Keep it on unless the backend uses a self-signed cert
WeightShare of traffic when several origins are active
PriorityWhich origin the edge prefers
Backup OriginOnly used when the primary origins are unavailable
Health Check + pathPeriodically probe the origin so a dead backend is taken out of rotation

Each origin in the list shows a live health status, and can be enabled or disabled without deleting it — which is the clean way to drain a backend before maintenance.

Private S3 buckets (SigV4)

If your origin is an object store and the bucket is private, every unauthenticated fetch gets a 403. S3 Origin Authentication solves this: you give the CDN the bucket credentials once, and each cache miss is signed with AWS Signature Version 4 transparently. Visitors never see the credentials and the bucket stays private.

Your originDo you need this?
Your own web server (Nginx, Apache, custom API)No — plain HTTPS, no signing required
Public S3-compatible bucketNo — anyone can fetch with a plain GET
Private S3-compatible bucketYes — without it every fetch gets 403

Supported providers

Any object store that speaks AWS SigV4 over an S3 API works:

ProviderEndpoint
AWS S3s3.<region>.amazonaws.com
Cloudflare R2<account_id>.r2.cloudflarestorage.com (or <account_id>.eu.r2.cloudflarestorage.com for the EU jurisdiction)
Wasabis3.<region>.wasabisys.com
Backblaze B2s3.<region>.backblazeb2.com
MinIO (self-hosted)Your own endpoint

Configure it

Set up the origin as usual — Origin URL is https://<your-endpoint> with no trailing path, and Host Header stays blank (it's auto-filled with the endpoint hostname; never set it to your CDN domain). Then expand Private bucket (S3 SigV4) and fill in:

FieldValue
Enable SigV4 signingToggle on
Access key IDThe S3-style access key
Secret access keyThe S3-style secret. Write-only — once saved it's never displayed again
RegionLeave blank for R2 (defaults to auto). For AWS / Wasabi / Backblaze use the bucket's region (us-east-1, eu-central-1…)
Services3 (the default, correct for every supported provider)

Save. The credentials propagate to every PoP within a few seconds.

Path mapping, the usual first mistake

S3 treats the first segment of the URL path as the bucket name. So a request for:

https://your-zone.cubecdn.io/videos/clip.mp4

is read by S3 as bucket videos, key clip.mp4. If your files actually live in a bucket called my-media, that bucket doesn't exist and you get a 403, 404 or InvalidBucketName.

Two ways to fix it:

  • Put the bucket name in your URLs. Leave Base path empty and have customers request https://your-zone.cubecdn.io/my-media/path/to/file.mp4. Simplest, but the bucket name is visible.
  • Hide it with Base path. Set Base path to /my-media, and customers request https://your-zone.cubecdn.io/path/to/file.mp4 — the CDN rewrites the path before forwarding. The bucket name never appears publicly.

Credential permissions

Give the credentials the minimum permission neededObject Read is enough for delivery, which is the normal case. Avoid admin keys.

Scope them to only the bucket(s) this zone serves: on R2 use Specify bucket, on AWS write an IAM policy with Resource: "arn:aws:s3:::my-media/*". Don't hand over account-wide access.

Rotating credentials

Regenerate at the provider, then edit the origin, expand Private bucket (S3 SigV4), paste the new Access key ID and Secret access key, and save. Leaving the secret field blank keeps the current one, so only fill it when you're actually rotating.

New credentials propagate in about 30 seconds. Content already cached keeps being served until its TTL expires; only fresh fetches use the new keys.

Cloudflare R2 jurisdictions

R2 buckets live in either the default or the EU jurisdiction, and each has its own endpoint. Point the CDN at the wrong one and R2 returns 421 Misdirected Request even with perfectly valid credentials. Check the bucket's jurisdiction in the Cloudflare dashboard (R2 → bucket → Settings → Location) and match the endpoint.

Error reference

Status / CodeMeaningFix
403 AccessDeniedValid signature, but the credentials lack permission on this bucket/objectCheck the token's bucket scope and resource permissions
403 SignatureDoesNotMatchThe signature itself is wrongRe-enter the secret; verify the region matches the bucket
400 InvalidArgument: AuthorizationThe request reached S3 with no auth at allRe-save the origin; confirm the SigV4 toggle is on
404 NoSuchBucketThe first path segment matches no bucketSee Path mapping above
404 NoSuchKeyRight bucket, wrong object pathVerify the exact key — case matters
421 Misdirected RequestWrong R2 jurisdiction endpoint or account IDSee Cloudflare R2 jurisdictions
503 Service UnavailableOrigin unreachable from the edgeCheck the provider's status page and the endpoint URL

The XML body usually names the exact <Code>. An HTML error body instead means the failure happened in front of S3 — typically the routing/SNI mismatch behind the 421 case.

Constraints

  • All S3-authenticated origins in one zone share the same credentials. The edge signs per backend, not per server. For separate buckets with separate keys, use separate zones.
  • The secret is write-only. If you lose it, regenerate at the provider and re-enter.
  • GET and HEAD only. The CDN doesn't sign PUT/POST/DELETE — it's a delivery network, not an upload pipeline.