This project facilitates running a Windows Chrome antidetect browser using the nodriver automation library within a Docker Linux container with Wine. This setup eliminates the need for a Windows virtual machine, making the process easier, faster, and more efficient.
Ensure you have Docker Engine installed. If not, follow the installation guide here. If you want run docker as non-root user do not forget about this
-
Upload Antidetect Chrome Browser:
- Place your preferred antidetect Chrome browser in the
chrome/bin
directory. - Ensure
chrome.exe
is located atchrome/bin/chrome.exe
.
- Place your preferred antidetect Chrome browser in the
-
Create Dotenv File:
- Run the following bash script to generate
.env
file./create_dotenv.sh
- The
.env
contains:PROFILE_NAME
: The name of the browser profile (--user_data_dir
chrome arg). You can set any name, create profiles as needed, and reuse them. All profiles are stored inchrome/profiles/
. Feel free to add or remove profiles as necessary. If you run./run.sh
with a non-existent profile, a new blank one will be created.SCRIPT_NAME
: The name of the script to run. All scripts are located inchrome/scripts/
. Each script should contain arun()
function as the entry point.- Rest system env variables that accessible in Chrome Nodriver context
- Run the following bash script to generate
-
Build and Run the Docker Container:
- Run the following command to build the container with Wine:
./build.sh
- Execute the following command to run the container. This script will handle the post-build GUI Wine installation
wine-mono
andpython
on the first run. Subsequent runs will be ready for use:./run.sh
- Run the following command to build the container with Wine:
Below is an example of a Chrome nodriver script that demonstrates how to create your own scripts:
import os
async def run(driver):
url = os.getenv("BROWSER_CHECKER_URL")
await driver.get(url)
while True: pass # keep browser open
This script opens an online browser fingerprint checker. The URL is retrieved from .env
. By default, the file contains the following entries, with only one uncommented:
BROWSER_CHECKER_URL=https://abrahamjuliot.github.io/creepjs/
You can manage these environment variables by setting new ones and accessing them using os.getenv
in your automation scripts.
You can use the ./sharedir
directory for file uploads or downloads in your automation scripts. It is accessible at:
/home/wineuser/sharedir
inside the Linux containerZ:\\home\\wineuser\\sharedir
inside the Wine context
You should use an antidetect Chrome browser. This involves modifying the original Chrome source code to make the browser undetectable. This mean spoof Canvas, WebGL, Audio, WebRTC (etc) detection and set these spoofing params with Wine environ variables in .env
This project built and tested on Debian 12 (bookworm) Docker host. So here are known possible issues below
If chrome run with black window then try restart X window manager with this script
./debug/reset_display.sh
If Wine broken you can resinstall it this way. Do not worry your browser profiles and nodriver scripts will NOT be deleted.
./debug/clear_wine_prefix.sh
Then just run you profile and script with ./run.sh
to reinstall