Self-Hosted vs SaaS: The Real Cost When You Scale from 0 to 100K Users
A concrete dollar-by-dollar breakdown of SaaS vs self-hosted infrastructure costs at 0, 1K, 10K, and 100K users — covering auth, database, storage, email, analytics, and the hidden costs no pricing page mentions.
The Hidden Equation No One Talks About
When you're building your first SaaS product, the temptation to reach for managed services is overwhelming — and honestly, justified. Clerk for auth, PlanetScale or Neon for your database, Resend for email, PostHog for analytics. You get a working stack in hours, not weeks. Zero ops burden. Pure product focus.
But at some point, the pricing pages stop feeling friendly. You start doing napkin math. And that math sometimes gets scary.
This article is a concrete, dollar-by-dollar breakdown of SaaS vs self-hosted costs at four user milestones: 0 users, 1,000 MAU, 10,000 MAU, and 100,000 MAU. We cover auth, database, storage, email, analytics, and the hidden costs that never appear on any pricing page.
Auth: Clerk vs Self-Hosted
The SaaS Option: Clerk
Clerk is the gold standard for managed auth in 2025. It handles email/password, OAuth, MFA, session management, and organizations out of the box. The DX is exceptional — you're up and running in under an hour with production-grade security.
Clerk pricing (2025):
- Free tier: Up to 10,000 MAU — $0/month
- Pro plan: $25/month base + $0.02 per MAU over 10,000
- Organizations add-on: $1/org/month
Real costs at each milestone:
- 0–1K MAU: $0
- 10K MAU: $0 (still within the free tier)
- 100K MAU: $25 + (90,000 × $0.02) = $1,825/month
The Self-Hosted Option: Auth.js + Postgres
Auth.js (formerly NextAuth) is free and open source. You own every token, every session, every row. But "free" is not the same as "costless."
- 0–1K MAU: ~$5–15/month (shared VPS or existing server allocation)
- 10K MAU: ~$20–40/month (Redis for sessions, slightly beefier server)
- 100K MAU: ~$80–150/month (dedicated auth service, Redis cluster, HA setup)
The real cost is engineering time. Implementing Auth.js correctly — with PKCE, token rotation, rate limiting, account lockout, brute-force protection, and proper OAuth scopes — takes 2–5 days of senior engineer time. That is $1,500–$4,000 in one-time cost before you have written a single line of product code. Then factor in ongoing security patching when CVEs drop.
Verdict at 100K MAU: Self-hosted wins on pure infra cost (~$120/month vs $1,825/month). But Clerk eliminates the ongoing security maintenance burden entirely. For teams without a dedicated security engineer, Clerk may be worth its cost well past 100K users.
Database: PlanetScale / Neon vs Self-Hosted Postgres
The SaaS Options
Neon (serverless Postgres) is a favorite for early-stage projects:
- Free tier: 0.5 GB storage, limited compute — $0/month
- Launch plan: $19/month (10 GB storage, autoscaling compute)
- Scale plan: $69/month + usage-based compute charges
PlanetScale (MySQL-compatible, branching workflow — now paid-only):
- Scaler plan: $39/month (10 GB, 100M row reads/month)
- Scaler Pro: $99/month (100 GB, unlimited reads)
Real-world costs at scale:
- 0–1K users: $0 (Neon free) to $19/month
- 10K users: $19–69/month depending on data volume
- 100K users: $99–299/month depending on storage and compute
Self-Hosted Postgres
A well-tuned Postgres instance on a $24/month DigitalOcean Droplet (4 GB RAM, 2 vCPU) handles 50K–100K users comfortably for most CRUD-heavy applications. Add a $15/month managed backup service and a $24/month read replica for reporting, and you are running at $63/month — a fraction of managed platform costs at this scale.
The catch is real, though. You must handle:
- Postgres version upgrades and security patches
- Backup verification (not just backups — can they actually restore?)
- Connection pooling via PgBouncer
- Failover logic and health checks
- Query performance monitoring and index maintenance
That is roughly 2–4 hours per month of ops work at steady state — or a critical outage at 2 AM when your primary disk fills up during a traffic spike. The question is not whether incidents will happen; it is whether you have the team to handle them.
Verdict: At 100K users, self-hosted Postgres is genuinely $150–200/month cheaper than managed options. That math works — if someone on your team knows Postgres operations. If they do not, a single serious incident can cost 10× the savings in lost engineer hours and customer churn.
Storage: S3 / R2 vs Self-Hosted MinIO
Object storage is where the math often surprises people — but in the opposite direction from auth.
AWS S3 Pricing
- Storage: $0.023/GB/month
- PUT requests: $0.005 per 1,000
- GET requests: $0.0004 per 1,000
- Data transfer out: $0.09/GB (first 10 TB)
For an app with 100K users where each user stores ~50 MB on average (avatars, documents, media uploads):
- Storage: 5 TB × $0.023 = $115/month
- Requests + egress: ~$50–100/month depending on access patterns
- Total: ~$165–215/month
Cloudflare R2 eliminates egress fees entirely and is often the better choice:
- Storage: $0.015/GB/month
- Zero egress fees
- At 5 TB of data with heavy read traffic: ~$75/month
Self-Hosted MinIO
MinIO is S3-compatible and runs on bare metal or a VPS. At 5 TB, you need meaningful hardware — a dedicated server at $80–120/month or a large cloud VM with attached volumes at similar cost. Factor in RAID configuration, backup storage, and maintenance overhead, and you are not saving much below 50+ TB of data. MinIO shines at very high volumes or air-gapped environments, not at typical SaaS scale.
Verdict: For most teams at 100K users, Cloudflare R2 wins on price and simplicity. Self-hosted storage makes sense only at very high volumes or with strict data residency requirements.
Email: Resend / SendGrid vs Self-Hosted
Email is where managed SaaS almost always wins — and not just on price.
SaaS Email Costs
Resend pricing:
- Free: 3,000 emails/month
- Pro: $20/month for 50,000 emails, then $0.40 per additional 1,000
SendGrid pricing:
- Free: 100 emails/day
- Essentials 100K plan: ~$89.95/month
For 100K users sending roughly 2 transactional emails each per month (auth codes, notifications, receipts) = 200,000 emails/month:
- Resend: $20 + (150 × $0.40) = $80/month
- SendGrid Essentials: ~$89.95/month
Self-Hosted Email
Self-hosting transactional email is the one area where nearly every engineer who has tried it recommends against it. Deliverability is a full-time job. IP reputation management, DKIM/SPF/DMARC configuration, bounce handling, spam complaint feedback loops, IP warming — this is a rabbit hole that consumes weeks of engineering time and can still result in your transactional emails landing in spam folders.
Raw infrastructure cost for a self-hosted setup: $20–50/month. True cost after factoring in engineer time, monitoring, and the inevitable deliverability crisis: dramatically higher.
Verdict: Use Resend. At $80/month for 200K transactional emails, this is the clearest SaaS win in the entire stack. The alternative is not just paying less — it is signing up for ongoing deliverability maintenance that has nothing to do with your product.
Analytics: PostHog Cloud vs Self-Hosted
PostHog Cloud
PostHog has one of the most generous free tiers in the analytics space:
- Free: 1M events/month, 5K session recordings
- Paid: $0.000225 per event beyond 1M
For 100K MAU generating roughly 20 events each per month = 2M events/month:
- First 1M free, next 1M at $0.000225 each = $225/month
Self-Hosted PostHog
PostHog is fully open source and self-hostable. The infrastructure requirements are non-trivial: ClickHouse for event storage, Kafka for ingestion, Redis, and Postgres for metadata. A production-grade self-hosted PostHog deployment costs:
- $100–300/month in infrastructure
- 3–5 days of initial setup time
- Ongoing maintenance: 2–4 hours/month minimum
At 2M events/month, self-hosting saves roughly $100–125/month at the cost of significant operational complexity. Unless you are hitting 50M+ events/month or have strict data sovereignty requirements, the tradeoff rarely makes sense.
Verdict: PostHog Cloud at 100K users is a reasonable $225/month. Self-host only when you are deep in their paid tier (10M+ events/month) or require full data control.
The Full Cost Picture
Fully SaaS Stack (Clerk + Neon + S3 + Resend + PostHog)
- 0 users: $0/month
- 1K MAU: ~$0–20/month
- 10K MAU: ~$50–120/month
- 100K MAU: ~$2,300–2,500/month
Self-Hosted Stack (Auth.js + Postgres + MinIO + Postal + PostHog self-hosted)
- 0 users: $20–50/month (servers run even when idle)
- 1K MAU: $40–80/month
- 10K MAU: $100–200/month
- 100K MAU: $400–700/month
The delta at 100K users is roughly $1,600–2,100/month in favor of self-hosting — approximately $19,000–25,000/year. That is enough to fund a part-time DevOps contractor or a junior infrastructure engineer.
Hidden Costs: What No Pricing Page Shows You
Migration Cost
At some point, circumstances change. Maybe you outgrow Clerk. Maybe a vendor changes their pricing (PlanetScale did exactly this in 2024, moving from a generous free tier to paid-only). Data migrations at scale are expensive: they require careful planning, zero-downtime cutover strategies, and extensive QA. Budget $5,000–20,000 in engineering time for a significant service migration at 100K users. Vendor lock-in is a real risk, and the cost of switching is rarely zero.
Security Maintenance
Self-hosted means you own the security posture entirely. CVE patches on your dependencies, OS-level security updates, penetration testing, compliance work (SOC 2, GDPR, HIPAA depending on your domain). This is not a one-time cost — it is a permanent budget line. Conservatively: $1,000–3,000/month equivalent in engineer time for a properly maintained self-hosted stack. Many teams drastically underestimate this.
Incident Response
SaaS providers maintain 24/7 on-call engineering teams. You probably do not. A single 4-hour outage at 3 AM — your self-hosted Postgres primary running out of disk space, your Redis cache poisoned by a bad deploy, your MinIO cluster losing quorum — costs you in engineer time, customer trust, and potentially significant churn. A single incident where the on-call engineer spends 30 minutes troubleshooting before identifying a corrupted index already represents $300–500 in effective labor cost, before counting the customer impact.
Opportunity Cost
The most invisible cost of all: every hour an engineer spends on infrastructure is an hour not spent building product features. At early stages (0–10K users), this is the dominant cost factor. SaaS services let a two-person engineering team build what would otherwise require a team of five. That leverage is worth real money — it just never appears in an AWS bill.
A Practical Decision Framework
Use SaaS When:
- You are pre-product-market fit (0–10K users)
- Your team has fewer than three engineers
- You lack dedicated DevOps or infrastructure expertise in-house
- The service handles security-critical functionality (auth, payments)
- The SaaS cost represents less than 15% of monthly revenue
Consider Self-Hosting When:
- You have validated product-market fit with stable, predictable growth
- SaaS costs exceed $1,500–2,000/month for a single service category
- You have (or can hire) dedicated infrastructure expertise
- You face data sovereignty, compliance, or privacy constraints
- The service is not security-critical (analytics, bulk storage, internal tooling)
The Hybrid Approach (What Most Smart Teams Actually Do)
The pragmatic answer is never binary. Most teams at 100K users land on a deliberate hybrid:
- Stay SaaS: Auth (Clerk), transactional email (Resend), payments (Stripe) — security-critical, high-maintenance, or compliance-heavy services where vendor expertise is genuinely valuable
- Self-host: Primary database, caching layer, background job workers — infrastructure you control directly and have team expertise in
- Use commodity cloud storage: Cloudflare R2 or S3 — not truly "self-hosted" but dramatically cheaper than higher-abstraction managed options
Conclusion: Math First, Ideology Never
The "self-host everything for sovereignty" crowd and the "managed services always for simplicity" crowd are both right in specific contexts — and both wrong in their absolutism. The correct answer is: do the math for your specific situation, with honest inputs.
At 0–10K users, SaaS is almost always the right choice. Even when individual services look expensive, your engineering time is worth more than the monthly delta. At 100K users, you should absolutely be running the numbers and making deliberate, revisable decisions. At 1M users, self-hosting core infrastructure becomes practically a requirement unless you are a well-funded company that has decided operational simplicity is a strategic investment worth paying for.
The engineers who navigate this transition well are not ideologues. They are people who can read a pricing page, model a growth curve, honestly assess their team's operational capacity, and make a decision they can revisit in six months without shame. Build with that mindset, and you will rarely get it catastrophically wrong.
And when you do get it wrong? That is what migrations are for. Just budget for them accordingly.
Admin
Cal.com
Open source scheduling — self-host your booking system, replace Calendly. Free & privacy-first.
DigitalOcean
Simple VPS & cloud hosting. $200 credit for new users over 60 days.
Comments (0)
Sign in to comment
No comments yet. Be the first to comment!