If you’re choosing object storage for a VPS-backed app, cloudflare r2 vs s3 is the comparison that keeps coming up—mostly because bandwidth costs can quietly become your biggest bill after compute. Both store blobs reliably, but they behave very differently once you factor in egress, latency, and the way you’ll actually deploy on VPS platforms.
Pricing reality: egress is the fight
Amazon S3 is the default choice because it’s everywhere and “just works.” The catch is that S3 pricing isn’t just about storage and requests. For many VPS-hosted workloads (image-heavy sites, downloads, backups served to users), data transfer out can dwarf everything else.
Cloudflare R2’s main pitch is simple: no egress fees when serving data out of R2 (especially compelling when paired with Cloudflare’s network). In practice, that changes architecture decisions:
- With S3, you often add a CDN to reduce origin egress and improve performance.
- With R2, you’re less punished for being popular, so your cost curve is easier to predict.
Opinionated take: if your app is bandwidth-heavy or you’re serving public assets at scale, egress dominates. In that case, R2 is hard to ignore.
Performance & architecture for VPS workloads
For VPS hosting, you typically care about two paths:
- Server-to-storage (your app server reads/writes objects)
- User-to-storage (users fetch assets, downloads, media)
S3 has a massive ecosystem, lots of regional options, and mature tooling. If your VPS is in the same AWS region, latency is usually excellent.
R2 sits behind Cloudflare’s edge network. That’s great for global distribution, but your mileage depends on where your VPS runs and how you access R2. If your VPS is on Hetzner in Germany or on digitalocean in NYC, you’re not “inside AWS,” so the traditional S3 advantage (same-region proximity) may not apply anyway.
A practical VPS pattern:
- Put your compute where it’s cheap and stable (VPS provider of choice).
- Put object storage where bandwidth won’t hurt.
- Use a CDN layer for public assets.
R2 often simplifies that last part because it’s designed to be CDN-adjacent from day one.
Compatibility, tooling, and API gotchas
S3 wins on sheer compatibility: every backup tool, SDK, and data pipeline supports it.
R2 supports the S3-compatible API, which is a big deal, but “compatible” doesn’t always mean “identical.” Expect occasional edge cases:
- Certain advanced S3 features or behaviors may differ.
- Some enterprise workflows assume AWS IAM policies, AWS-native eventing, or deep integrations.
For most VPS-hosted apps—static assets, user uploads, backups—the S3 API compatibility is enough. If you run lots of off-the-shelf tooling, S3 remains the safest “it will definitely work” choice.
Actionable example: using rclone from a VPS
If you just want object storage for backups (a common VPS need), rclone is the simplest path. Here’s a minimal example syncing a local directory to an S3-compatible remote (works for S3 and typically for R2 with the right endpoint/keys):
# 1) Configure a remote (interactive)
rclone config
# Create a new remote, choose "s3" as the type.
# For AWS S3: set provider "AWS".
# For Cloudflare R2: set provider "Other" and use R2 access keys + endpoint.
# 2) Sync a VPS directory to a bucket
rclone sync /var/www/uploads myremote:my-bucket/uploads \
--progress \
--transfers 8 \
--checkers 16 \
--s3-chunk-size 64M
# 3) Optional: verify what changed
rclone check /var/www/uploads myremote:my-bucket/uploads
Opinionated take: for VPS backups, the decision is less about “features” and more about predictability. If you expect large restores or frequent downloads, egress is the hidden tax—R2’s model is easier to live with.
When I’d pick R2 vs S3 (and a soft VPS note)
Here’s the blunt decision rubric I use:
Pick Cloudflare R2 if:
- You serve a lot of public assets or downloads and want to minimize bandwidth surprises.
- You’re already using Cloudflare (DNS/CDN/WAF) and want tighter integration.
- Your compute is on a VPS provider (not AWS), so S3’s same-region advantage is less compelling.
Pick Amazon S3 if:
- You need maximum ecosystem compatibility and battle-tested integrations.
- You’re already deep in AWS (IAM, event notifications, analytics pipelines).
- You have strict requirements around specific AWS regions/services.
Soft VPS hosting note: if your goal is cost-efficient compute plus scalable object storage, pairing a reasonably priced VPS from providers like hetzner or digitalocean with Cloudflare’s edge stack can be a pragmatic combo—especially when your storage egress would otherwise dominate the monthly bill.
Some links in this article are affiliate links. We may earn a commission at no extra cost to you if you make a purchase through them.
Top comments (0)