User Agents

Web browsers and everyday web tech, explained

Does Puppeteer Need Chrome Installed? Setup Explained

· 4 min read · Browsers

In this article
  1. How Puppeteer's Browser Download Works
  2. Using an Existing Chrome Installation
  3. What About Puppeteer-Core?
  4. Headless Mode and Chrome Versions
  5. Common Setup Issues and Solutions
  6. How to Choose Between Bundled Chromium and System Chrome
  7. Frequently Asked Questions

Yes, Puppeteer requires a browser to operate, and by default it expects Chrome or Chromium. When you install the puppeteer npm package, it automatically downloads a compatible version of Chromium to a local cache, so in most cases you don't need to manually install Chrome. However, you can also configure Puppeteer to use an existing Chrome or Edge installation.

How Puppeteer's Browser Download Works

When you run npm install puppeteer, the package's postinstall script downloads a specific version of Chromium (the open-source project that Chrome is based on) into a cache directory. This is the default behavior. The downloaded Chromium is used by Puppeteer when you launch a browser with puppeteer.launch(). The version of Chromium is pinned to the Puppeteer version to ensure compatibility.

If you want to skip the automatic download (for example, to reduce install time or disk space), you can set the environment variable PUPPETEER_SKIP_DOWNLOAD=true before installing. Then you must point Puppeteer to an existing browser using the executablePath option or the PUPPETEER_EXECUTABLE_PATH environment variable.

Using an Existing Chrome Installation

You can tell Puppeteer to use your system's Chrome instead of the bundled Chromium. In the launch() call, pass the executablePath option:

const browser = await puppeteer.launch({
  executablePath: '/usr/bin/google-chrome'
});

On Windows, the path might be C:\Program Files\Google\Chrome\Application\chrome.exe. On macOS, it's typically /Applications/Google Chrome.app/Contents/MacOS/Google Chrome. You can also use the channel option to specify 'chrome' or 'chrome-beta' if you have Chrome installed and want Puppeteer to find it automatically:

const browser = await puppeteer.launch({ channel: 'chrome' });

This works with stable Chrome, Chrome for Testing, and even Edge (via channel: 'msedge').

What About Puppeteer-Core?

There is a separate package called puppeteer-core that does not download Chromium. It is designed for users who already have a browser installed or want to use a different browser. With puppeteer-core, you must specify an executablePath or channel when launching, otherwise it will throw an error. This is useful for CI environments where you want to use a system-installed Chrome or for connecting to a remote browser.

Headless Mode and Chrome Versions

Puppeteer supports both headless (no visible UI) and headful (visible) modes. The default headless mode is now the new headless mode (Chrome 112+), which is more similar to the full browser. Older versions used the old headless mode. If you need to test with a specific Chrome version, you can use the PUPPETEER_PRODUCT environment variable to choose between 'chrome' and 'firefox' (though Firefox support is experimental). For Chrome, you can also download a specific version using npx puppeteer browsers install chrome@stable or similar commands.

Common Setup Issues and Solutions

  • Error: "Could not find expected browser (chrome) locally" – This occurs when Puppeteer can't find the downloaded Chromium. Run npx puppeteer browsers install chrome to download it, or set executablePath.
  • Missing system dependencies – On Linux, Chromium may require shared libraries (like libnss3, libatk). Install them via your package manager or use the puppeteer browsers install chrome command which sometimes lists missing dependencies.
  • Running in Docker – You need to install the necessary libraries or use a prebuilt image like zenika/alpine-chrome.
  • Using a proxy or offline environment – Set PUPPETEER_DOWNLOAD_BASE_URL to a mirror or disable download and use a pre-installed browser.

How to Choose Between Bundled Chromium and System Chrome

Consider these factors:

  • Consistency – The bundled Chromium ensures a known version, so your tests behave the same across machines.
  • Disk space – Chromium is large (~150 MB). If you already have Chrome, using it saves space.
  • System integration – If your site uses features like DRM or proprietary codecs, system Chrome might be required.
  • Update control – System Chrome updates automatically, which can break tests. The bundled version stays fixed until you update Puppeteer.

Frequently Asked Questions

Do I need to install Chrome separately if I use Puppeteer?

No, the standard puppeteer package downloads Chromium automatically during installation. You only need a separate Chrome if you use puppeteer-core or skip the download.

Can I use Puppeteer with Microsoft Edge?

Yes, you can use Edge by setting channel: 'msedge' or providing the executable path. Puppeteer can control any Chromium-based browser.

What is the difference between Puppeteer and Puppeteer-Core?

Puppeteer includes a bundled Chromium download; Puppeteer-Core does not. Puppeteer-Core requires you to specify a browser executable and is meant for advanced users or environments where you want to control the browser installation.

How do I update the Chromium version that Puppeteer uses?

Update the Puppeteer package itself, as each version is tied to a specific Chromium version. You can also run npx puppeteer browsers install chrome@canary to get a different channel, but note that Puppeteer may not support newer versions immediately.

Can I run Puppeteer without downloading anything?

Yes, if you have Chrome installed, you can use puppeteer-core and point to the executable. You won't need the download, but you must ensure the browser version is compatible with the Puppeteer API.

Why does Puppeteer fail with "Chrome failed to start" on Linux?

This usually means missing system libraries. Install the dependencies listed in the error message, or use a Docker image that already has them. Also check that you're running as a non-root user with proper permissions.