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.

To run Playwright on AWS EC2, connect to a Linux instance, install your application’s dependencies, install the browser binaries and Linux system packages required by your Playwright version, then run tests headlessly. For a typical npm project, the core setup is npm ci followed by npx playwright install --with-deps. Headed Linux runs need a virtual display such as Xvfb.

What you need before installing Playwright

EC2 provides a cloud virtual server; it does not prescribe a particular Linux image or instance size for Playwright. Choose an OS and CPU architecture supported by your project’s dependencies, and size the instance according to the tests you intend to run. The available guidance does not establish a universal minimum, best instance family, price, or performance benchmark.

  • A running Linux EC2 instance and a way to connect to it.
  • Your application source code and its dependency manifest and lockfile.
  • A supported runtime for the project, such as Node.js for the npm example below.
  • The Playwright package version pinned by the project. Playwright browser binaries are tied to Playwright releases, so install browsers after installing the package version you will run.

This guide’s concrete commands are for an npm project on Linux. Use the matching setup for your project’s language, package manager, operating system, and CPU architecture; do not assume every EC2 Linux distribution has identical compatibility.

Connect to your EC2 Linux instance

AWS documents SSH, EC2 Instance Connect, and Session Manager as ways to access Linux instances. Which one works depends on your account and instance configuration: SSH may require a key pair and suitable inbound network rules; Instance Connect and Session Manager have their own configuration and permissions requirements. Follow the access method supported for your instance in the AWS Linux instance connection documentation.

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.

Once connected, move to the application directory before running package commands. If the instance is new, install or enable the runtime and package manager required by the project using instructions for the selected Linux image.

Install the project, browsers, and Linux dependencies

For a project with a committed npm lockfile and Playwright declared as a dependency, use the project’s locked dependency set, then install the corresponding browsers and operating-system dependencies:

  1. cd /path/to/your/project
  2. npm ci
  3. npx playwright install --with-deps

npm ci installs from the lockfile, making it appropriate for a reproducible CI-style setup. playwright install --with-deps installs Playwright’s browser binaries and the Linux dependencies needed to launch them. The official Playwright CI documentation uses this pattern.

Use npx playwright install --with-deps chromium if the project only needs Chromium and you want to install that engine’s browser and dependencies. You can also separate browser installation from OS dependency installation with the CLI options documented in Playwright’s browser installation guide. Use the documentation corresponding to the Playwright version pinned by your application: browser builds are version-specific, and updating the package may mean reinstalling its browsers.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
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.

For Python, Java, or .NET projects, install dependencies using that project’s package manager and runtime rather than running the npm commands above. Then use the Playwright installation procedure for that language and pinned release. Do not mix browser binaries from one Playwright release with a different installed package version.

Run Playwright headlessly on EC2

Playwright launches browsers headlessly by default, so ordinary server-side tests do not need a desktop environment. Run the project’s test command from its application directory, for example:

npx playwright test

Use your project’s configured scripts, browser selection, and test settings if they differ. A successful test run should launch the installed browser and report the test results in the command output; the instance does not need a physical monitor.

Run headed tests on Linux with Xvfb

If a test specifically requires a visible browser window, Linux needs a display server. Playwright’s CI guidance uses Xvfb, a virtual display, and runs the command through xvfb-run:

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.
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.

xvfb-run npx playwright test

This creates a virtual display for the process; it does not provide an interactive desktop by itself. Install Xvfb using the package manager for your Linux image if it is not already available. If you need to see and interact with a desktop, a virtual display alone is not equivalent to configuring remote graphical access.

Manual setup or a preconfigured AMI?

Approach When it fits Trade-offs
Install Playwright yourself You want control over the OS image, project dependencies, and Playwright version. You must maintain runtime, browser binaries, and system dependencies. Official Playwright documentation supports this route.
Vendor-preconfigured Marketplace AMI You want to start from a listed Playwright environment, potentially with a GUI. Marketplace examples are vendor listings, not an AWS or Playwright guarantee. Check the current listing, region, account eligibility, included software, and terms; an independent quality or cost comparison is not established.

AWS Marketplace has listed vendor AMIs for headless and GUI Ubuntu Playwright environments. The listings accessed for this guide showed Ubuntu 24.04 LTS; the headless listing showed version 2026-05 and the GUI listing version 2026-07. These are listing details at the time they were accessed, not assurances that a listing or its terms remain unchanged. The GUI listing described a seven-day vendor free trial followed by usage-based pricing; verify current offer terms before choosing it. Marketplace availability and pricing can vary by account, region, contract, and current listing.

Troubleshoot browser launch and test failures

Browser executable is missing or does not launch

Install browser binaries after installing the project’s Playwright package: npx playwright install or, when needed, npx playwright install chromium. If Playwright was upgraded, rerun installation so the browser build matches the new package version.

Linux reports missing shared libraries or dependencies

Run npx playwright install --with-deps for the project’s browser set, or install the required system dependencies using the documented CLI procedure for your environment. Confirm that the Linux distribution and architecture match the assumptions of your project and Playwright release.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
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

Headed mode fails because there is no display

Use headless mode for normal server tests. If headed mode is necessary, install Xvfb and launch the test process with xvfb-run, as in xvfb-run npx playwright test.

Browser starts inconsistently or fails without a clear cause

Enable Playwright browser launch logging and rerun the failing command:

DEBUG=pw:browser npx playwright test

Use the output to investigate launch failures, then verify that the installed browser binaries correspond to the package version and that the system dependencies are present. The official CI documentation covers this debugging setting.

Installation or access commands do not work on the selected image

Do not assume package-manager commands for one Linux distribution apply to another. Check the image’s runtime and package-manager instructions, and confirm you connected using a method configured for the instance. AWS connection requirements differ among SSH, EC2 Instance Connect, and Session Manager.

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.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Performance, reliability, and cost considerations

There is no universally correct EC2 size in the available guidance. Browser count, test concurrency, page complexity, and the rest of the application all affect resource needs. Start with the requirements of your workload, observe the instance while representative tests run, and adjust capacity based on your own results rather than treating an unmeasured instance recommendation as a guarantee.

For repeatable runs, pin dependencies with the project lockfile, use the matching Playwright browser installation step when the package changes, and retain test and browser logs for failures. An EC2 instance’s price is separate from Playwright setup and varies with the selected instance and other AWS terms; no single cost estimate applies to all configurations.

Or skip the browser setup

If your goal is to capture website screenshots rather than run browser tests, ScreenshotNeo is a screenshot API and MCP server for developers. A single request returns a PNG, JPEG, WebP, or PDF. Its clean-shot flow accepts cookie and consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; these steps can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers report the page verdict and billing status. AI agents can use its MCP server tools: take_screenshot, get_page_info, and capture_pdf.

cURL example (see the ScreenshotNeo API documentation):

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

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

ScreenshotNeo includes 1,000 screenshots per month free with no card; paid plans start at $5 for 3,000 screenshots. Sign up for ScreenshotNeo’s free plan.

FAQ

Does EC2 need a GUI to run Playwright?

No. Playwright runs headlessly by default; install a virtual display only when a headed Linux run is required.

Should I use a Marketplace AMI or install Playwright manually?

Choose based on whether you prefer control over the environment or a vendor-provided starting image. Check the current listing and terms before relying on an AMI.

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.