Running Puppeteer on a $24/month DigitalOcean droplet sounds cheap until you add the hours spent debugging memory leaks at 2 AM, patching Chromium every four weeks, restarting crashed browser processes, watching disk swap spike when RAM runs out. I broke down the real cost of self-hosted screenshots at five volume tiers and compared each one against ScreenshotRun's API pricing. The numbers cover infrastructure, engineering time, monitoring overhead, the extras that most cost comparisons conveniently leave out.
The self-hosted cost breakdown
Self-hosting means running headless Chromium on your own servers. The direct server cost is the easy part. The harder part is everything around it.
Server and compute
Headless Chrome is hungry. A single browser instance with one active page consumes 300–500 MB of RAM. Each additional tab adds another 60–90 MB on top of that. In practice, a 4 GB VPS handles 4–5 concurrent captures before it starts swapping to disk and slowing everything down. An 8 GB server gets you roughly 10–15 concurrent renders.
| Provider | Config | Concurrent captures | Monthly cost |
|---|---|---|---|
| DigitalOcean | 2 vCPU / 4 GB | 4–5 | $24 |
| DigitalOcean | 4 vCPU / 8 GB | 10–15 | $48 |
| AWS EC2 t3.medium | 2 vCPU / 4 GB | 4–5 | $30 |
| AWS EC2 t3.xlarge | 4 vCPU / 16 GB | 20–30 | $121 |
| Hetzner CPX21 | 3 vCPU / 4 GB | 4–5 | $8 |
| Hetzner CPX31 | 4 vCPU / 8 GB | 10–15 | $15 |
Hetzner is notably cheaper than AWS or DigitalOcean — roughly 2–4x less for comparable specs. If you are optimizing purely for server cost, Hetzner changes the math. But the server is the smallest line item once you factor in everything else.
Engineering time
This is where self-hosted costs balloon. A developer who posted on dev.to documented spending 40+ hours making Puppeteer production-ready: 8 hours on browser pooling, 6 hours on timeout and retry logic, 4 hours building a caching layer, 4 hours on monitoring, 16+ hours chasing edge cases (blank screenshots, memory leaks, zombie processes, pages that hang indefinitely).
That initial build is a one-time cost. The ongoing maintenance is not. Chrome ships a major update roughly every four weeks. Each update can break existing screenshot logic — font rendering shifts, new sites roll out stricter anti-bot walls, memory leak patterns change between Chromium versions, viewport quirks appear on pages that worked fine the week before.
| Volume tier | Maintenance hours/month | At $50/hr | At $75/hr |
|---|---|---|---|
| Under 5K/mo | 2–4 hours | $100–200 | $150–300 |
| 5K–50K/mo | 4–8 hours | $200–400 | $300–600 |
| 50K–100K/mo | 8–15 hours | $400–750 | $600–1,125 |
The $50/hr rate is conservative for a mid-level DevOps or backend engineer in 2026. Senior engineers or US-based contractors run $75–100/hr. Even at $50/hr, 4 hours of monthly maintenance adds $200 on top of whatever you spend on servers.
Infrastructure extras you will need
Running headless Chrome in production is not just "start the browser, take a screenshot." You also need:
A queue layer (Redis or SQS) to batch requests when traffic spikes — $15–25/month. Monitoring through Datadog, CloudWatch, Grafana, or a self-hosted ELK stack — $20–50/month given the volume of logs Chrome generates. Object storage for output files on S3 or equivalent runs $10–20/month depending on retention. If you serve screenshots to end users for link previews or thumbnails, you also need a CDN for edge caching — another $10–50/month.
Two more line items tend to surprise people. Residential proxies for multi-country screenshots cost $50–200/month. Without them, every screenshot looks like it was taken from your server's data center. Font packages — CJK, Arabic, Devanagari, Thai — add 500 MB+ to your image and need manual updates. No direct dollar cost there, but broken fonts produce broken screenshots, which produce debugging sessions.
Add those up and infrastructure extras run $105–345/month beyond the base server cost. Most "Puppeteer is cheap" arguments ignore every item on this list.
The API cost breakdown
A managed screenshot API bundles everything above into a single monthly price. The math is straightforward because there is one line item.
| ScreenshotRun plan | Screenshots/mo | Price | Per screenshot |
|---|---|---|---|
| Free | 200 | $0 | $0 |
| Starter | 3,000 | $9 | $0.003 |
| Pro | 15,000 | $29 | $0.0019 |
| Growth | 50,000 | $79 | $0.0016 |
| Business | 100,000 | $119 | $0.0012 |
Every plan includes features that cost extra on the self-hosted side: stealth mode for anti-bot bypass (no proxy vendor needed), geolocation from multiple countries, CDN-cached delivery, pre-installed font libraries for CJK and Arabic rendering, ad blocking, automatic retries on failure, queue management behind the scenes. Zero DevOps on your end.
Total cost of ownership: side by side
This table combines server cost, engineering time (at $50/hr), infrastructure extras for the self-hosted column. I used Hetzner pricing for the server (the cheapest option), the low end of engineering hours at $50/hr, and scaled infrastructure extras to each volume tier. This is intentionally conservative — favorable to self-hosting. The API column is the ScreenshotRun plan price.
| Monthly volume | Server | Engineering | Extras | Self-hosted TCO | ScreenshotRun | Savings |
|---|---|---|---|---|---|---|
| 1,000 | $8 | $100 | $45 | $153 | $9 | $144/mo (94%) |
| 5,000 | $8 | $200 | $65 | $273 | $29 | $244/mo (89%) |
| 15,000 | $15 | $300 | $95 | $410 | $29 | $381/mo (93%) |
| 50,000 | $30 | $500 | $200 | $730 | $79 | $651/mo (89%) |
| 100,000 | $60 | $750 | $345 | $1,155 | $119 | $1,036/mo (90%) |
At every volume tier, the API is cheaper. The gap is widest in percentage terms at low volumes (94% savings at 1K/month). Even at 100K screenshots per month — using the cheapest possible servers and conservative engineering estimates — self-hosting costs roughly 10x what the API charges.
Three-year projection
TCO compounds. At 15,000 screenshots per month, the three-year difference looks like this:
- Self-hosted: $410 × 36 months = $14,760
- ScreenshotRun: $29 × 36 months = $1,044
- Three-year savings: $13,716
That does not include the initial build time. If the first production-ready setup takes 40 hours at $50/hr, add another $2,000 to the self-hosted column.
What about AWS Lambda?
The serverless path sounds appealing — pay only for what you use, no idle servers. In practice, Lambda adds its own costs and constraints.
Running Chromium on Lambda requires packaging a ~130 MB binary into deployment layers (the 50 MB limit per layer means splitting across multiple layers). Cold starts add 3–8 seconds per request. Provisioned concurrency removes the cold start but adds a fixed monthly cost.
| Component | Cost at 10K screenshots/mo |
|---|---|
| Lambda compute (8s avg, 2 GB memory) | $2.67 |
| Provisioned concurrency (5 instances) | $10–15 |
| API Gateway | $5–10 |
| Data transfer out | $5 |
| S3 storage | $2–5 |
| Total (infra only) | $25–38 |
| Engineering time (4 hrs × $50) | $200 |
| Real TCO | $225–238 |
At 10K/month, Lambda's real TCO ($225–238) is roughly 8x the ScreenshotRun Pro plan ($29). The raw compute cost ($2.67) looks attractive until you add provisioned concurrency, API Gateway fees, data transfer, and the engineering hours to maintain a Lambda-based screenshot pipeline.
Lambda also does not solve the hard problems. You still need to install fonts through Lambda layers, route traffic through a VPC + NAT Gateway (or pay for an external proxy), handle Chrome crashes with retry logic in Step Functions, deal with the same rendering edge cases you would on a VPS.
When self-hosting actually makes sense
The numbers above favor the API, but self-hosting is the right call in specific situations:
Volume above 500K/month. At very high volumes, raw compute cost per screenshot drops below $0.001. If you already have a DevOps team maintaining other headless browser infrastructure (scraping, testing, PDF generation, automation), the incremental cost of adding screenshot capability is low. The engineering hours get amortized across multiple services.
Regulatory or air-gapped environments. Some industries require that data never leaves a specific network or geographic boundary. Healthcare, defense, financial services, government contracts — these sometimes mandate on-premises processing. No external API can satisfy that constraint.
Screenshots are your core product. If your company sells a visual testing tool or a website monitoring service, owning the rendering pipeline gives you control over quality, latency, caching behavior, feature roadmap. An external dependency cannot match that level of control when screenshots are the product itself.
Custom rendering pipeline. When you need pixel-level control over browser flags, custom Chromium patches, non-standard rendering behavior (specific GPU acceleration settings, proprietary font stacks), a managed API's config options may not cover your edge case.
Outside those scenarios, the math favors the managed API. For a deeper look at the build-versus-buy decision beyond just cost, see Screenshot API vs Puppeteer: when to build and when to buy.
The hidden costs nobody mentions
Beyond the spreadsheet, self-hosting has costs that do not fit neatly into a monthly line item.
A single production incident — a memory leak that triggers an OOM kill loop, or a Chromium update that breaks PDF rendering — can burn 5–20 hours of focused debugging time. That is $250–1,000 of engineering cost for one event. These do not happen every month, but they happen often enough to add thousands to the annual TCO. The dev.to post I referenced above documented 16+ hours on edge-case debugging alone during the initial build.
Opportunity cost is the other invisible line. Those 4–8 hours per month spent maintaining Chrome are hours not spent building product features. For a startup with two backend engineers, that is 2–5% of their total engineering capacity going to screenshot infrastructure instead of the product that generates revenue.
Cookie banners are an ongoing headache. GDPR consent overlays change their DOM structure frequently, breaking your hide_selectors rules. Sites update their anti-bot measures. New JavaScript frameworks introduce new rendering timing challenges. Each of these triggers another round of debugging. With a managed API, that work is the provider's problem — ScreenshotRun's cookie blocking and stealth mode handle these without any work on your side.
How the per-screenshot math works
Some developers focus on per-screenshot cost as the key metric. At very high volume, self-hosted raw compute drops to fractions of a cent. But that number is misleading without context.
| Volume | Self-hosted per-shot (infra only) | Self-hosted per-shot (with eng time) | ScreenshotRun per-shot |
|---|---|---|---|
| 1,000/mo | $0.008 | $0.153 | $0.003 |
| 10,000/mo | $0.003 | $0.035 | $0.0019 |
| 50,000/mo | $0.002 | $0.015 | $0.0016 |
| 100,000/mo | $0.001 | $0.012 | $0.0012 |
| 500,000/mo | $0.0005 | $0.003 | Custom |
The "infra only" column is what people cite when arguing self-hosting is cheaper. The "with eng time" column is what you actually pay. At 500K/month, the two approaches converge — that is roughly the break-even point. Below that, the API wins on per-screenshot cost even before you consider the features bundled into the price.
For a full feature-by-feature comparison rather than cost alone, see Puppeteer vs Screenshot API. For the broader strategic question of when to build versus buy, the pricing comparison page covers how ScreenshotRun stacks up against other managed APIs.
FAQ#
The server alone costs $8–121/month depending on provider and specs. But the real expense is engineering time (2–15 hours/month at $50–75/hr) and infrastructure extras like queues, monitoring, storage, CDN, and proxies ($105–345/month). Total cost of ownership ranges from $153/month at 1K screenshots to $1,155/month at 100K screenshots — even using the cheapest servers and conservative engineering estimates.
Roughly 500,000 screenshots per month. Below that threshold, the engineering hours and infrastructure extras push self-hosted TCO well above API pricing. At 500K/month, the per-screenshot cost with engineering time ($0.003) converges with managed API pricing. Above 500K, self-hosting can be cheaper — if you already have a DevOps team maintaining headless browser infrastructure.
Lambda raw compute is cheap ($2.67/month for 10K screenshots), but real TCO is much higher. Add provisioned concurrency, API Gateway, data transfer, S3 storage, and 4 hours of monthly maintenance, and Lambda costs $225–238/month for 10K screenshots — roughly 8x the $29 ScreenshotRun Pro plan. Lambda also does not solve font installation, proxy routing, or Chrome crash recovery.
Production incidents (OOM kill loops, Chromium update breakage) can burn 5–20 hours of debugging per event. Opportunity cost is real too — 4–8 hours/month on Chrome maintenance is 2–5% of a small engineering team's capacity. Cookie banner changes, anti-bot updates, and new framework rendering quirks each trigger additional maintenance cycles that are hard to predict or budget for.