To run Puppeteer on an Azure Linux virtual machine, install a supported Node.js version, install Puppeteer and its compatible Chrome browser, add the browser’s Linux dependencies, then verify that the VM can launch Chrome and reach the page you need. Puppeteer’s current requirements list Node.js 22.12 or newer and Chrome for Testing support on Debian and Ubuntu for x64 and arm64; check those requirements against your VM image and architecture before installing.
Choose a Linux VM and connect
This guide covers Azure Virtual Machines, where you manage the operating system and can install packages directly. Azure App Service is a different hosting environment and does not follow this VM setup path.
As an Amazon Associate I earn from qualifying purchases.
Connect to a Linux VM with SSH when it has a public IP. If it has no public IP, Microsoft documents Azure Bastion as an access option. See Microsoft’s Linux VM connection guidance. Confirm the distribution and CPU architecture first: Chrome’s available builds and required system libraries depend on both.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Install Node.js and Puppeteer
Install Node.js 22.12 or newer using a method appropriate for your Linux distribution, then create or enter your application directory. Verify the runtime before installing dependencies:
#1 Best Overall
node --version
npm --version
For a project that lets Puppeteer manage its compatible browser, install the puppeteer package:
mkdir puppeteer-vm
cd puppeteer-vm
npm init -y
npm install puppeteer
The puppeteer package normally downloads a compatible Chrome for Testing browser during installation. That means installation needs outbound access to the browser download host as well as the npm registry, and the VM needs sufficient disk space for the browser and its dependencies. Consult the Puppeteer installation guide for current installation behavior.
If install scripts are disabled
Some package-manager policies suppress dependency install scripts. If Puppeteer installs but cannot find Chrome, install the browser explicitly:
npx puppeteer browsers install
If you manage the browser separately
Use puppeteer-core when the browser is managed by you or hosted remotely. Unlike puppeteer, it does not download Chrome. Configure the executable path or remote connection details explicitly, and ensure the chosen browser is compatible with the Puppeteer version.
Install Chrome’s Linux dependencies
Installing the npm package does not necessarily install the operating-system libraries Chrome needs. On Debian or Ubuntu, use the current dependency list in Puppeteer’s troubleshooting guide as the authority for the VM image you selected. It covers certificate and font support, GTK/ATK, NSS, GBM, X11, and sound libraries. Package names can change as distributions evolve, so do not assume one dependency command is correct for every image.
If Chrome reports a missing shared library, locate the Chrome executable Puppeteer is using and inspect its dependencies:
ldd /path/to/chrome | grep "not found"
Replace /path/to/chrome with the actual executable path. Install the missing libraries from the VM distribution’s supported repositories, then retry the launch. The Puppeteer troubleshooting guide explains how to identify the browser executable and diagnose missing dependencies.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errorsCheck outbound networking before debugging code
The VM must be able to reach the endpoints needed for OS package installation, npm packages, and Puppeteer’s browser download. If apt update, npm install, or the browser download fails, first determine which request cannot get out. Azure documents package-manager failures caused by outbound network configuration, blocked ports or URLs, firewalls, and network security groups. Review the VM’s network design, including its NSG, firewall or virtual appliance, NAT gateway, and load-balancer outbound rules where applicable. See Microsoft’s guidance for APT failures on Azure Linux VMs.
Run a launch smoke test
Save this as check.js. It launches the browser, opens a page, navigates to a URL, prints the page title, and closes the browser even if navigation fails:
const puppeteer = require('puppeteer');
(async () => {
let browser;
try {
browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto('https://example.com', { waitUntil: 'domcontentloaded' });
console.log(await page.title());
} catch (error) {
console.error('Puppeteer launch or navigation failed:', error);
process.exitCode = 1;
} finally {
if (browser) await browser.close();
}
})();
Run it from the project directory with node check.js. The expected output is the page title. This is a basic validation pattern, not a claim that the script has been run on a particular Azure VM. For the documented launch, page creation, navigation, and close flow, see Puppeteer’s getting-started guide.
Choose headless or headful execution
Headless
Headless mode is appropriate for automation that does not need a visible desktop. It still requires Chrome’s native libraries and a working sandbox configuration; “headless” does not eliminate operating-system requirements.
Headful
A visible browser needs a display environment. For headful use in CI-like environments, Puppeteer’s troubleshooting guidance discusses Xvfb as a virtual display option. Account for the additional display setup rather than treating headful and headless launches as interchangeable.
Keep Chrome’s sandbox enabled where possible
Chrome uses Linux sandbox layers to isolate browser processes. Prefer a correctly configured, unprivileged runtime that allows the sandbox to work. If launch reports “No usable sandbox!”, inspect the VM’s sandbox prerequisites and security policy; on some Ubuntu configurations, AppArmor or user-namespace policy can affect Chrome’s launch.
Puppeteer’s troubleshooting guidance says that --no-sandbox is an option only if you absolutely trust the content opened in Chrome, and strongly discourages running without a sandbox. Do not add the flag as a routine fix for an unexplained launch failure. If you consider it at all, understand the security exposure and restrict the browser to content you trust.
Troubleshoot common failures
| Symptom | Likely cause | What to check |
|---|---|---|
| “Could not find Chrome” | The browser download did not run, often because install scripts were skipped. | Run npx puppeteer browsers install and check access to the browser download endpoint. |
“error while loading shared libraries” or a missing .so |
A required Linux shared library is absent. | Run ldd on the Chrome executable, identify entries marked “not found,” and install the matching packages for the VM distribution. |
| “No usable sandbox!” | Sandbox prerequisites or distribution security policy prevent launch. | Check the Puppeteer troubleshooting guidance and the VM’s security configuration; avoid reflexively disabling the sandbox. |
| APT, npm, or Chrome download times out | Outbound traffic is blocked or not configured for the VM’s network design. | Check NSG and firewall rules, outbound routing, NAT or load-balancer configuration, and access to the relevant repository or download host. |
| Custom executable path fails | The path may not exist or may not be readable by the service account, or the browser may be incompatible. | Check the path as the actual runtime user, file permissions, and Puppeteer/browser compatibility. |
Operational and cost considerations
Browser processes consume VM memory, CPU, and disk, but an appropriate VM size cannot be determined without workload details such as page complexity and concurrent sessions. Measure your own workload under representative conditions. Close pages and browser instances after use, capture launch errors in logs, and distinguish browser startup problems from page navigation failures.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallRank #4
There is no single Azure VM cost or performance figure that applies to every Puppeteer workload. Compute size, region, runtime, concurrency, and page behavior affect both resource use and cost; select and monitor the VM based on your actual workload rather than assuming a minimum size.
Or skip the browser setup
If you only need website screenshots or PDFs, ScreenshotNeo provides a screenshot API and MCP server for developers. Its one-request API can return a PNG, JPEG, WebP, or PDF. For example, this cURL request saves a WebP screenshot of https://stripe.com:
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. ScreenshotNeo removes cookie and consent banners, newsletter popups, and chat widgets before the shot; bot checks, blank pages, failed loads, timeouts, and cache hits are not billed. Its MCP server lets AI agents use screenshot tools. The Free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots. Learn more at ScreenshotNeo and sign up free.
Frequently Asked Questions
Does this guide apply to Azure App Service?
No. It covers an Azure Linux Virtual Machine, where you manage OS packages directly; App Service has a different deployment environment.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Can I use Puppeteer on an ARM64 Azure VM?
Puppeteer lists Chrome for Testing support for Debian and Ubuntu on both x64 and arm64, but confirm the selected VM image and browser build meet current requirements.
Quick Recap
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.




