Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
World desk7 min

How to Run Puppeteer on AWS EC2: Ubuntu, Amazon Linux, and Graviton

A distro-aware EC2 guide to Puppeteer: choose the right browser for Ubuntu, Amazon Linux, or Graviton, install dependencies, and diagnose launch errors.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To run Puppeteer on EC2, match three things: the instance’s Linux distribution, CPU architecture, and browser binary. On a supported x86_64 Ubuntu instance, install a current Node.js runtime, install Puppeteer with its browser download enabled, add the browser’s required Linux libraries, and launch a smoke test as the same non-root user that will run your service. On Graviton, use an ARM64 browser; Puppeteer’s downloaded Chrome is x86 according to AWS’s Graviton guide. Amazon Linux commands vary by release, so do not apply the older EPEL/Chromium instructions to AL2023 without checking its repositories and packages.

Choose the right EC2 setup first

Puppeteer is a JavaScript library for controlling Chrome or Firefox, and it runs headless by default. A successful install is not enough: the selected browser must be compatible with Puppeteer, the operating system, and the instance architecture, and its shared libraries must be present.

As an Amazon Associate I earn from qualifying purchases.

EC2 choice Browser approach Key consideration
Ubuntu or Debian, x86_64 Use Puppeteer’s downloaded Chrome for Testing, or deliberately configure a system Chromium executable. Install the dependencies required by that browser build and verify them with ldd.
Ubuntu or Debian, ARM64 Use an ARM64-compatible browser package and configure Puppeteer to launch its executable. Check the browser’s architecture; an x86 browser cannot run natively as an ARM browser.
Amazon Linux Choose packages and repositories for the exact Amazon Linux release. The EPEL and yum recipe in Puppeteer’s troubleshooting guide is release-context-specific, not a universal AL2023 recipe.
Amazon Linux 2023, Graviton Follow an AL2023 ARM-specific browser setup and verify every package source and version. AWS’s Graviton guide has separate examples; do not mix them with Ubuntu or older Amazon Linux commands.

Before installing anything, identify the image and architecture:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
cat /etc/os-release
uname -m
node --version 2>/dev/null || true

Common architecture outputs include x86_64 and aarch64. Check the current Puppeteer system requirements for supported Linux distributions and architectures; the current requirements page specifies Node.js 22.12 or later. That is a runtime minimum, not an EC2 instance sizing recommendation.

#1 Best Overall
15.6" All-in-One Desktop Computers, FHD 360°Adjustable Touchscreen Win 11 Pro Industrial Tablet PC N5095 8GB RAM 128GB ROM, HDMI 2.0 WiFi 5 Bluetooth 5.0 for Office/Automation/Kiosk/Bar/Warehouse
  • 【Integrated touch screen display】This all in one desktop computer features a 15.6-inch FHD 1920 * 1080 IPS touchscreen display and supports a 10 point synchronous touchscreen. Without the constraints of a mouse or keyboard, image dragging and zooming, web page sliding, application switching, and text input can all be completed through fingertip touch. This multifunctional touchscreen mini PC features a sleek and integrated design that eliminates the clutter of cables and traditional peripherals from taking up desktop space.
  • 【Free spinning screen & flexible folding】This Industrial computers combines triple flexible adjustment, with a 360 °all-round screen rotation, allowing for easy switching between landscape viewing, portrait browsing, and multi angle sharing and display; The 180 °vertical rotating screen supports adjustable height and visual angle, making it easy to adapt for standing demonstrations, desk work, or multi person collaborative sharing, The 180 °folding bracket provides convenient storage, stable support during use, and lightweight folding for easy space saving
  • 【Powerful Performance & Reasonable Storage】The all-in-one desktop computer is equipped with an N5095 processor with a clock speed of up to 3.4GHz, perfectly integrating smooth operation, low energy consumption, and efficient heat dissipation. Don't worry about insufficient storage or running lag! This multifunctional touchscreen computer is equipped with 8GB RAM and 128GB ROM, achieving a balance between performance and capacity. From office creation to gaming and entertainment, it fully meets your digital life needs
  • 【WiFi & Bluetooth】This all-in-one desktop computer integrates multiple network and device connectivity solutions, including Bluetooth, WiFi, and RJ45 Gigabit Ethernet ports. A stable WiFi connection ensures smooth daily internet access. When the wireless signal is poor, the gigabit network port immediately provides stable and high-speed wired transmission, providing dual protection against network fluctuations. At the same time, the Bluetooth function supports easy pairing with wireless headphones, speakers, and other devices, breaking cable limitations and unlocking more device connectivity scenarios to meet diverse needs such as office and entertainment
  • 【Rich Ports】This all-in-one computer comes with power ports * 1, HDMI2.0 ports * 1, USB3.0 ports * 2, USB2.0 ports * 2, USB-C ports * 1, 1000Mbps Gigabit LAN ports * 1, TF card socket * 1, DC and 3.5mm Audio ports * 1. The diversity of connection ports ensures that you can easily manage work requirements or entertainment settings

Install Puppeteer and its browser on Ubuntu or Debian

The simplest route on a supported x86_64 Ubuntu or Debian host is to let Puppeteer install its compatible Chrome for Testing browser. Puppeteer’s installation documentation says npm i puppeteer normally downloads Chrome for Testing and, from Puppeteer v21.6.0, chrome-headless-shell. Install scripts may be blocked by package-manager policy or configuration; if so, Puppeteer may be installed without its browser.

  1. Install a supported Node.js runtime. Use a Node.js 22.12-or-later runtime that is available for your chosen distribution and architecture. Verify with node --version and npm --version.
  2. Create an application directory and install Puppeteer.
    mkdir -p ~/puppeteer-ec2
    cd ~/puppeteer-ec2
    npm init -y
    npm install puppeteer
  3. Confirm the browser was downloaded. Run npx puppeteer browsers list and inspect the Puppeteer cache if launch later reports that Chrome cannot be found. Do not disable install scripts if you are relying on Puppeteer’s automatic browser download.
  4. Install the selected browser’s OS libraries. Puppeteer’s Linux troubleshooting guide lists common Ubuntu/Debian dependencies; package names and availability can change by distribution release. Install the dependencies for your actual Chrome build, then use ldd as shown below to find anything still unresolved.

Chrome for Testing downloads are approximately 282 MB on Linux according to Puppeteer’s installation page. That is the browser download size, not a total disk-space estimate for the application, caches, logs, or temporary browser profiles.

Use a system-installed Chromium only deliberately

A system Chromium can be useful when your OS package source is the approved way to manage browser updates, but you then own the pairing between the installed browser and your Puppeteer version. Install Chromium from the repository appropriate to the exact OS release, locate its executable, and pass that path explicitly:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
const puppeteer = require('puppeteer');

(async () => {
  const browser = await puppeteer.launch({
    executablePath: '/usr/bin/chromium',
    headless: true,
  });
  const page = await browser.newPage();
  await page.goto('https://example.com', { waitUntil: 'domcontentloaded' });
  console.log(await page.title());
  await browser.close();
})().catch(error => {
  console.error(error);
  process.exitCode = 1;
});

Change /usr/bin/chromium to the executable path actually installed on the instance. If you use Puppeteer’s managed browser instead, omit executablePath so Puppeteer selects its installed compatible browser.

Rank #2
KINGDEL Industrial PC, Fanless Mini Desktop Computer with Celeron Dual Core CPU, 8GB RAM, 128GB SSD, 2xNICs, 4xCOM RS232, HD Port, Full Metal Body
  • Processor of the Mini Computer: Celeron 1007U/1037U Dual Core, 2M Cache, 22 nm Lithography CPU
  • RAM & Drive of the Mini PC: 8GB DDR3L RAM, 128GB mSATA SSD(Solid State Disk), Fanless, Metal Case
  • Graphics of the Mini Gaming Computer: Integrated HD Graphics, Max Dynamic Frequency 1GHz
  • This KINGDEL business office pc includes 2*NICs, 4*COM RS232, HD Port, VGA, 4*USB 3.0, 4*USB2.0
  • What in Box: Mini PC, Power Supply, Power Cable, Antenna, Screws.

Install system libraries and diagnose launch failures

Chrome needs Linux shared libraries in addition to a browser executable. When Puppeteer reports a missing .so file or exits immediately, inspect the exact executable that Puppeteer is trying to launch:

ldd /path/to/chrome | grep 'not found'

Replace /path/to/chrome with the binary path in the launch error or the installed browser path. Any output marked not found identifies a missing shared library. Install the package that provides that library using the package manager for the exact EC2 distribution, then run ldd again. Avoid copying a dependency list from another distribution or release without checking package availability.

Puppeteer’s troubleshooting guide documents an older Amazon Linux procedure using EPEL and yum install chromium:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo amazon-linux-extras install epel -y
sudo yum install -y chromium

That page warns that missing repository and dependency setup can leave Chromium unable to load libatk-1.0.so.0 and other libraries. Treat this as the documented older Amazon Linux context, not current instructions for every Amazon Linux version. For AL2023, check the current repositories and packages for the exact image; AWS’s Graviton guide provides separate AL2023 examples, but package versions and external sources should be verified before use.

Rank #3
BOSGAME P6 Neo Mini Gaming PC, Desktop Computers Ryzen 7 6800H, Radeon 680M Graphics, 24GB DDR5 RAM, 1TB PCIe 4.0x4 SSD, Triple Display (HDMI/DP/USB4), USB4 8K 60Hz, WiFi 6E, BT5.2, Dual 2.5GbE LAN
  • 【Powerful Ryzen 7 6800H Processor】BOSGAME P3 Lite Mini PC features the AMD Ryzen 7 6800H processor with 8 cores and 16 threads, up to 4.7GHz, and Radeon 680M GPU (1900MHz). Ideal for design software (Photoshop, Premiere, CAD) and popular games like PUBG, LOL, and PS3 emulators.
  • 【Powerful Graphics & Radeon 680M】Equipped with AMD Radeon 680M Graphics built on RDNA 2 architecture, delivering high frame rates for gaming and exceptional performance for content creation and video editing.
  • 【24GB DDR5 RAM & 1TB PCIe SSD】Built with 24GB(12GB x2) Dual-channel DDR5 4800MHz RAM (expandable to 64GB) and 1TB M.2 2280 PCIe 4.0 SSD (expandable to 4TB), providing faster data processing and ample storage for games, AI training, and creative projects.
  • 【Triple Display & USB4 8K@60Hz】 Bosgame Ryzen 7 Micro PC allows for triple displays via 1*HDMI2.0, DP x1 and USB4 8K@60Hz output, catering to the demands of daily design work and most low-power games. Run AI training, data processing, and media streaming simultaneously to enhance work efficiency effectively.
  • 【RJ45 2.5GbE LAN & WiFi 6E】Bosgame Mini Computers USB4 port supports PD 3.0 (up to 100W), meaning you can power the Bosgame P3 Lite conveniently for portability. Features dual 2.5GbE LAN for complex networks (firewalls, routers) and WiFi 6E for faster, stable connections. Includes Bluetooth 5.2.

Run a smoke test as the service user

Test with the same non-root operating-system account, environment, and home directory that will run the application. This catches a browser cache or permissions difference that an SSH test under another user can hide.

const puppeteer = require('puppeteer');

(async () => {
  const browser = await puppeteer.launch({ headless: true });
  try {
    const page = await browser.newPage();
    await page.goto('https://example.com', { waitUntil: 'domcontentloaded' });
    console.log({ title: await page.title(), url: page.url() });
  } finally {
    await browser.close();
  }
})().catch(error => {
  console.error(error);
  process.exitCode = 1;
});

Save as smoke.js, then run node smoke.js as the intended account. If your service uses a custom HOME, cache directory, or browser executable path, use those same values for this test. Ensure the account can read the executable and write to the profile and cache locations it uses.

Run Puppeteer on AWS Graviton

Graviton instances use ARM architecture. AWS’s Graviton guide notes that Puppeteer’s bundled Chrome is x86 and demonstrates replacing it with an aarch64 browser. Confirm the host architecture with uname -m, then install a browser built for that architecture using instructions for the specific OS image.

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

Configure the executable explicitly when using that system browser, and confirm its architecture with file /path/to/browser or the package’s documentation. The architecture of the browser binary must match the instance; installing an x86 executable on an ARM instance is not an ARM-compatible solution. AWS’s guide includes Ubuntu 22 and AL2023 examples, including Xvfb for headful tests. Its package versions and external sources may change, so verify them against the current image before reproducing the commands.

Rank #4
CanaKit Raspberry Pi 5 Desktop PC with SSD (Fully Assembled) (256 GB SSD)
  • Fully assembled for plug-and-play operation
  • Includes Raspberry Pi 5 with 8GB RAM
  • 256 GB PCIe Pi NVMe SSD (Pre-loaded with Pi 64-Bit OS)
  • M.2 HAT+
  • CanaKit Turbine Black Case for the Pi 5

Headless versus headful operation

For ordinary EC2 automation, use headless mode; it does not require a visible desktop. Headful browser testing needs a display server such as Xvfb. AWS’s Graviton guide includes Xvfb examples for headful tests, but the need for a display server does not change the browser’s OS-library or architecture requirements.

Keep Chrome’s sandbox enabled where the host supports it. Puppeteer explains that Chrome uses multiple sandbox layers. Its troubleshooting guidance says: “If you are absolutely sure about the content you open, you can launch Chrome with the --no-sandbox argument:” This is an exceptional option for absolutely trusted content, not a routine production fix. First investigate the runtime user and the host’s sandbox prerequisites.

Common errors and fixes

Symptom Likely cause What to check
Could not find Chrome The browser download was skipped or Puppeteer is looking in a different cache. Check whether package-manager policy blocked install scripts, list Puppeteer browsers, and compare the install and runtime users’ home/cache paths.
Failed to launch or missing .so A required Linux shared library is absent. Run ldd on the actual browser executable, install the matching distribution package, and repeat the check.
No usable sandbox! The host or runtime setup does not satisfy Chrome’s sandbox prerequisites. Check the OS/runtime user and sandbox support. Do not make --no-sandbox the default; Puppeteer documents it only for absolutely trusted content.
Works over SSH but fails as a service The service may have a different user, HOME, cache or profile permissions, environment, memory availability, or executable path. Compare those values between the SSH session and service, and run the smoke test as the service account.
Launch fails only on ARM The browser binary may be x86 rather than ARM64. Check uname -m and inspect the browser executable’s architecture; use an aarch64-compatible build on Graviton.
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 the job is to capture a website rather than automate a browser session, ScreenshotNeo is a screenshot API and MCP server for developers. It can return a PNG, JPEG, WebP, or PDF from one GET request, avoiding EC2 browser installation and maintenance for screenshot-only work. Its cleanup options can accept consent banners and remove 60+ known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks/CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, with response headers indicating the page verdict and billing status. Its MCP server includes tools for AI agents: take_screenshot, get_page_info, and capture_pdf.

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

Example using cURL (see the ScreenshotNeo API documentation):

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

ScreenshotNeo includes 1,000 screenshots per month on its free plan with no card; paid plans start at $5 for 3,000 screenshots. That is a practical alternative for captures, not a replacement for Puppeteer when your application needs general browser automation. Sign up for free.

Best Value
HIGOLEPC Mini PC Computer Win 11 Pro, 10.1" Touchscreen Desktop Computer with 5000mAh Battery, All in One Pc N5095 8GB RAM 128GB eMMC, Dual RS232, HDMI 2.0, Type-C 3.1 Full-Function
  • 【Mini PC with 10.1" HD Touchscreen – No Mouse & Keyboard Needed】This all-in-one mini computer features a 10.1-inch 1280×800 HD IPS touchscreen with G+G 5-point multi-touch, so you can use it without a mouse and keyboard. Perfect for home office, study, industrial use, or smart home control. You can also remotely control any other laptop via Remote Desktop protocol from this micro computer
  • 【Fanless Mini Computer with Intel N5095 Processor】Equipped with a faster 12th Gen Intel N5095 quad-core processor (4 cores, 4 threads, 6MB cache, 2.0GHz base up to 2.7GHz/2.9GHz turbo), this fanless mini PC prevents CPU/GPU throttling and draws under 10 watts. It delivers smooth multitasking for business, family, web browsing, email, document editing, and light photo editing
  • 【OS System Pre-installed with 8GB RAM & 128GB Storage】HIGOLEPC 10.1-inch touchscreen mini computer pc running Windows 11 Pro, designed for seamless productivity. Equipped with 8GB high-speed LPDDR4 RAM and 128GB eMMC storage, this mini PC delivers lightning-fast performance for multitasking
  • 【Dual 4K Display Support】This compact mini desktop powered by Intel UHD Graphics, delivers smooth 4K UHD video playback and accelerated image processing. With HDMI + Type-C (3.1) ports, this mini desktop drives two 4K displays simultaneously, delivering crisp visuals and seamless multitasking
  • 【Rich Input/Output Ports & 5000mAh Battery】All important connections are available: 4 x USB 3.0 ports, 1 x HDMI 2.0 port, 2 x RS232 ports, 1 x Gigabit Ethernet port, 1 x SD Card port, plus 1 x full-function Type-C (3.1) for 4K output. Supports PXE, built-in audio and microphone. The 5000mAh high-capacity battery delivers uninterrupted power for extended work sessions without performance lag

Frequently Asked Questions

Does Puppeteer need a graphical desktop on EC2?

No for ordinary headless operation. A display server such as Xvfb is needed when running headful browser examples.

Can Puppeteer run on a Graviton instance?

Yes, but use an ARM64-compatible browser. AWS’s Graviton guide notes Puppeteer’s bundled Chrome is x86.

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

Is Puppeteer itself a browser?

No. It is a JavaScript library that controls Chrome or Firefox.

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.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

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.