Shotfly vs self-hosted Puppeteer
Self-hosted Puppeteer gives you full control and no per-screenshot fee, but you run and update the browsers, protect your network from the URLs you capture, and handle cookie banners, bot challenges and blank pages yourself. Shotfly does that behind one HTTP request and doesn't charge for failed captures. Self-host for internal pages or an existing browser fleet; use an API for user-supplied URLs.
What does a self-hosted Puppeteer screenshot service need?
| Part | With Puppeteer, you | With Shotfly |
|---|---|---|
| Browser | Install it: puppeteer downloads Chrome for Testing and a headless shell on install, and some package managers block that step, so add npx puppeteer browsers install to the build | Nothing to install |
| Containers | Run the official image ghcr.io/puppeteer/puppeteer with an init process (--init) and --cap-add=SYS_ADMIN, which Chrome's sandbox needs | Nothing to run |
| Untrusted URLs | Block private and internal addresses, at connect time and on every redirect, or a user-supplied URL can reach your network | Refused with url_not_allowed, including redirects during the render |
| Cookie banners | Hide or reject them: hiding cookie banners | block_cookie_banners, on by default |
| Bot challenges | Detect them before saving: detecting bot challenges | target_blocked, not charged |
| Blank pages | Wait for content and check the pixels: fixing blank screenshots | blank_page, not charged |
| Lazy content | Scroll before a full-page capture: full-page captures of lazy pages | full_page=true scrolls first |
| Storage and caching | Store, cache and serve the images; sign links you embed | cache_ttl, one-hour links, signed URLs |
| Scaling | Size servers for concurrent browsers, restart crashed ones, queue the overflow | Concurrency per plan (2 to 25) and async jobs |
Two notes from Puppeteer's own documentation matter for a service. Running Chrome with --no-sandbox is "strongly discouraged" unless you absolutely trust the pages you open, which is never the case for user-supplied URLs. And the official Docker example installs extra font packages so that Chinese, Japanese, Arabic, Hebrew and Thai text renders.
What does the smallest version look like?
import puppeteer from 'puppeteer'
// One URL in, one PNG out. Everything in the table above is still left to build.
const url = process.argv[2]
const browser = await puppeteer.launch()
try {
const page = await browser.newPage()
await page.setViewport({ width: 1280, height: 800 })
await page.goto(url, { waitUntil: 'load', timeout: 30_000 })
await page.screenshot({ path: 'screenshot.png', fullPage: true })
} finally {
await browser.close()
}The Puppeteer version captures one page. It doesn't yet check where the URL points, survive a hung page, remove banners, or notice that it saved a challenge page.
What does self-hosting Puppeteer cost?
Puppeteer is free; running it as a service is not. Shotfly has found no authoritative public figure for that cost, because it depends on your volume, your cloud and your team, so this page doesn't invent one. Price these yourself:
- Servers. Each concurrent browser needs its own memory and CPU, plus headroom for heavy pages and for restarts after crashes.
- Engineering time. Browser and library upgrades, container images, incidents, and the quality work in the table above.
- Proxies, if sites start blocking your server addresses.
- Storage and delivery for the images, if you serve them to users.
On the Shotfly side, the price is the plan. Failed renders, bot challenges, blank pages and cache hits are not charged.
| Shotfly plan | Price | Screenshots a month | Per 1,000 |
|---|---|---|---|
| Free | $0 | 100 | Free |
| Starter | $9 / month | 2,000 | $4.50 |
| Growth | $29 / month | 10,000 | $2.90 |
| Pro | $99 / month | 50,000 | $1.98 |
When is self-hosting Puppeteer the better choice?
- You capture pages on your own network, such as internal dashboards. Shotfly only renders public addresses.
- You already run Puppeteer in production for other work, so the browser fleet and its upkeep exist anyway.
- You need browser features an API doesn't expose, such as extensions, long scripted sessions or a fixed browser build.
- Your volume is large and steady enough that the engineering time pays for itself, or third-party processing is not an option.
When is an API the better choice?
- The URLs come from your users. Then every capture is an outbound request to an address someone else chose, and the network protection has to be right.
- You need clean results from third-party sites: cookie banners gone, bot challenges and blank pages caught instead of stored.
- Screenshots are a feature of your product, not the product, and nobody on the team wants to be on call for a browser fleet.
- Your volume is small or uneven, so paying per screenshot costs less than keeping servers running.
How do Puppeteer options map to Shotfly parameters?
| Puppeteer | Shotfly |
|---|---|
page.setViewport({ width, height, deviceScaleFactor }) | viewport_width, viewport_height, device_scale_factor |
page.screenshot({ fullPage: true }) | full_page=true |
page.screenshot({ type, quality }) | format, quality |
page.screenshot({ clip }) | clip_x, clip_y, clip_width, clip_height |
elementHandle.screenshot() | selector |
page.pdf() | format=pdf |
page.goto(url, { waitUntil: "networkidle0" }) | wait_until=networkidle |
page.waitForSelector(selector) | wait_for_selector |
page.emulateMediaFeatures([{ name: "prefers-color-scheme", value: "dark" }]) | dark_mode=true |
page.setUserAgent(), page.setExtraHTTPHeaders(), page.setCookie() | user_agent, headers, cookies |
page.addStyleTag(), page.evaluate() | css, js |
Sources: pptr.dev installation, pptr.dev Docker, pptr.dev troubleshooting, read 2026-12-01. Puppeteer is an open-source project; Shotfly is not affiliated with it.
Last updated 2026-12-01. Markdown version: /compare/puppeteer.md