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

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

For a Debian or Ubuntu VPS, the most reliable starting point is to check the operating system, CPU architecture and Node.js version, then install Puppeteer so it downloads its matching Chrome for Testing browser. Install the Linux libraries and language-appropriate fonts, and generate PDFs with page.pdf(). “Chromium” is often used loosely here: current Puppeteer-managed browser downloads use Chrome for Testing. These are upstream requirements, not a guarantee about every Indian VPS image; check your provider’s actual OS image and permissions before installing.

Check your VPS before installing Puppeteer

The geographic location of a VPS does not determine which Linux packages or browser binary it supports. Check the image and instance itself: an Indian provider may offer different distributions, releases and CPU architectures. The current Puppeteer system-requirements page lists Node.js 22.12 or newer and Chrome for Testing support on Debian or Ubuntu Linux for x64 and arm64. Confirm current requirements before deployment, since they can change. See Puppeteer system requirements.

Run these checks over SSH:

cat /etc/os-release
uname -m
node --version
npm --version
id

Look for Debian or Ubuntu in /etc/os-release, x86_64 or aarch64 in the architecture output, and a Node version meeting Puppeteer’s current requirement. The id command shows which deployment user you are using; browser downloads and cache paths depend on that user’s environment. If your image is not Debian or Ubuntu, do not assume the dependency commands below apply unchanged.

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.

Install Puppeteer and its compatible browser

For a new project, install puppeteer, rather than puppeteer-core, if you want Puppeteer to manage the browser download:

mkdir html-to-pdf
cd html-to-pdf
npm init -y
npm install puppeteer

Installing puppeteer normally downloads a recent Chrome for Testing version selected for that Puppeteer release. From Puppeteer v20 onward, the managed browser is Chrome for Testing, even when setup guides or administrators casually call it Chromium. Puppeteer publishes a browser-version mapping; avoid independently upgrading the browser without checking compatibility.

Some package managers or build environments block dependency install scripts, which can leave the Puppeteer package installed without its browser. In that case, run the browser installer explicitly as the same user that will run the application:

npx puppeteer browsers install

The documented default browser cache is $HOME/.cache/puppeteer. If installation and runtime happen as different users, or with different home directories, the runtime process may not see the downloaded browser. Check Puppeteer installation guidance for current cache and installation behavior.

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

When using a separately installed browser

puppeteer-core does not manage browser installation. If you use it, or install a distribution-provided Chromium package, set Puppeteer’s executablePath to the browser binary and verify that browser version against the Puppeteer release you use. A distro Chromium package and Puppeteer’s managed Chrome for Testing are not interchangeable by assumption.

const browser = await puppeteer.launch({
  executablePath: '/path/to/browser',
  headless: true
});

Replace the path with the actual executable path on your VPS; do not copy the example path literally. For managed Puppeteer installs, usually omit executablePath so Puppeteer uses its paired browser.

Install Linux libraries and fonts

A downloaded browser still needs native shared libraries provided by the OS. On Debian or Ubuntu, Puppeteer’s browser CLI offers a dependency-install option for Chrome:

sudo npx puppeteer browsers install --install-deps chrome

This uses system package privileges and is documented for Chrome on Debian or Ubuntu; it is not a provider-neutral installer for every Linux distribution. Review the current browser CLI documentation and InstallOptions limitations before using it on a production image.

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

If you manage packages manually, follow Puppeteer’s current Linux dependency list rather than an old copied command. Its troubleshooting documentation names dependencies including GTK, NSS, fontconfig, Pango and fonts-liberation, among other shared libraries. Package names can vary by OS release. To identify unresolved libraries for the installed browser, run:

Rank #3
HP MicroServer Gen10 Plus Mini Tower Server, Intel Xeon E-2224 3.4GHz, 32GB RAM, 16TB Storage, RAID, Windows Server 2019
  • HP MicroServer Gen10 Plus Tower Server for Business with Microsoft Windows Server 2019 OS!
  • Intel Xeon E-2224 Quad-Core 3.4GHz 8MB CPU, Up To 4.6GHz Turbo
  • 32GB (2 x 16GB) DDR4 PC4-21300 2666MHz Unbuffered Memory
  • 16TB (4 x 4TB) 7.2K 6Gb/s SATA 3.5" HDDs in RAID
  • Hard drives and memory upgrades included separately NOT installed, installation required.
ldd /path/to/chrome | grep 'not found'

Use the actual browser executable path in place of /path/to/chrome. An empty result means this check did not find unresolved shared libraries; it does not prove that fonts, sandbox permissions or page loading are correct.

Choose fonts for the document’s scripts

Install font packages that cover the characters your HTML actually uses. Puppeteer’s Linux list includes fonts-liberation, and its troubleshooting guidance notes that non-Latin scripts may need additional fonts. A generic package is not evidence of full coverage for every Indian language: Hindi in Devanagari, Tamil, Bengali, Telugu, Malayalam and other scripts have distinct glyph requirements. Check representative output for the languages and symbols in your documents, including conjuncts, punctuation and numerals where relevant.

If a PDF has blank squares, substituted glyphs or inconsistent line wrapping, verify the font is installed on the server and that the page’s CSS requests a font available there. The PDF API’s waitForFonts option defaults to true in the current options documentation, but waiting does not install missing font files. See Puppeteer troubleshooting.

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.

Generate a PDF with Page.pdf()

With puppeteer installed, this runnable Node.js example loads a local HTML file and writes an A4 PDF. Save it as make-pdf.js, create input.html in the same directory, then run node make-pdf.js.

const puppeteer = require('puppeteer');

(async () => {
  const browser = await puppeteer.launch({ headless: true });
  try {
    const page = await browser.newPage();
    await page.goto('file://' + require('path').resolve('input.html'), {
      waitUntil: 'networkidle0',
      timeout: 60000
    });
    await page.pdf({
      path: 'output.pdf',
      format: 'A4',
      printBackground: true,
      margin: { top: '12mm', right: '12mm', bottom: '12mm', left: '12mm' }
    });
  } finally {
    await browser.close();
  }
})().catch(error => {
  console.error(error);
  process.exitCode = 1;
});

The networkidle0 wait condition can be unsuitable for pages that maintain long-lived network connections. For those pages, use a more appropriate navigation condition and explicitly wait for the content your document needs before calling page.pdf(). Increase or adjust the navigation timeout only when the page genuinely needs longer; it cannot fix a failed resource or unavailable font.

Control page size and print styling

Page.pdf() supports paper format or dimensions, margins, page ranges, backgrounds and CSS page-size preference. Choose whether the API’s format or the document’s CSS @page dimensions control the output; the PDF options documentation describes the current settings. If the design relies on colored backgrounds or background images, set printBackground: true. Without it, print output may differ from the browser’s screen view. See PDFOptions.

For a maintained example of the rendering API, Puppeteer’s PDF generation guide is currently under its /next documentation path, so check it against the stable API docs when publishing or upgrading.

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

Keep Chrome sandboxing enabled where possible

Do not make --no-sandbox the default fix for a launch failure. Puppeteer recommends Chrome’s sandbox and strongly discourages disabling it. First identify the actual cause: user permissions, missing libraries, the browser binary, or a host security policy. Puppeteer also documents an Ubuntu 23.10-and-newer AppArmor issue that can affect Chrome for Testing user namespaces and sandbox startup. The correct remedy depends on the VPS image’s policy; consult the current troubleshooting page and the linked upstream guidance rather than weakening isolation blindly.

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

Troubleshoot common setup failures

Symptom Likely cause What to check or do
Could not find Chrome The browser download did not run, or runtime uses a different user or cache directory. As the runtime user, run npx puppeteer browsers install. Check the user’s home and Puppeteer cache, then ensure the application uses that installation.
Browser launch reports a missing shared library A required OS library is absent or the package list does not match the distribution release. On Debian or Ubuntu, use the documented dependency installer or current dependency instructions. Run ldd /path/to/chrome | grep 'not found' against the actual browser binary.
Launch fails with a sandbox or permission error Runtime user permissions, host policy or Ubuntu AppArmor behavior may be involved. Check the OS release, user and Puppeteer troubleshooting guidance. Do not disable the sandbox without understanding the security consequences.
PDF has missing or replaced characters The server lacks a font with glyph coverage for the document’s script, or CSS requests an unavailable font. Install and verify fonts for the actual languages in the HTML, then render a representative document. Do not assume one general-purpose font package covers all Indian scripts.
PDF omits colors or backgrounds Print rendering does not include backgrounds by default. Set printBackground: true and check the page’s print CSS.
Output is incomplete or navigation times out Page resources are slow, failed or never become idle; a persistent connection can also prevent a network-idle condition. Check the target page and its resources, choose a suitable navigation condition, and wait explicitly for required content before creating the PDF.
Installed distro Chromium behaves differently The executable may not match the browser version expected by Puppeteer. Set executablePath explicitly and check the Puppeteer-to-browser compatibility mapping before changing either version.

Performance, reliability and deployment costs

Browser installation consumes disk space, and each PDF render runs a browser process with memory and CPU needs that depend on the page and workload. Leave disk headroom for the browser download, dependencies, application and generated files, and observe memory use under representative concurrency before increasing parallel jobs. Puppeteer’s installation page gives approximate browser download sizes, but those are operational estimates that can change; check the current page when sizing an image.

For predictable deployments, keep the Node version, Puppeteer package and corresponding browser installation aligned between build and runtime. Confirm that the process user can read the browser cache, write the PDF destination, and access any remote assets the HTML references. No current official US retail listing was published for pricing, mirror performance or availability for any specific Indian VPS provider, so compare providers using their current image, architecture, package-install permissions, resource limits and regional offerings rather than assuming a particular host behaves uniformly.

Or skip the browser setup

If you need an image or PDF capture without maintaining Puppeteer and Chrome on your VPS, ScreenshotNeo provides a website screenshot API and MCP server. One GET request can return a PNG, JPEG, WebP or PDF. For example, this cURL request captures a page as WebP; see the ScreenshotNeo API documentation for parameters and response details.

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
  • Cookie and consent banners are accepted or removed before capture, along with supported newsletter popups and chat widgets.
  • Bot checks, blank pages, timeouts, failed loads and cache hits are not billed; response headers report the page verdict and billing status.
  • An MCP server exposes screenshot and PDF capture 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 get 1,000 screenshots a month with no card.

Frequently Asked Questions

Does Puppeteer install Chromium automatically?

A normal puppeteer installation downloads a compatible Chrome for Testing browser. Current Puppeteer does not use “Chromium” as the precise name for its managed browser.

Can I use Puppeteer on an ARM VPS?

Current Puppeteer system requirements list Chrome for Testing on Debian or Ubuntu Linux for arm64 as well as x64. Confirm the VPS operating system and current upstream requirements before deployment.

Does installing fonts on the VPS guarantee every Indian script renders correctly?

No. Font coverage depends on the characters and scripts in the actual documents; validate representative PDFs for each language you need.

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.