YouTube clone cost

Two line items decide the bill. Storage grows with what you upload — slow, predictable, cheap. Egress grows with what people watch — unbounded and, on most clouds, expensive. On Cloudflare the second one is zero, and that single fact is the reason this project exists.

The free tier, in numbers

ResourceFree allowance
R2 storage10 GB-month
R2 Class A operations (writes, lists)1,000,000 / month
R2 Class B operations (reads)10,000,000 / month
R2 egress to internet$0 — no charge
D1 storage5 GB
Workers requests100,000 / day
Workers CPU per invocation10 ms

Allowances as of writing; Cloudflare adjusts them. Confirm againstR2, D1and Workers pricing before you plan around them.

What it costs to serve video

Take one 50 MB video watched 1,000 times — 50 GB delivered. Storage is the same in every row below; only the delivery model changes:

Serving 50 GBDelivery cost
Cloudflare R2$0.00
Amazon S3, us-east-1≈ $4.50
Metered VPS bandwidth≈ $0.50 – $2.50

The S3 figure assumes roughly $0.09/GB. Scale it up and the shape of the problem becomes clear: 50 GB is a rounding error, but a video that takes off can push terabytes, at which point egress — not storage, not compute — is your entire bill.

Where the free tier actually runs out

Storage is rarely first. 10 GB holds roughly three hours of 1080p, and R2 charges about $0.015/GB-month beyond it, so even 100 GB costs around a dollar a month. The binding constraint is usually Worker requests.

TubeForge proxies every read through a Worker so the bucket stays private. That means each playback triggers several Range requests, and each one is a billable invocation. Depending on bitrate and how aggressively the player buffers, a single view might cost anywhere from a handful to a couple of dozen requests — so 100,000/day is on the order of a few thousand views per day, not hundreds of thousands.

That is a deliberate trade. The alternative is a public bucket behind a custom domain: zero Worker invocations for playback, but anyone who finds a URL can hotlink your video and the bandwidth is yours either way. Proxying keeps the bucket closed at the cost of spending request quota on it.

When to move to a paid plan

The honest caveat

TubeForge stores what you upload and never re-encodes, which is exactly why the numbers above stay small. A full video platform with adaptive bitrates, thumbnails generated server-side and multiple renditions per upload is a different cost curve — CPU-time dominated, and not something this project pretends to solve. What it demonstrates is that the storage and delivery half of a YouTube clone can run for nothing.

Where to go next

What a YouTube clone is made ofFork and deploy itEstimate a file's size