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

You can generate website screenshots on an Indian VPS by installing a supported Node.js release, Puppeteer’s compatible Chrome for Testing browser, and the Linux libraries Chrome needs; then launch a page, wait for the target site to load, and save a screenshot. This guide uses Debian or Ubuntu and Puppeteer’s standard puppeteer package. The exact VPS size needed depends on your pages and concurrency, so test your workload rather than assuming a plan will support a particular number of captures.

What you need before installing Puppeteer

  • A Debian or Ubuntu VPS with root or sudo access. Puppeteer’s current supported-platform list includes Debian/Ubuntu Linux on x64 and arm64.
  • Node.js 22.12 or newer for Puppeteer 25.12.0, the version identified by Puppeteer’s system requirements page checked for this guide. Confirm the requirement for the exact Puppeteer release you install: Puppeteer system requirements.
  • Enough RAM, CPU, storage, and bandwidth for your target pages and workload. There is no established throughput figure for a particular VPS plan; pages vary in resource use.

For a low-cost India-facing example, Hostinger’s India page advertises KVM 1 at ₹599/month with 1 vCPU, 4 GB RAM, 50 GB NVMe storage, and 4 TB bandwidth. The page lists renewal at ₹999/month on a two-year term. This is a provider offer, not an independent benchmark or evidence that it is the cheapest option. Check the current checkout total, term, renewal price, taxes, backup terms, and data-center location before buying: Hostinger India VPS plans.

Install Node.js, Puppeteer, and Chrome

The regular puppeteer package downloads a compatible Chrome for Testing browser during installation. Use it unless you have a reason to manage Chrome yourself. The separate puppeteer-core package does not download a browser; with that package, you must install and point Puppeteer to a compatible browser yourself. Follow the current Node.js installation instructions for your chosen Debian or Ubuntu image, then check that the installed version meets Puppeteer’s requirement.

  1. Connect to the VPS and verify Node.js and npm: node --version and npm --version.
  2. Create a project directory and initialize it: mkdir site-capture && cd site-capture && npm init -y.
  3. Install Puppeteer: npm install puppeteer.
  4. If your package-manager policy prevented install scripts from running, install Puppeteer’s browser explicitly: npx puppeteer browsers install. Without a downloaded or separately managed browser, launch will fail.

Install scripts may be disabled by package managers or deployment settings. Check the install output and confirm a compatible browser is available before diagnosing your capture code. See Puppeteer installation.

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

Capture and save a screenshot

This runnable CommonJS script opens a page, sets a viewport, waits for the page’s load event, saves a PNG, and closes Chrome even if navigation or capture fails. Save it as capture.cjs in the project directory:

const puppeteer = require('puppeteer');

async function main() {
  const browser = await puppeteer.launch({ headless: true });
  try {
    const page = await browser.newPage();
    await page.setViewport({ width: 1440, height: 900, deviceScaleFactor: 1 });
    await page.goto('https://example.com', {
      waitUntil: 'load',
      timeout: 60000,
    });
    await page.screenshot({ path: 'page.png', type: 'png' });
  } finally {
    await browser.close();
  }
}

main().catch((error) => {
  console.error(error);
  process.exitCode = 1;
});

Run it with node capture.cjs. The output file, page.png, is written in the current working directory. Puppeteer’s screenshot API and basic navigation sequence are documented at Puppeteer screenshots.

Choose the output size deliberately

  • Viewport screenshot: The default captures the visible viewport. Set width, height, and device scale factor before navigation when dimensions matter. A device scale factor above 1 increases pixel dimensions and memory use.
  • Full-page screenshot: Pass fullPage: true to capture the full document: await page.screenshot({ path: 'full.png', fullPage: true });. Very long pages can require substantially more memory and image processing time.
  • Element screenshot: Locate an element and capture its bounding box, for example await page.locator('main').screenshot({ path: 'main.png' });. The selector must match an element present on the page.

For pages with lazy-loaded images, the load event may fire before content below the fold is rendered. You can wait for a selector that indicates the page is ready, scroll through the page to trigger lazy loading, or use a deliberate delay when the site requires it. Avoid treating a fixed delay as a universal guarantee that a dynamic page is finished.

Make the VPS capture reliable and safer

Check Chrome’s Linux dependencies

Chrome may be installed but fail at startup when shared Linux libraries are missing. Puppeteer’s troubleshooting guide lists common Debian dependencies and explains how to check Chrome for missing shared libraries. The exact package set depends on the Chrome release and VPS image, so use the guide for your current environment instead of copying an old package list blindly: Puppeteer troubleshooting.

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

Keep the browser sandbox enabled

Chrome’s sandbox is a security boundary for untrusted web content. Puppeteer strongly discourages launching with --no-sandbox; do not add it as a routine fix for a startup error. Diagnose missing libraries, user permissions, or container configuration first. If your deployment environment requires disabling the sandbox, understand the security trade-off and isolate the workload rather than capturing arbitrary pages in a broadly privileged process.

Bound concurrency and clean up

  • Use explicit navigation timeouts and handle failures so one stalled site does not hold a worker indefinitely.
  • Limit simultaneous browser pages to a value you validate on your own VPS. No reliable concurrency number is established for the listed CPU and memory configuration.
  • Close pages and browsers after each job, including error paths; the finally block in the example handles browser cleanup.
  • Monitor memory, CPU, disk space, and network use during representative captures. Full-page images and pages with heavy scripts can raise resource use.
  • For recurring jobs, log the target URL, navigation outcome, duration, and error details. Avoid logging sensitive query strings or credentials.

Choose a low-cost Indian VPS without guessing at capacity

Compare plans on more than the advertised monthly price. A low entry price can be tied to a long billing commitment and a higher renewal rate; Chromium also needs enough resources for the pages you capture.

What to compare Why it matters
Recurring and renewal cost Compare the full billing term, renewal amount, and applicable taxes rather than only the headline monthly rate.
vCPU and RAM Browser pages compete for CPU and memory. Test your actual sites and concurrency on the configuration you intend to use.
Storage and bandwidth Consider browser files, saved images or PDFs, logs, and the amount of page content fetched.
Data-center location Choose a location appropriate to the pages and users you serve; location can affect network latency.
Backups and recovery Check what is included, how often backups run, and how restoration works.
Root access and provider restrictions Confirm you can install system libraries and run Chrome, and check resource or automation restrictions.

The provider example above is one India-facing listing, not a like-for-like comparison across VPS companies. No independent benchmark establishes a cheapest provider or a sustainable screenshot rate for a given plan.

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 you would rather request a screenshot than install and maintain Chromium, ScreenshotNeo provides a website screenshot API and MCP server. A single GET request can return PNG, JPEG, WebP, or PDF; the API accepts common screenshot parameter names used by other screenshot APIs. 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://example.com -o shot.webp

ScreenshotNeo accepts cookie or consent banners and removes 60+ known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and responses identify page verdict and billing status in headers. Its MCP server includes take_screenshot, get_page_info, and capture_pdf for AI agents and other MCP clients. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. Sign up for ScreenshotNeo free.

Troubleshooting common failures

Symptom Likely cause What to do
Launch reports that Chrome or a browser executable is missing Install scripts did not run, or a browser was not installed for puppeteer-core. For the standard package, run npx puppeteer browsers install. If using puppeteer-core, install a compatible browser and configure its executable path as documented for your setup.
Chrome exits immediately or reports a shared-library error One or more Linux runtime libraries are missing. Follow Puppeteer’s troubleshooting guide and check the browser for missing shared libraries on the actual VPS image.
Navigation times out The site is slow, waits on ongoing network activity, blocks automation, or does not reach the selected readiness condition. Choose an appropriate readiness condition, set a realistic timeout, and handle navigation errors. Do not assume every site will finish loading the same way.
Screenshot misses images or page sections Content may be lazy-loaded or rendered after the load event. Wait for a relevant selector or scroll through the page to trigger lazy loading before taking a full-page capture.
Capture process is killed or the VPS becomes unresponsive Memory or CPU demand may exceed available resources, especially with long pages or concurrent captures. Reduce concurrency, test viewport rather than full-page output, and monitor resource use. Increase VPS resources only after identifying the bottleneck.
Fix suggestion says to use --no-sandbox Sandbox or execution-environment configuration is not being handled correctly. Do not treat disabling the sandbox as a default remedy. Check permissions and dependencies, and isolate any environment where sandboxing must be disabled.

Frequently Asked Questions

Can Puppeteer run on an ARM64 Indian VPS?

Puppeteer’s system-requirements page lists Debian/Ubuntu Linux arm64 among supported Chrome for Testing platforms. Confirm the exact browser and release requirements for your VPS image.

Does this setup generate a PDF as well as an image?

Puppeteer has a separate page PDF API; the example here is configured to write a PNG screenshot.

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.