To take Selenium screenshots on an India-based Linux VPS, install a Selenium language binding and Chrome, enable Chrome’s current headless mode with --headless, set an explicit viewport, wait for the page state you need, save the screenshot to a writable path, and close the WebDriver session. Start with one browser job at a time and measure the pages you actually capture; there is no established universal RAM-per-session minimum.
What you need on the VPS
A Selenium screenshot worker depends on three pieces: a Selenium language binding, the Chrome browser, and a browser driver. Current Selenium bindings use Selenium Manager by default to manage browsers and drivers. If you install or pin them yourself, keep Chrome and ChromeDriver aligned at the major-version level, as required by Selenium’s Chrome documentation.
As an Amazon Associate I earn from qualifying purchases.
Use a Linux VPS in India when the machine’s location matters for latency or data-location reasons. A VPS plan’s advertised entry-level price does not establish how many browser sessions it can run reliably. Page complexity, images and fonts, viewport dimensions, wait conditions, and concurrent browser count all affect resource use.
Install and run a basic Selenium screenshot worker
This Python example assumes Python, Chrome, and a current Selenium package are installed. Selenium Manager can resolve the driver in a supported online environment. The example captures the visible viewport, not the entire page.
#1 Best Overall
- Install Selenium:
python3 -m pip install selenium - Save this as
screenshot.py:from pathlib import Path from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.support.ui import WebDriverWait url = "https://example.com" output = Path("/tmp/screenshot.png") options = Options() options.add_argument("--headless") options.add_argument("--window-size=1365,900") # Selenium Manager manages the driver in current Selenium bindings. driver = webdriver.Chrome(options=options) try: driver.get(url) WebDriverWait(driver, 30).until( lambda d: d.execute_script("return document.readyState") == "complete" ) output.parent.mkdir(parents=True, exist_ok=True) driver.save_screenshot(str(output)) print(f"Saved {output}") finally: driver.quit() - Run it:
python3 screenshot.py. The output path is/tmp/screenshot.png; change it to a persistent, writable location if another process needs to retrieve the file.
Chrome’s current headless mode runs without a visible user interface. The Chrome Headless mode guide documents using --headless with Selenium. A virtual display such as Xvfb is not inherently required for this workflow.
Wait for the content you need
document.readyState == "complete" is a useful baseline, but it does not guarantee that a single-page app, delayed API response, animation, or lazy-loaded image is finished. Replace or supplement the condition with an explicit wait for a page-specific element that appears only when the content you need is ready. Use a finite timeout so an unresponsive page does not hold a worker indefinitely.
Rank #2
Choose viewport or full-page capture deliberately
--window-size=1365,900 sets the browser window dimensions used for a repeatable viewport screenshot. Chrome’s command-line reference demonstrates the same idea with --headless --screenshot --window-size=412,892 URL, which writes screenshot.png to the current working directory. See the Chrome Headless command-line reference. Selenium’s save_screenshot captures the current viewport; capturing a full page or waiting for lazy-loaded content requires additional script logic.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Deploy reliably on a low-cost VPS
Keep versions manageable
For a straightforward connected setup, use Selenium Manager, the default browser and driver management tool in current Selenium bindings. For pinned, offline, or manually maintained installations, manage Chrome and ChromeDriver together and verify their major versions match. Selenium’s Chrome documentation describes that compatibility requirement.
Rank #3
Use current Chrome headless mode with --headless. Do not copy older instructions that depend on --headless=old: Chromium says the old headless implementation is no longer part of the Chrome binary from M132 and that flag has no effect; the legacy implementation is separately available as chrome-headless-shell. See the Chromium Headless README.
Control output and cleanup
- Use a known writable output directory and unique filenames for repeated or concurrent jobs, so one capture does not overwrite another.
- Use
try/finallyor an equivalent cleanup path and calldriver.quit()even when navigation, waiting, or saving fails. This closes the WebDriver session and helps prevent Chrome processes from lingering. - For scheduled jobs, log the target URL, elapsed time, output path, and exception. Avoid logging credentials or sensitive page content.
Measure before increasing concurrency
Begin with one job at a time. Observe memory, CPU, render time, and failures on the actual target pages, then raise concurrency or resize the instance based on those measurements. The Selenium, Chrome, and AWS documentation cited here does not establish a validated minimum RAM-per-session figure. A number that works for a light static page may fail on a page with many scripts, large images, or multiple simultaneous browser processes.
What an India VPS may cost: a sourced example
AWS Lightsail’s published Linux/Unix bundle table lists the following public IPv4 plans. These are listed prices and specifications, not Selenium performance benchmarks. AWS says Asia Pacific (Mumbai) plans include half the data-transfer allowance shown in its general bundle table.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problems| Lightsail Linux/Unix bundle | Listed monthly price | Memory | vCPUs | SSD |
|---|---|---|---|---|
| Public IPv4, entry example | USD 7/month | 1 GB | 2 | 40 GB |
| Public IPv4, next example | USD 12/month | 2 GB | 2 | 60 GB |
Source: Amazon Lightsail Pricing and Lightsail instance bundles. Recheck current Mumbai availability, taxes, IPv4 choice, transfer allowance, storage, and price before provisioning; provider terms can change.
When comparing VPS offers, check memory allocation, CPU, disk, India-region availability, transfer allowance and overage charges, monthly billing and taxes, IPv4 costs, backups or snapshots, and whether resizing is available. Do not infer browser-worker capacity from a provider’s advertised plan alone.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Troubleshooting common failures
- Chrome or driver version error: If managing versions manually, check that Chrome and ChromeDriver have matching major versions. If using a current Selenium binding with network access, let Selenium Manager handle driver management.
- Chrome cannot start: Confirm Chrome is installed and executable by the account running the job, and that the process has access to required files and a writable temporary directory. Keep
--headlessenabled for a server without a graphical desktop. - Screenshot is blank or incomplete: The page may still be rendering when captured. Wait for a meaningful page-specific element or condition instead of relying only on navigation completion; investigate blocked requests or page-side errors if the expected content never appears.
- Screenshot dimensions differ from expectations: Set an explicit window size before capture and verify that the task is a viewport capture. Full-page output requires additional Selenium logic.
- Output file is missing: Check the process working directory and permissions. Prefer an absolute path and verify the file exists after saving.
- VPS slows down or jobs fail under load: Reduce concurrency, inspect memory and CPU during real captures, then resize or adjust workload. No universal safe session count or RAM minimum is established.
- Legacy headless flag behaves unexpectedly: Use current
--headless; from Chrome M132,--headless=oldno longer activates the old implementation in the Chrome binary.
Or skip the browser setup
If you would rather not maintain Chrome and Selenium on a VPS, ScreenshotNeo takes a screenshot from one GET request. Its API accepts a URL and can return PNG, JPEG, WebP, or PDF; see the ScreenshotNeo API docs.
Quick Recap
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
ScreenshotNeo removes cookie and consent banners, newsletter popups, and chat widgets before capture; those steps can be turned off. Bot checks/CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and responses identify the page verdict and billing status in headers. Its MCP server offers screenshot and PDF tools for AI agents. The free plan includes 1,000 screenshots a month without a card; paid plans start at $5 for 3,000.
Free tools Windows power users keep installed
One-click scans. No signup required.
Sign up for ScreenshotNeo’s free plan.
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.




