October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
browser automation

How to Manually Install Playwright

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

Installing Playwright means installing both the language package and the browser binaries that match it. Add the package to your project, then run the Playwright install command for the browsers you need. On Linux CI, include system dependencies when the runner does not already have them.

What a manual Playwright installation includes

Playwright has two installation layers: a language binding or package, and browser executables built for that Playwright version. Installing the package alone does not guarantee that a browser executable is present. As the official Playwright browsers guide puts it, “Each version of Playwright needs specific versions of browser binaries to operate.” Keep the package and browser versions aligned rather than downloading arbitrary browser builds separately.

  • Package: the API your JavaScript, Python, Java, or .NET code imports or calls.
  • Browser binaries: the Chromium, Firefox, or WebKit builds that Playwright knows how to launch.
  • System dependencies: operating-system libraries needed by browsers, particularly relevant on Linux runners.

For a normal local setup, install the package using its language ecosystem, then use that installation’s Playwright command to download browser binaries. For restricted networks, set proxy, mirror, or certificate configuration before the download.

Install Playwright and browsers for Node.js

Install the project package

From the project directory, add Playwright through npm. For reproducible team or CI installs, commit the package manifest and lockfile, then use npm ci in the environment that will run the tests. The browser install command should run from that same project so it resolves the project’s Playwright version.

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

Download all supported browsers or choose one

  1. Install the package in your project with npm.
  2. Download the browser binaries with npx playwright install.
  3. To reduce downloads, request only the engine your tests use: npx playwright install chromium, npx playwright install firefox, or npx playwright install webkit.
  4. Check the available options with npx playwright install --help, and inspect the resolved package version with npx playwright --version.

Playwright also documents browser-specific packages, including @playwright/browser-chromium, @playwright/browser-firefox, and @playwright/browser-webkit. Choose a browser-specific package only when it suits the project’s dependency approach; the central operational requirement remains that the browser binary matches the Playwright version in use.

Install other language bindings

The exact package manager and executable differ by language, but the sequence does not: install the binding first, then install its matching browsers. The official CI guidance gives this Python sequence:

  1. pip install playwright
  2. playwright install --with-deps

The second command includes Linux system dependencies, which is useful on a clean Linux runner. For Java and .NET, use the CLI or generated PowerShell installation command provided by the relevant Playwright language setup; do not assume the Node.js npx command applies to those projects. Once installed, confirm that the command belongs to the same environment and version as the project binding.

Choose the installation approach for your environment

Situation Approach Trade-off or check
Local development, all engines needed Install package, then run npx playwright install Downloads more browser binaries than a single-engine project needs.
Project uses one browser Install package, then specify chromium, firefox, or webkit Keep the requested engine consistent with the tests you run.
Linux CI runner lacks browser libraries Use npx playwright install --with-deps, or target one engine with npx playwright install-deps chromium System dependency installation is specifically useful on Linux; runner permissions and package-manager access may be required.
Restricted network or internal artifact mirror Set proxy or download-host environment variables before install Confirm the runner can reach the configured endpoint and that the mirror contains the required browser builds.
Shared or controlled browser cache Set PLAYWRIGHT_BROWSERS_PATH All environments sharing the cache must be compatible with the Playwright version and platform.
Linux CI in a container Use a Playwright Docker image aligned with the project version A version mismatch can prevent Playwright from locating browser executables.

Install browsers in Linux CI

A reliable CI sequence installs locked project dependencies, installs Playwright’s browsers and required operating-system dependencies, then runs tests:

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.
  1. npm ci
  2. npx playwright install --with-deps
  3. npx playwright test

If the suite only needs Chromium, reduce the browser download to that engine and install its system dependencies with npx playwright install --with-deps chromium where supported by the installed CLI; alternatively, use the documented separate command npx playwright install-deps chromium for dependencies and npx playwright install chromium for the browser. Check npx playwright install --help if command options differ in your installed version.

The Playwright CI guidance recommends one worker in CI for stability and reproducibility unless the runner is intentionally sized for parallel work. If tests pass locally but fail only in CI, first compare the Playwright version, browser installation, operating-system dependencies, and worker configuration before changing test code.

Configure proxies, mirrors, and private certificates

Browser downloads normally come from Microsoft’s CDN. Configure network access before invoking the install command:

  • HTTP proxy: set HTTPS_PROXY to the proxy used by the environment.
  • Internal artifact repository: set PLAYWRIGHT_DOWNLOAD_HOST to the mirror host. Browser-specific download-host variables take precedence when defined.
  • TLS inspection or private CA: if the connection fails with a self-signed-certificate error, set NODE_EXTRA_CA_CERTS to the organization’s trusted CA file before installing.

These settings need to be present in the shell or CI job that runs the browser download. Setting them only after installation will not repair a failed or incomplete download. Avoid disabling certificate validation; configure the trusted certificate chain instead.

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

Choose and inspect the browser cache

Playwright stores downloaded browsers in a per-user cache by default. The documented defaults are:

  • Windows: %USERPROFILE%AppDataLocalms-playwright
  • macOS: ~/Library/Caches/ms-playwright
  • Linux: ~/.cache/ms-playwright

Use PLAYWRIGHT_BROWSERS_PATH to relocate the cache or point several project runs to a shared location. For an installation kept inside the package tree, set PLAYWRIGHT_BROWSERS_PATH=0; the documented Node package location is node_modules/playwright-core/.local-browsers, with an equivalent package directory on other platforms.

To audit the current machine, run npx playwright install --list. Run npx playwright uninstall to remove the current installation, or npx playwright uninstall --all to remove browsers belonging to all Playwright installations. Playwright garbage-collects stale browser versions. Set PLAYWRIGHT_SKIP_BROWSER_GC=1 or use --no-remove if you specifically need to prevent that cleanup; doing so can leave old browser builds taking disk space.

Use Docker for Linux CI when the version matches

A pre-built Playwright Docker image is an alternative installation boundary for Linux CI. It can supply the environment and browser dependencies together, but it does not remove the need to pin versions: keep the image’s Playwright version aligned with the project’s package version. The Docker guidance warns that a mismatch can stop Playwright from finding its browser executables. Treat the image tag, project dependency lock, and CI configuration as one versioned set.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot missing browsers and failed installs

“Executable doesn’t exist” or browser launch fails

The package may be installed while its matching browser binaries are missing, or the binaries may belong to a different Playwright version. From the project environment, check npx playwright --version, then run npx playwright install or install the specific required engine. In Python, run the browser install command from the environment where the package was installed.

Install command succeeds locally but fails in CI

Check whether CI runs the install step after installing the project dependencies and before tests. On Linux, missing shared libraries may require --with-deps or the browser-specific install-deps command. Also verify that CI is using the intended Node/Python environment and that an image has not introduced a Playwright version mismatch.

Download times out or cannot reach the host

Confirm outbound access to the default download source, or configure HTTPS_PROXY and the appropriate PLAYWRIGHT_DOWNLOAD_HOST before installation. If the environment uses an internal mirror, verify that the needed browser revision is available there. Retry only after resolving reachability; repeated attempts against the same blocked route will not complete the install.

Self-signed certificate or certificate-chain error

For an organization that intercepts TLS, point NODE_EXTRA_CA_CERTS to the trusted CA file and rerun installation. Make sure the path exists on the runner and that the variable is set in the process environment used for the download.

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

Disk usage grows or browsers seem to disappear

Use npx playwright install --list to inspect what is present. Stale versions can be removed by Playwright’s garbage collection; setting PLAYWRIGHT_SKIP_BROWSER_GC=1 or --no-remove disables that behavior. Conversely, if a browser was removed, reinstall the version required by the current package rather than trying to reuse a stale binary.

Shared cache works on one machine but not another

A shared cache is not automatically portable across operating systems or package versions. Check the value of PLAYWRIGHT_BROWSERS_PATH, the actual cache contents, and whether the consumer uses a compatible Playwright version. For isolated packaging, use PLAYWRIGHT_BROWSERS_PATH=0 and install browsers as part of the project environment.

Or skip the browser setup

If your goal is to capture website screenshots rather than run browser automation tests, ScreenshotNeo provides a screenshot API, so you can request an image without installing Playwright browsers locally. One GET request returns a screenshot or PDF; for example, save a WebP capture of a page with cURL:

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 ScreenshotNeo API documentation for request options. ScreenshotNeo accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and responses report the page verdict and billing status in headers. Its MCP server offers take_screenshot, get_page_info, and capture_pdf for Claude, Cursor, and other MCP clients. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

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

Sign up for ScreenshotNeo’s free plan to try 1,000 screenshots a month with no card.

Keep installs reproducible

Pin the Playwright package through the project’s lockfile, install the browser binaries with that project’s CLI, and make the same sequence part of CI. Add Linux dependencies where needed, configure network and cache settings before downloads, and keep any Docker image aligned with the project version. That combination addresses the most common reason a package appears installed while Playwright cannot launch its browser.

Frequently Asked Questions

Can I install only Chromium instead of every Playwright browser?

Yes. For Node.js, run npx playwright install chromium.

Where are Playwright browsers downloaded by default?

The default locations are %USERPROFILE%AppDataLocalms-playwright on Windows, ~/Library/Caches/ms-playwright on macOS, and ~/.cache/ms-playwright on Linux.

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

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

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

Read next

Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.