Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Repair Windows errors before they cause bigger problems3Scan for outdated or missing drivers - takes under a minuteSome links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
For a basic local Grid, install Java 11 or newer, download the Selenium Server JAR, and run it in Standalone mode:
java -jar selenium-server-<version>.jar standalone
Point your Selenium client at http://localhost:4444, then verify the service with GET /status. Use Hub-and-Node or Distributed mode only when you need separate machines, browser environments, or independently scalable components. Keep every Grid endpoint protected from untrusted networks.
Prerequisites
- Java 11 or higher. Confirm with
java -version. - A browser installed on the machine that will run sessions.
- The Selenium Server JAR downloaded for the release you intend to run.
- Driver discovery. Put browser drivers on
PATH, or enable Selenium Manager with--selenium-manager true. - Firewall rules that allow only trusted test clients to reach the Grid.
The official setup guidance is in Selenium’s Grid getting-started guide. Replace every version placeholder below with the filename you actually downloaded.
Choose a Grid topology
| Mode | Processes and machines | Best fit | Trade-off |
|---|---|---|---|
| Standalone | All Grid components in one process on one machine | Local development, debugging and simple CI | Capacity and browser environments are tied to one host |
| Hub and Node | A Hub accepts sessions; one or more Nodes provide browser capacity | Different operating systems or browser versions, with capacity that can change independently | More processes and network configuration than Standalone |
| Distributed | Event Bus, New Session Queue, Session Map, Distributor, Router and Nodes run as separate components | Large or separately operated deployments | Every component address and port must be reachable and coordinated |
Standalone is the shortest valid scripted path. A Hub-and-Node deployment uses the Hub address as the client endpoint. In a fully Distributed deployment, clients use the Router address. Selenium’s applicability guidance does not prescribe one topology for every team; choose based on machine count, browser diversity and whether capacity must scale independently.
#1 Best Overall
Start Standalone from a shell script
Create start-grid.sh beside the downloaded JAR:
#!/usr/bin/env bash
set -Eeuo pipefail
SELENIUM_JAR="${SELENIUM_JAR:-selenium-server-4.x.y.jar}"
GRID_HOST="${GRID_HOST:-127.0.0.1}"
GRID_PORT="${GRID_PORT:-4444}"
if ! command -v java >/dev/null 2>&1; then
echo "Java 11 or newer is required" >&2
exit 1
fi
if [[ ! -f "$SELENIUM_JAR" ]]; then
echo "Missing Selenium Server JAR: $SELENIUM_JAR" >&2
exit 1
fi
exec java -jar "$SELENIUM_JAR" standalone
--host "$GRID_HOST"
--port "$GRID_PORT"
--selenium-manager true
- Change
selenium-server-4.x.y.jarto the downloaded filename, or setSELENIUM_JAR=/path/to/selenium-server-<version>.jar. - Make it executable:
chmod +x start-grid.sh. - Run it:
./start-grid.sh. - Leave the process running in that terminal, or supervise it with your CI service or process manager.
Do not copy a version-specific flag list from an old article. Ask the JAR you are running what it supports:
java -jar selenium-server-<version>.jar standalone --help
java -jar selenium-server-<version>.jar standalone --config-help
java -jar selenium-server-<version>.jar info config
Selenium documents these commands and TOML configuration in its configuration help and CLI options pages. TOML is preferable when settings need review and source control.
Verify the Grid before running tests
Check the documented status endpoint:
curl --request GET 'http://localhost:4444/status'
A healthy response reports Grid state and registered Node availability. If your script binds to another host or port, substitute that address. Check this endpoint in CI before creating a test session so a startup failure is separated from a browser-test failure.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Outdated 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 matchRemoteWebDriver client example
Use the Standalone URL in the client. For example, a Python test can connect through Selenium’s remote driver:
Rank #2
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
options = Options()
options.add_argument("--headless=new")
driver = webdriver.Remote(
command_executor="http://localhost:4444",
options=options,
)
try:
driver.get("https://example.com")
print(driver.title)
finally:
driver.quit()
For Hub-and-Node, replace the executor URL with the Hub address. For Distributed mode, use the Router address.
Scripted Hub-and-Node and Distributed starts
Hub and Node
Run the Hub process first, then register each Node with the Hub. The exact CLI flags vary by Selenium release, so inspect the installed JAR’s help output. Conceptually, your supervisor should:
- Start the Hub on its chosen host and port.
- Wait until the Hub’s status endpoint responds.
- Start each Node with a browser installed and a registration address that points to the Hub.
- Poll
/statusuntil the expected Node appears before launching tests.
Use this topology when one machine cannot provide all required operating systems or browser versions, or when you want to add and remove browser capacity without replacing the Hub.
Distributed mode
A distributed script starts the Event Bus, New Session Queue, Session Map, Distributor, Router and Nodes as separate components. Every process needs matching, reachable addresses and ports. A localhost-only sample is not a production network design. For an external session store, Selenium’s external datastore tutorial shows a distributed.sh example and JDBC- or Redis-backed Session Map configurations; replace its instructional hostnames, ports, credentials and storage values with real deployment settings.
Use a supervisor that records each process ID, redirects logs, stops children on failure, and refuses to start tests until the Router status check succeeds. If any component is on another machine, verify DNS, firewall rules and bidirectional connectivity before debugging WebDriver code.
Configuration that survives upgrades
- Keep the Selenium JAR version and browser images or host packages pinned in your build.
- Store non-secret Grid settings in a TOML file and review changes.
- Pass secrets through your CI secret store rather than committing them to shell scripts or TOML.
- Use the running JAR’s
--helpand--config-helpoutput as the authority when an option differs between releases. - Set explicit host and port values in multi-machine deployments; do not rely on an address that is reachable only from localhost.
Security boundaries
Selenium states: “Selenium Grid must be protected from external access using appropriate firewall permissions.” An exposed Grid can provide access to infrastructure, internal applications and files, and can permit custom binary execution. Bind a local development Grid to loopback where possible. In CI or a shared environment, place it on a private network, restrict inbound rules to approved runners, and add an authenticated proxy or network control if your architecture requires remote access. Never publish port 4444 directly to the public internet.
Troubleshooting checklist
Java is missing or too old
Symptom: the shell reports that java is not found or the server refuses to start. Fix: install Java 11 or newer, ensure the intended binary is on PATH, and rerun java -version.
Recommended Free Tools
The JAR filename cannot be opened
Symptom: “Unable to access jarfile.” Fix: list the directory, correct SELENIUM_JAR, and quote paths containing spaces.
/status fails or reports no availability
Symptom: connection refused, timeout, or no registered Node. Fix: inspect the server log, confirm the script is still running, verify host and port, and in Hub-and-Node or Distributed mode check every component address and firewall rule. Do not debug the test until the status response is healthy.
Session creation cannot find a browser or driver
Symptom: a session fails during startup. Fix: install the requested browser on the Node, verify its version, put the matching driver on PATH, or enable Selenium Manager with --selenium-manager true. Ensure the client requests a capability that the Node can satisfy.
Clients target the wrong endpoint
Symptom: a client reaches a server but cannot create sessions. Fix: Standalone clients use the Standalone URL; Hub-and-Node clients use the Hub URL; Distributed clients use the Router URL. Check that the address is reachable from the test runner, not merely from the Grid host.
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 →Components work on one host but not across hosts
Symptom: a distributed script works with localhost values but fails after deployment. Fix: replace localhost with resolvable hostnames or private IPs, open only the required ports, and test connectivity from each component to every configured peer.
Best Value
Performance and operational practices
- Run the smallest topology that meets the workload: Standalone avoids network hops and coordination overhead.
- Use separate Nodes when browser versions or operating systems differ, rather than forcing incompatible capabilities onto one host.
- Poll readiness with a timeout and fail clearly; an infinite wait hides startup errors.
- Capture server and Node logs as CI artifacts, including the exact JAR version and command line.
- Stop the Grid after ephemeral CI jobs so browser processes and sessions do not leak into later runs.
- For large deployments, treat the Event Bus, queue, session store and component ports as production dependencies, not incidental localhost settings.
Or skip the browser setup
If your goal is a clean image or PDF of a URL rather than interactive browser testing, ScreenshotNeo provides a single HTTP request. It accepts cookie or consent banners as a visitor and removes more than 60 known consent platforms, newsletter popups and chat widgets before capture. Bot checks, CAPTCHAs, blank pages, timeouts, failed loads and cache hits are not billed, and response headers identify the page verdict and billing result.
See the full parameter list in the ScreenshotNeo documentation. cURL:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Python:
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
Node.js:
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
It also offers an MCP server with take_screenshot, get_page_info and capture_pdf for Claude, Cursor and other MCP clients. Features include full-page and selector captures, device and retina settings, PDF controls, custom CSS or JavaScript, waits, request blocking, headers and cookies, geolocation, signed links, async webhooks, bulk capture of up to 100 URLs per call, caching TTLs and a usage API. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. Create a free ScreenshotNeo account.
Frequently asked questions
Can I run Grid without a Hub?
Yes. Standalone runs all components together and is the recommended starting point for a one-machine script.
Which endpoint should a remote client use?
Use the Standalone URL, the Hub URL in Hub-and-Node mode, or the Router URL in Distributed mode.
Why does Selenium recommend TOML?
TOML keeps a growing set of CLI settings readable and suitable for source control; confirm option names against the running JAR.
Is port 4444 safe to expose publicly?
No. Restrict access with firewall permissions and private networking; an exposed Grid can reach sensitive infrastructure and execute custom binaries.
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.

