If you’re running a VPS and trying to pick object storage, cloudflare r2 vs s3 is the comparison that keeps coming up—mostly because egress bills can quietly become your largest “surprise” expense.
What you’re really choosing: economics vs ecosystem
Amazon S3 is the default because it’s everywhere: every tool supports it, every SDK is battle-tested, and every ops person has touched it. But S3’s pricing model (especially egress and request costs) is the tax you pay for that gravity.
Cloudflare R2’s pitch is blunt: S3-compatible object storage with no egress fees (within Cloudflare’s network). That changes the math for VPS-hosted apps that push lots of media, backups, or downloads.
On a typical VPS stack—say compute on digitalocean or hetzner—object storage is often the first service you “outgrow” from a local disk. The key question isn’t “Which is better?” but “Which failure mode do I prefer?”
Pricing: egress is the whole game (for most VPS workloads)
For many VPS-hosted products, object storage cost is dominated by data leaving the storage service.
When S3 hurts:
- Serving user-uploaded images/videos directly from the bucket
- Download-heavy assets (game patches, datasets, binaries)
- Analytics exports and frequent cross-region transfers
When S3 is fine:
- Backups you rarely restore
- Internal-only objects (no public delivery)
- Workloads already inside AWS (egress can be low depending on architecture)
Where R2 tends to win:
- Public content delivery where egress is constant and unpredictable
- Multi-tenant SaaS apps where “a few power users” can spike bandwidth
Opinionated take: if you’re on a VPS provider because you want predictable bills, S3’s egress model is philosophically mismatched. R2 aligns better with the “flat-cost” mindset.
Performance and latency: it depends where your users are
S3 has mature regional infrastructure and lots of knobs: multiple storage classes, replication options, and deep integrations. If you need strict region placement, compliance tooling, or advanced lifecycle policies, S3 is still the benchmark.
R2 performance is generally good, but the real advantage is how naturally it pairs with Cloudflare’s edge. If you already use cloudflare for DNS/CDN/WAF, R2 can reduce hops and simplify delivery paths.
Practical VPS angle:
- If your compute is in a single region (common on hetzner or digitalocean) and your users are global, you’ll care more about CDN behavior than raw bucket latency.
- If your compute and users are mostly in one geography, S3 in the closest region is hard to beat for consistency.
Compatibility and tooling: S3 wins by inertia, R2 wins by “good enough”
S3 is the canonical API in object storage. Everything supports it. R2’s S3 compatibility is good enough for most apps, but there are edge cases:
- Some advanced S3 features aren’t present or differ (specific ACL behaviors, certain replication patterns, niche headers).
- Operational tooling is richer on S3 (policies, auditing, IAM depth).
That said, for a VPS-hosted app, you often just need:
- Put object
- Get object
- List objects
- Signed URLs
- Lifecycle expiration
If that’s your checklist, R2 is usually fine.
Actionable example: use AWS CLI with R2 from your VPS
If you already script backups with the AWS CLI, you can point it at R2 with a custom endpoint. On Ubuntu/Debian:
# 1) Install AWS CLI (v2 recommended)
aws --version
# 2) Configure credentials (store access key + secret)
aws configure --profile r2
# 3) Upload a file to an R2 bucket using the S3 API endpoint
# Replace <account_id>, <bucket>, and the file path.
aws s3 cp ./backup.tar.gz s3://<bucket>/vps-backups/backup.tar.gz \
--profile r2 \
--endpoint-url https://<account_id>.r2.cloudflarestorage.com
# 4) List files
aws s3 ls s3://<bucket>/vps-backups/ \
--profile r2 \
--endpoint-url https://<account_id>.r2.cloudflarestorage.com
This keeps your existing S3-shaped automation while changing the cost profile.
Decision matrix for VPS hosting (what I’d pick)
Here’s the blunt version.
Choose S3 if:
- You need advanced AWS-native features (IAM complexity, replication, storage classes, compliance tooling)
- Your workloads already run in AWS (you’re optimizing for integration, not bill simplicity)
- You rely on a third-party product that assumes “real S3” behavior everywhere
Choose Cloudflare R2 if:
- You serve lots of public downloads/media and want to kill egress surprises
- You already front traffic with Cloudflare CDN and want a simpler delivery path
- You’re on VPS providers like digitalocean/hetzner and want object storage that doesn’t punish growth
Nuanced call: if your app is early-stage but you’re confident bandwidth will grow, starting on R2 can save a migration later. If your app is enterprise-ish with compliance and auditing needs today, S3 is the safer default.
Final thoughts (and a soft path forward)
In 2026, “object storage” is largely a commodity—until billing and distribution show up. For most VPS_HOSTING scenarios, R2’s no-egress model is the practical differentiator, while S3’s differentiator is the surrounding AWS ecosystem.
If you’re already deploying on digitalocean or hetzner and using cloudflare for edge/security, testing R2 for a single bucket (logs, media, or backups) is a low-risk way to validate performance and costs before committing across your whole stack.
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)