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 errorsTo take Selenium screenshots on a headless Linux server in India, create an Ubuntu Lightsail instance in AWS’s Mumbai Region (ap-south-1), install Chrome and Selenium, and run Chrome with --headless=new. For an ordinary setup, Selenium Manager can obtain a compatible ChromeDriver; no desktop session or Xvfb is needed just to run Chrome headlessly. The example below saves a PNG screenshot after waiting for the page’s document to load. AWS lists Mumbai as a Lightsail Region, and Selenium documents its Chrome options and driver handling.
Choose a Mumbai Lightsail instance
In the Lightsail console, create a Linux/Unix instance, choose the Mumbai Region (ap-south-1), select an Ubuntu image, and choose an instance plan that suits your workload. AWS’s instance creation guide covers selecting the location, image, and instance options. Choose an Availability Zone within Mumbai when prompted; an instance runs in one Availability Zone at a time.
Mumbai is an available India deployment location, not a guarantee of low latency to every target website. The destination site’s location, its own response time, and network conditions also affect capture duration.
Connect and install the prerequisites
- Connect with SSH. Open the instance’s browser-based SSH terminal in Lightsail, or connect using your preferred SSH client and the instance’s public IP.
- Update Ubuntu and install basic tools. Run
sudo apt-get update, thensudo apt-get install -y python3 python3-venv python3-pip wget gnupg. AWS notes that package commands vary by image; Ubuntu and Debian useapt-get. - Install Google Chrome. Add Google’s official Linux package repository and install its stable browser package. The following commands use Google’s signing key and repository for Debian-based systems:
sudo install -d -m 0755 /etc/apt/keyrings wget -qO- https://dl.google.com/linux/linux_signing_key.pub | sudo gpg --dearmor -o /etc/apt/keyrings/google-chrome.gpg sudo chmod a+r /etc/apt/keyrings/google-chrome.gpg echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/google-chrome.gpg] http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/google-chrome.list sudo apt-get update sudo apt-get install -y google-chrome-stableThese commands are a practical installation path, not a version-pinned recipe established by AWS or Selenium. Check Google’s current Linux packaging instructions if its repository setup changes.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.#1 Best Overall
HP 14" HD Laptop, Windows 11, Intel Celeron Dual-Core Processor Up to 2.60GHz, 4GB RAM, 64GB SSD, Webcam, Dale Pink (Renewed)- 14" diagonal, 1366x768 resolution, HD BrightView LED, Glossy NON-TOUCH Display
- Create a Python environment and install Selenium. From your project directory, run:
python3 -m venv .venv . .venv/bin/activate python -m pip install --upgrade pip selenium
Record the installed versions when diagnosing compatibility: google-chrome --version, python -m pip show selenium, and, after a successful session, driver.capabilities for the browser and driver details.
Run a headless screenshot script
Save this as capture.py. It sets a predictable viewport, waits for the browser’s document load event through Selenium’s page-load behavior, writes a PNG, and closes Chrome even if navigation or capture raises an error.
from pathlib import Path
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
URL = "https://example.com"
OUTPUT = Path("screenshot.png")
options = Options()
options.add_argument("--headless=new")
options.add_argument("--window-size=1440,1000")
# Selenium Manager handles driver acquisition in supported ordinary setups.
driver = webdriver.Chrome(options=options)
try:
driver.set_page_load_timeout(60)
driver.get(URL)
driver.save_screenshot(str(OUTPUT))
print(f"Saved {OUTPUT.resolve()}")
finally:
driver.quit()
Run it from the activated environment with python capture.py. The screenshot is written to the current working directory as screenshot.png. Replace https://example.com with the page you need. A successful get() normally waits for the document’s load event, but a JavaScript-heavy page may render important content later; in that case add a condition for the specific element the screenshot requires rather than relying on an arbitrary delay.
Rank #2
- 1.1 GHz (boost up to 2.4GHz) Intel Celeron N5030 Quad-Core
- 4GB DDR4 System Memory; 128GB Solid State Drive
- 11.6" HD (1366 x 768) Multi-Touch Display
- Combo headphone/microphone jack - Noble Wedge Lock slot - HDMI; 2 USB 3.1 Gen 1
- Windows 11 Pro
Selenium’s Chrome documentation lists --headless=new as a Chrome argument. Chrome explains that headless mode runs without a visible UI. Its current unified headless mode uses regular Chrome code; since Chrome 132, the older headless implementation is distributed separately as chrome-headless-shell. Do not assume an old Headless Chrome guide or a legacy pinned driver remains current.
Wait for a page-specific element when needed
For pages where content appears after the initial load, use an explicit wait for a selector that indicates the content is ready. For example, after importing By and WebDriverWait, replace the simple navigation-and-capture lines with:
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
# After driver.get(URL):
WebDriverWait(driver, 20).until(
lambda browser: browser.find_element(By.CSS_SELECTOR, "main")
)
driver.save_screenshot(str(OUTPUT))
Choose a selector that represents the content you actually need. A generic wait such as “sleep for five seconds” can be too short on a slow response and waste time on a fast one.
Rank #3
- 256 GB SSD of storage.
- Multitasking is easy with 16GB of RAM
- Equipped with a blazing fast Core i5 2.00 GHz processor.
Choose how ChromeDriver is managed
| Approach | When it fits | Trade-off |
|---|---|---|
| Selenium Manager | Use webdriver.Chrome(options=options) on a supported setup and let modern Selenium manage driver acquisition. |
Convenient for ordinary setups, but initial acquisition may need outbound network access. Selenium’s troubleshooting documentation says Selenium Manager can download the correct driver for common setups from Selenium 4.6. |
| Manually managed ChromeDriver | Use a driver you install and maintain yourself, or explicitly set its location in your Selenium configuration. | More control over repeatable deployments, but you must keep ChromeDriver’s major version aligned with Chrome’s and update both as needed. |
Selenium’s Chrome guidance describes compatibility with Chrome v75 and greater and says Chrome and ChromeDriver major versions should match. That broad statement does not guarantee every current Chrome release works with every Selenium package. For reproducible production jobs, record and manage the actual Ubuntu, Chrome, ChromeDriver, and Selenium versions used by your deployment. See Selenium’s driver troubleshooting and Selenium Manager guidance.
Keep the instance reachable and secure
- Limit SSH ingress. In the Lightsail networking settings, restrict inbound SSH (TCP port 22) to trusted source IP addresses where possible. AWS notes that IPv4 and IPv6 firewalls are configured independently; review both if you use both address families.
- Do not expose WebDriver unnecessarily. A screenshot worker generally needs outbound web access to reach target pages. Do not open a public WebDriver port unless remote WebDriver access is part of your architecture and separately protected.
- Plan for the public IP. Without a static IP, an instance’s public IP can change after stop and restart. Attach a static IP if clients or allowlists need a stable address. See AWS’s Lightsail firewall documentation and IP address and snapshot documentation.
- Use snapshots deliberately. A snapshot is a point-in-time copy that can help restore or recreate an instance; AWS charges for snapshot storage. A restored snapshot also restores its older software state, so apply security updates after recovery.
Troubleshoot common failures
Chrome or ChromeDriver version mismatch
A session may fail to start if the browser and driver are incompatible. Check google-chrome --version and the driver version if you manage it manually. Align their major versions, or remove the manually configured driver and let a current Selenium installation use Selenium Manager in a supported setup.
Selenium Manager cannot obtain a driver
Driver acquisition can fail if the instance cannot reach the required network resources or if the setup is unsupported. Check outbound network access and the Selenium error output. For a controlled deployment, install a compatible ChromeDriver yourself, put it on PATH, or configure its path explicitly in Selenium.
Rank #4
- EFFORTLESS EVERYDAY PERFORMANCE: Powered by Intel Celeron N4020 processor and Windows 11 Home system, delivering reliable, low-power efficiency for daily tasks like document editing, email, online classes, and web browsing
- 15.6-INCH FULL HD DISPLAY: Enjoy immersive visuals on the 15.6" FHD (1920x1080) anti-glare screen with micro-edge bezels. Delivers clear details and comfortable viewing for long study sessions, working on spreadsheets, and video playback
- RESPONSIVE MULTITASKING & STORAGE: Built with 4GB LPDDR4 RAM and 128GB eMMC storage for smooth daily essential use. Expand your storage by up to 1TB via the integrated TF card slot to easily store movies, photos, and working files
- ADVANCED CONNECTIVITY: Outfitted with 2x Full-Featured Type-C ports for data transfer, fast charging, and dual-monitor output, alongside 2x USB 3.2 Gen1 ports and a 3.5mm audio jack for complete peripheral compatibility
- LIGHTWEIGHT & SILENT OPERATION: Slim and portable for effortless travel or commuting. Features a 1MP HD webcam for remote meetings, 38Wh battery with 45W Type-C fast charging, and a fanless silent design for peaceful work environments.
Screenshot is blank or misses page content
The page may not have rendered the relevant content when capture ran, or the target may itself return a blank or blocked page. Wait for a meaningful page element, confirm the URL loads in Chrome, and check the page’s behavior from the instance. A document load event alone does not guarantee that all asynchronous content or lazy-loaded images are ready.
Navigation times out
A slow or non-responsive target can exceed the page-load timeout. Confirm the URL is reachable from the instance, use an appropriate timeout for the workload, and handle timeouts explicitly if the application should retry or capture a diagnostic result. Avoid treating a timeout as a successful screenshot.
Chrome exits or cannot start on a small instance
Browser startup and page rendering consume memory and CPU. Check available memory and system logs, reduce concurrent browser sessions, and choose an instance with resources appropriate to the workload. The available evidence does not establish a universal Lightsail plan size or screenshot throughput; measure your own pages and concurrency needs.
Windows 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 reinstallCrashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteBest Value
- WINDOWS 11 | STABLE PERFORMANCE: Powered by Intel Celeron N4020 processor and Windows 11 system, this laptop delivers stable performance for everyday computing tasks. It supports web browsing, online learning, document editing, email communication, and basic office work with optimized power efficiency, providing a practical and reliable experience for essential daily use for daily use.
- 15.6” FHD IPS DISPLAY: Features a 15.6-inch Full HD IPS display with narrow bezels, offering wider viewing angles and clearer image details compared to standard panels. The improved screen-to-body ratio enhances visual experience for study, reading, document work, and video playback, making it suitable for both productivity and entertainment use.
- 4GB DDR4 + 128GB eMMC STORAGE: Equipped with 4GB DDR4 memory and 128GB eMMC storage for everyday basics such as browsing, documents, email, and online learning platforms. The built-in TF card slot supports storage expansion up to 1TB, giving you more flexibility for files, photos, videos, and daily documents. TF card not included.
- CONNECTIVITY & PORTS: Includes 1× TF card slot, 2× USB 3.2 Gen1 ports, and 2× full-featured Type-C ports (USB 3.2 Gen1). The Type-C ports support data transfer, charging, and video output, enabling flexible connection with external devices such as monitors, storage, and peripherals for daily work and study use.
- LIGHTWEIGHT DESIGN | ONLINE COMMUNICATION: Designed with a slim, portable profile, this laptop is easy to carry for school, commuting, and travel. A built-in 1MP front camera supports online classes, video meetings, remote communication, and everyday conferencing. The 3300mAh battery works with the low-power system design to support practical daily use, while thermal optimization helps maintain quieter operation during extended tasks.
Or skip the browser setup
ScreenshotNeo is a website screenshot API and MCP server. One GET request can return an image or PDF without installing Chrome on your Lightsail machine; its API documentation covers request options.
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 like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; those steps can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers indicate the page verdict and billing status. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients. The Free plan includes 1,000 screenshots per month without a card; paid plans start at $5 for 3,000 screenshots.
Sign up for 1,000 free screenshots a month, with no card required.
Frequently Asked Questions
Do I need Xvfb to run headless Chrome?
No. Chrome’s headless mode runs without a visible UI, so a desktop display server is not inherently required for this workflow.
Can I use this setup for a page other than a public website?
Yes, if the Lightsail instance can reach the target and you supply any required authentication or network access. The example uses a public URL and does not configure site-specific credentials.
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.

