Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use Chrome’s standalone chrome-headless-shell when you want the lighter, former “old Headless” implementation in a container. Use regular Chrome with --headless when your tests require behavior and features closer to the full browser. Since Chrome 132, the regular Chrome binary no longer selects old Headless; its --headless flag starts unified Headless, while the old implementation is distributed separately as chrome-headless-shell.

For Node.js and Puppeteer, the maintained Puppeteer Docker image is the shortest supported route. For other languages or tighter images, download a pinned shell build with Chrome for Testing and supply compatible libraries, a sandbox, writable profile paths and an init process.

Chrome Headless versus Headless Shell

Chrome now has two different headless execution choices:

Choice What it is Best fit Trade-off
Unified Headless Regular Chrome launched with --headless End-to-end tests that must match normal Chrome behavior and features Heavier browser and dependency footprint
Headless Shell Standalone chrome-headless-shell, the former old Headless implementation Automation, rendering and capture jobs where its reduced feature set is sufficient Not an exact substitute for full Chrome; feature compatibility must be checked

Chrome describes Shell as a lightweight wrapper around Chromium’s //content module with substantially fewer dependencies. It can be lighter and, for suitable workloads, more performant, but actual speed depends on the page, resources, waits and container host. No benchmark should be assumed. Chrome 120 introduced Shell binaries through Chrome for Testing; Chrome 132 removed old Headless from the regular Chrome binary.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

Choose unified Headless if your test exercises browser features unavailable in Shell or if fidelity to a user’s regular Chrome session is more important than image size. Choose Shell for isolated rendering, DOM inspection, screenshots, PDFs and similar jobs that do not need the complete browser surface.

Option A: run Shell in the maintained Puppeteer image

The documented image ghcr.io/puppeteer/puppeteer includes Chrome for Testing and the dependencies Puppeteer needs. Image tag latest moves; version tags follow Puppeteer versions. Pin a version (or digest) in CI after checking the current tag so browser and library versions remain reproducible.

Minimal Docker invocation

docker run -i --init --cap-add=SYS_ADMIN --rm 
  ghcr.io/puppeteer/puppeteer:<pinned-version> 
  node -e "const puppeteer=require('puppeteer'); (async()=>{const b=await puppeteer.launch({headless:'shell'}); const p=await b.newPage(); await p.goto('https://example.com',{waitUntil:'networkidle2'}); console.log(await p.title()); await b.close();})()"

--init supplies an init process that reaps browser child processes. The image’s documented sandboxed configuration requires --cap-add=SYS_ADMIN. Keep the sandbox enabled and run as a suitable non-root user; do not casually replace it with --no-sandbox. Puppeteer’s guidance treats that flag as appropriate only when all loaded content is absolutely trusted.

Puppeteer launch code

const puppeteer = require('puppeteer');

(async () => {
  const browser = await puppeteer.launch({
    headless: 'shell',
    // Keep the sandbox. Add only options required by your environment.
  });
  try {
    const page = await browser.newPage();
    await page.goto('https://example.com', {
      waitUntil: 'networkidle2',
      timeout: 60_000
    });
    console.log(await page.title());
  } finally {
    await browser.close();
  }
})();

headless: 'shell' selects the standalone binary. headless: true selects unified Headless, and headless: false requests a visible browser (which is not useful without a display server).

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Writable profile and cache paths

Chrome writes profile, configuration and cache data while starting. Read-only containers commonly fail unless these locations are writable.

docker run -i --init --cap-add=SYS_ADMIN --rm 
  -e XDG_CONFIG_HOME=/tmp/chrome-config 
  -e XDG_CACHE_HOME=/tmp/chrome-cache 
  ghcr.io/puppeteer/puppeteer:<pinned-version> node app.js

In code, provide an explicit temporary profile when parallel jobs or restricted filesystems require isolation:

const browser = await puppeteer.launch({
  headless: 'shell',
  userDataDir: '/tmp/puppeteer-profile'
});

Use a per-job directory for concurrent workers; sharing one profile can produce lock and corruption errors.

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

Option B: build your own container

Chrome for Testing’s official browser manager can download Shell:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
npx @puppeteer/browsers install chrome-headless-shell@stable

Replace stable with a specific version to pin the binary. Keep that version compatible with your Puppeteer release; Puppeteer’s installer obtains Chrome for Testing and Shell builds it guarantees to work with that release.

A custom image must provide the operating-system libraries required by the downloaded build. The exact packages vary by base distribution and binary version, so do not copy an unverified universal package list. Install the libraries identified for your chosen distribution, create a non-root runtime user, preserve the sandbox, and expose writable locations for the profile, configuration and cache. Add an init-capable entrypoint or run the container with --init. This approach supports Python, Java, Go and other stacks, but you own binary acquisition, dependency updates, security hardening and compatibility testing.

Version-control checklist

  • Pin the Shell version rather than relying on a moving stable download in production.
  • Pin the container image tag or digest.
  • Align Puppeteer and browser versions.
  • Record the base distribution and installed shared libraries.
  • Run a startup smoke test after every browser or image update.

Shell command-line tasks

The Chrome command-line interface works in Headless mode and with Shell. These examples show the syntax; adapt paths and permissions to your image.

Serialize the rendered DOM

chrome-headless-shell --headless --dump-dom https://example.com

--dump-dom serializes the DOM after parsing and script execution; it is not the same as downloading the original HTML source.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Capture a screenshot

chrome-headless-shell --headless 
  --window-size=1365,768 
  --screenshot=/tmp/page.png 
  https://example.com

Print a PDF

chrome-headless-shell --headless 
  --print-to-pdf=/tmp/page.pdf 
  --no-pdf-header-footer 
  https://example.com

Limit waiting time

chrome-headless-shell --headless 
  --timeout=30000 
  --screenshot=/tmp/page.png 
  https://example.com

These operations still depend on network access, page scripts, fonts, permissions and writable output paths. A timeout limits the capture wait; it does not make an unavailable page succeed.

Do you need Xvfb?

No. Headless Shell does not create a display window, and Chrome’s Headless documentation says Xvfb is unnecessary for headless execution. Adding a virtual X server increases image size and process complexity without solving ordinary headless startup problems.

Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

Security and reliability in containers

Keep the sandbox

The sandbox limits the impact of untrusted web content. Configure the container so Chrome can use it: the Puppeteer image’s documented run uses SYS_ADMIN, and Chrome’s FAQ notes that --no-sandbox is not needed when a user is properly configured. If you must disable sandboxing for a controlled, trusted workload, isolate that workload and understand the security consequence.

Use an init process

Browser launches create multiple child processes. Without an init process, exited children can accumulate and eventually destabilize long-running workers. Use Docker’s --init or an init-capable entrypoint.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Plan storage

Use writable, preferably job-scoped directories for userDataDir, XDG_CONFIG_HOME and XDG_CACHE_HOME. In Kubernetes or another read-only deployment, mount an ephemeral writable volume at those paths.

GPU acceleration

Puppeteer documents that Shell needs --enable-gpu to enable GPU acceleration in Headless mode. Add it only when the host exposes a usable GPU and your workload benefits from GPU compositing; otherwise software rendering is simpler.

Troubleshooting

“Browser failed to launch” or missing shared library

Cause: the custom image lacks a library required by the Shell build, or the binary and base distribution are incompatible.

Fix: start from the maintained Puppeteer image, or install the dependencies documented for your exact Chrome for Testing build and distribution. Do not assume a package list from another base image applies.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Sandbox or permission errors

Cause: the process is running as root without a usable sandbox, or the container lacks the capability expected by the image.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

Fix: run as a configured non-root user, preserve the sandbox and use the documented --cap-add=SYS_ADMIN for the Puppeteer image. Treat --no-sandbox as a last resort for trusted content only.

Processes remain after jobs finish

Cause: no init process is reaping Chrome’s children, or application code is not closing the browser.

Fix: pass --init, close the browser in a finally block, and terminate the container job cleanly.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Read-only filesystem or profile lock

Cause: Chrome cannot write its profile, cache or configuration, or concurrent jobs share one profile.

Fix: set writable XDG paths, provide a unique userDataDir per worker and mount temporary storage.

Pages look different from normal Chrome

Cause: Shell has fewer dependencies and features than unified Headless, or the page depends on a browser capability Shell does not provide.

Fix: test with unified Headless by changing the launch setting to headless: true. Use unified mode when full-Chrome fidelity is a requirement.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

Capture is blank or incomplete

Cause: navigation finished before delayed content loaded, a selector never appeared, resources were blocked, or the page returned a bot challenge.

Fix: choose an appropriate Puppeteer wait condition, wait for a selector or explicit delay, inspect console and network errors, and verify the URL from inside the container.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If your goal is dependable website screenshots rather than maintaining Chrome containers, ScreenshotNeo provides a single HTTP call. It accepts consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups and chat widgets before capture; each step can be disabled. Bot checks, CAPTCHAs, blank pages, timeouts, failed loads and cache hits are not billed, and response headers identify the page verdict and billing result. Its MCP server exposes take_screenshot, get_page_info and capture_pdf for Claude, Cursor and other MCP clients.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the complete options and API behavior in the ScreenshotNeo documentation. The service supports PNG, JPEG, WebP and PDF; full-page and element captures, device presets, retina scale, dark mode, custom CSS and JavaScript, clicks, waits, request blocking, headers, cookies, user agents, authorization, timezone, geolocation, transparent backgrounds, resizing, chosen cache TTLs, signed image links, asynchronous webhooks, bulk capture of up to 100 URLs per call, usage reporting and an OpenAPI specification. Existing parameter names used by other screenshot APIs also work.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Python:

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)

Node.js:

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

There is a free allowance of 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. Create a free ScreenshotNeo account.

FAQ

Can I use the regular Chrome binary with Shell flags?

Not to obtain the former implementation after Chrome 132. Use the standalone chrome-headless-shell binary, or use regular Chrome’s unified --headless mode.

Is Shell always faster?

No. Chrome describes it as lighter and potentially more performant, but workload, page complexity, waits and host resources determine actual performance.

Is the old Node 8 Docker example current?

No. The Chrome FAQ’s Node 8 snippet is historical. Prefer the maintained Puppeteer image or a deliberately maintained custom image.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Frequently Asked Questions

Which mode should I use for end-to-end browser tests?

Use unified Headless when matching normal Chrome behavior and feature coverage matters more than the leanest runtime.

Can Shell run without an X server?

Yes. Headless execution does not require Xvfb.

How should I make CI captures reproducible?

Pin the Shell version, Puppeteer release and container image digest, then run a smoke test after upgrades.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.