Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon 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 NowHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
FREEDOM251

Freedom251 › Blog › Chrome for Testing

How to Set Up Puppeteer for Full-Page Website Screenshots on Ubuntu

By Freedom251 Team · · 5 min read

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

Install a supported Node.js version, add Puppeteer to your project, let it download its compatible Chrome for Testing browser, then call page.screenshot({ fullPage: true }). This guide walks through the direct Ubuntu setup, a runnable screenshot script, the common Linux launch failures, and an optional Docker route.

What you need before installing Puppeteer

  • Node.js: Puppeteer’s current system requirements specify Node.js 22.12 or newer.
  • Ubuntu architecture: Puppeteer lists Debian/Ubuntu Linux x64 and arm64 as supported for Chrome for Testing.
  • Project directory: Run the installation and screenshot script from the Node.js project you want to use.

These version and platform requirements are from the Puppeteer documentation, which reports version 25.12.0. Check the current system requirements if your environment differs or you are setting this up later.

As an Amazon Associate I earn from qualifying purchases.

Install Puppeteer and its browser on Ubuntu

  1. Check Node.js: Run node --version. If it is older than 22.12, install a compatible release before continuing.
  2. Install Puppeteer in your project: Run npm install puppeteer. Puppeteer’s installation normally downloads a compatible Chrome for Testing binary and chrome-headless-shell.
  3. Allow the browser download to finish: Puppeteer documents the Linux Chrome for Testing download as approximately 282 MB. This is the project’s approximate download figure, not a measurement of your installed disk usage.
  4. If installation scripts were skipped: Run npx puppeteer browsers install in the project directory to install the browser explicitly.

Puppeteer documents equivalent installation commands for other package managers, but npm is used here. See the project’s installation guide for current details, including browser installation behavior.

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

Write a full-page screenshot script

Create screenshot.mjs in the project directory. This example uses the ES module syntax shown in Puppeteer’s documentation:

#1 Best Overall
Sale
Logitech Brio 101 Full HD 1080p Webcam for Streaming and Meetings - Black | 1080p with auto-light correction, built-in mic, privacy shutter, USB-A, compatible with Teams, Google Meet, Zoom and more
  • Compatible with Nintendo Switch 2’s new GameChat mode
  • Auto-Light Balance: RightLight boosts brightness by up to 50%, reducing shadows so you look your best—compared to previous-generation Logitech webcams (1)
  • Privacy with a Slide: The integrated webcam cover makes it easy to get total, reliable privacy when you're not on a video call
  • Built-In Mic: The built-in microphone lets others hear you clearly during video calls
  • Easy Plug-And-Play: The Brio 101 works with most video calling platforms, including Microsoft Teams, Zoom and Google Meet—no hassle; it just works
import puppeteer from 'puppeteer';

const browser = await puppeteer.launch();
try {
  const page = await browser.newPage();
  await page.setViewport({ width: 1440, height: 900 });
  await page.goto('https://example.com', { waitUntil: 'networkidle2' });
  await page.screenshot({ path: 'page.png', fullPage: true });
} finally {
  await browser.close();
}

Run it with node screenshot.mjs. On success, Puppeteer writes page.png in the current directory. The viewport sets the page’s browser dimensions; fullPage: true asks the screenshot API to capture the entire document rather than just the visible viewport. Puppeteer’s API reference says fullPage defaults to false.

The example waits for networkidle2, as shown in Puppeteer’s navigation documentation. Choose a readiness condition that suits the target: a page that continuously polls, streams, or loads content after navigation may not become idle. Network idleness also does not guarantee that every lazy-loaded image or dynamically rendered section has appeared. Puppeteer’s screenshot API and navigation API document the relevant options.

Adjust the capture for your page

Choose a viewport deliberately

page.setViewport() controls the browser viewport and can affect responsive layouts. Set its width and height to match the layout you need before navigating or capturing. A full-page screenshot extends beyond the viewport to include the document’s page content; it does not mean the page will be rendered at every responsive breakpoint.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Sale
Logitech C270 720p Webcam Plug-and-Play Wide Screen Video Calling - Black | Auto-Light Correct, Noise-Reducing Mic, Zoom, Microsoft, Teams, Skype, Nintendo Switch 2 New GameChat Mode, PC Mac compatible
  • Compatible with Nintendo Switch 2’s new GameChat mode
  • Crisp HD 720p/30 fps video calls with diagonal 55° field of view and auto light correction. Compatible with popular platforms including Skype and Zoom.
  • The built-in noise-reducing mic makes sure your voice comes across clearly up to 1.5 meters away, even if you’re in busy surroundings.
  • C270’s RightLight 2 feature adjusts to lighting conditions, producing brighter, contrasted images to help you look good in all your conference calls.
  • The adjustable universal clip lets you attach the camera securely to your screen or laptop, or fold the clip and set the webcam on a shelf. You’re always ready for your next video call.

Wait for content that appears after navigation

Use a navigation wait condition as a starting point, then add page-specific readiness logic if content is loaded by scripts after the initial request. For example, wait for a known selector with Puppeteer’s page API when the page has a stable element that indicates the content is ready. No single network-idle condition guarantees that third-party or lazy-loaded content is complete on every site.

Save a different output format

The example writes PNG. Puppeteer’s screenshot API also accepts supported screenshot types and options; consult the API reference for the version installed in your project rather than assuming a particular setting or default.

Diagnose common Ubuntu launch problems

Chrome reports missing shared libraries

Chrome for Testing depends on system libraries that may not be present on a minimal Ubuntu installation. Puppeteer’s troubleshooting page lists common Debian/Ubuntu dependencies such as libnss3, libgtk-3-0, libgbm1, libasound2, libx11-xcb1, libxss1, and font packages. The exact requirements can change, so treat that list as a diagnostic starting point rather than a timeless installation command.

Rank #3
Sale
NexiGo N60 1080P Webcam with Microphone, Software Control & Privacy Cover, USB HD Computer Web Camera, Plug and Play, for Zoom/Skype/Teams, Conferencing and Video Calling
  • 【Full HD 1080P Webcam】Powered by a 1080p FHD two-MP CMOS, the NexiGo N60 Webcam produces exceptionally sharp and clear videos at resolutions up to 1920 x 1080 with 30fps. The 3.6mm glass lens provides a crisp image at fixed distances and is optimized between 19.6 inches to 13 feet, making it ideal for almost any indoor use.
  • 【Wide Compatibility】Works with USB 2.0/3.0, no additional drivers required. Ready to use in approximately one minute or less on any compatible device. Compatible with Mac OS X 10.7 and higher / Windows 7, 8, 10 & 11 / Android 4.0 or higher / Linux 2.6.24 / Chrome OS 29.0.1547 / Ubuntu Version 10.04 or above. Not compatible with XBOX/PS4/PS5.
  • 【Built-in Noise-Cancelling Microphone】The built-in noise-canceling microphone reduces ambient noise to enhance the sound quality of your video. Great for Zoom / Facetime / Video Calling / OBS / Twitch / Facebook / YouTube / Conferencing / Gaming / Streaming / Recording / Online School.
  • 【USB Webcam with Privacy Protection Cover】The privacy cover blocks the lens when the webcam is not in use. It's perfect to help provide security and peace of mind to anyone, from individuals to large companies. 【Note:】Please contact our support for firmware update if you have noticed any audio delays.
  • 【Wide Compatibility】Works with USB 2.0/3.0, no additional drivers required. Ready to use in approximately one minute or less on any compatible device. Compatible with Mac OS X 10.7 and higher / Windows 7, 10 & 11, Pro / Android 4.0 or higher / Linux 2.6.24 / Chrome OS 29.0.1547 / Ubuntu Version 10.04 or above. Not compatible with XBOX/PS4/PS5.
  1. Locate the Chrome binary Puppeteer installed for the project.
  2. Run ldd /path/to/chrome | grep not to identify unresolved shared libraries, replacing the path with the actual binary path.
  3. Install the Ubuntu packages that provide the missing libraries, using Puppeteer’s current troubleshooting guide and its linked Chromium dependency information to confirm package names.

Chrome reports “No usable sandbox!”

On Ubuntu 23.10 and later, AppArmor configuration can restrict user namespaces used by Puppeteer-downloaded Chrome for Testing. Puppeteer describes this as a possible cause of the error and links to Chromium’s upstream AppArmor guidance. Follow that guidance for the specific host and security policy; do not treat disabling Chrome’s sandbox as the routine fix.

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.

Puppeteer strongly discourages running Chrome without its sandbox. Keep the sandbox enabled where possible, and investigate the environment-specific AppArmor restriction rather than reflexively adding --no-sandbox.

The browser cannot write its profile

Puppeteer uses a temporary user-data directory by default. If the process cannot write to it, check the account and filesystem permissions. When your environment requires a persistent or explicitly located profile, Puppeteer documents the userDataDir launch option on its troubleshooting page.

Rank #4
Sale
EMEET C960 1080P Webcam with Microphone, 2 Mics, 90° FOV, Computer Camera | USB Type-A & A-to-C Adapter, Fixed Focus, Plug&Play for Zoom/Teams/Facetime/YouTube/Google Meet/Switch 2 Camera, 2025 Version
  • 1080P Webcam with Cover for Video Calls - EMEET computer webcam provides design and Optimization for professional video streaming. Realistic 1920 x 1080p video, 5-layer anti-glare lens, providing smooth video. C960 computer camera delivers 1920x1080 video with fixed focus (11.8–118.1 inches), so as to provide a clearer image. C960 USB webcam has a cover and can be removed automatically to meet your needs for privacy. For optimal image performance, use the webcam in a well-lit environment.
  • Built-in 2 Omnidirectional Mics - EMEET webcam with microphone for desktop features 2 built-in omnidirectional microphones, picking up your voice to create clear audio for communication. When installing the webcam, select EMEET C960 as the default microphone input device in your computer and video applications and select C960 as the default device in Zoom/Teams and ensure microphone permissions are enabled for proper use. Please note that C960 does not include built-in speakers.
  • Automatic Light Adjustment - Automatic exposure adjustment is applied in EMEET HD webcam 1080p so that the streaming webcam can deliver stable image performance. EMEET C960 camera for computer also features color adjustment and exposure optimization to help you look your best. For optimal video quality, it is recommended to use the webcam in normal or well-lit environments and select suitable video settings in your application. Proper lighting helps achieve a clearer and more balanced image.
  • Plug-and-Play & Upgraded USB Connectivity - New C960 webcam features both USB Type-A & A-to-C adapter connections for wider compatibility. For stable performance, connect the webcam directly to the computer's main USB port and ensure the device is recognized correctly. If a hub or docking station is used, please ensure it provides sufficient power and stable data transmission, as limited ports may affect performance. 90° wide-angle lens captures more participants without frequent adjustments.
  • High Compatibility & Multi Application - C960 webcam for laptop is compatible with Windows 10/11, macOS 10.14+, and Android TV 7.0+. Not supported: Windows Hello, TVs, tablets, or game consoles. It works with Zoom, Teams, Facetime, Google Meet, YouTube and more. Please select C960 webcam as the default camera and microphone device in your application and ensure camera/microphone permissions are enabled, especially on macOS. (Tips: Incompatible with Windows Hello)

The install completed but no browser is available

A package manager or deployment environment may have blocked install scripts, so the Puppeteer package is present but its browser was not downloaded. Run npx puppeteer browsers install from the project, then retry the script.

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

Choose direct Ubuntu installation or Docker

Installing on the host is the most direct match for a local Ubuntu project. Docker is an alternative when you want a documented container image with Chrome, its dependencies, and a pre-installed Puppeteer version.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Route What it simplifies What to account for
Direct Ubuntu install Fits an existing Node.js project without introducing a container workflow. You manage Ubuntu’s browser libraries and host-level browser setup.
Official Puppeteer Docker image Bundles Chrome for Testing, required dependencies, and a pre-installed Puppeteer version for a repeatable container environment. The documented sandbox setup requires the SYS_ADMIN capability; Puppeteer recommends running an init process. Check the image documentation for current configuration details.

See Puppeteer’s Docker guide before adopting the image, especially for container permissions and process management.

Best Value
Logitech C920x HD Pro PC Webcam Full 1080p/30fps Video - Black | 30fps Video, Clear Audio, Light Correction, Works with Teams, Meet, Zoom, Nintendo Switch 2, Mac, Tablet
  • Compatible with Nintendo Switch 2’s new GameChat mode
  • HD lighting adjustment and autofocus: The Logitech webcam automatically fine-tunes the lighting, producing bright, razor-sharp images even in low-light settings. This makes it a great webcam for streaming and an ideal web camera for laptop use
  • Advanced capture software: Easily create and share video content with this Logitech camera that is suitable for use as a desktop computer camera or a monitor webcam
  • Stereo audio with dual mics: Capture natural sound during calls and recorded videos with this 1080p webcam, great as a video conference camera or a computer webcam
  • Full HD 1080p video calling and recording at 30 fps. You'll make a strong impression with this PC webcam that features crisp, clearly detailed, and vibrantly colored video

Or skip the browser setup

If you need a screenshot without installing and maintaining Chrome on Ubuntu, ScreenshotNeo offers a screenshot API and MCP server for developers. A single GET request returns a screenshot or PDF. The API supports PNG, JPEG, and WebP output as well as PDF, with options for full-page capture and many other capture settings. 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 accepts cookie and consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each of those steps can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers identify the page verdict and billing status. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents and MCP clients. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots.

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

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

Frequently Asked Questions

Does Puppeteer take a full-page screenshot by default?

No. Set fullPage: true in page.screenshot(); the option defaults to false.

Can I use Puppeteer on Ubuntu ARM64?

Puppeteer’s current system requirements list Debian/Ubuntu Linux arm64 as supported for Chrome for Testing, alongside x64.

Is networkidle2 enough to capture every image?

Not necessarily. It is a navigation wait condition, not a guarantee that all lazy-loaded images or later dynamic content have finished rendering.

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.

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

Chrome for TestingNode.jsPuppeteerUbuntuwebsite screenshots

Leave a Reply

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

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.

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.