Skip to main content

Prerequisites

Before installing nodriver, ensure you have:
1

Python 3.9 or higher

nodriver requires Python 3.9 or later. Check your version:
2

A Chromium-based browser

You need Chrome, Chromium, Edge, or Brave installed on your system, preferably in the default location.
nodriver will automatically locate your browser in most cases. You can specify a custom path if needed.

Install with pip

The easiest way to install nodriver is using pip:
It’s recommended to use a virtual environment to avoid dependency conflicts:

Update to the latest version

To update nodriver to the latest version:

Dependencies

nodriver has minimal dependencies that will be installed automatically:
  • mss - For screen capture functionality
  • websockets (>=14) - For CDP communication
  • deprecated - For deprecation warnings

Optional dependencies

For additional features, you may want to install:
Required for the tab.cf_verify() method to work:
If you’re contributing to nodriver:
This includes: black, build, isort, sphinx, and other development tools.

Installation for headless environments

If you’re running nodriver on a server or in a Docker container without a display, you have two options:
Run nodriver in headless mode (no visible browser window):
Headless mode may be more detectable by anti-bot systems. Use with caution.

Docker installation

For Docker environments, here’s a sample Dockerfile:

Verify installation

Verify that nodriver is installed correctly:
Or run a quick test:
If this runs without errors and prints a page title, you’re all set!

Troubleshooting

If nodriver can’t find your browser, specify the path manually:
On Linux/Mac, you may need to make the browser executable:
If you get a port conflict error, nodriver will usually find another port automatically. If issues persist, you can specify a port:
Ensure you have websockets version 14 or higher:

Next steps

Quickstart guide

Now that you have nodriver installed, learn how to build your first automation script