[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-9887":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":24,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":42,"readmeContent":43,"aiSummary":44,"trendingCount":16,"starSnapshotCount":16,"syncStatus":45,"lastSyncTime":46,"discoverSource":47},9887,"docker-selenium","SeleniumHQ\u002Fdocker-selenium","SeleniumHQ","Provides a simple way to run Selenium Grid with Chrome, Firefox, and Edge using Container Platform, making it easier to perform browser automation at scale","http:\u002F\u002Fwww.selenium.dev\u002Fdocker-selenium\u002F",null,"Shell",8640,2555,242,78,0,5,16,3,70.1,"Other",false,"trunk",true,[26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41],"containerization","devops","distributed-systems","docker","docker-selenium-grid","helm-chart","keda","kubernetes","kubernetes-selenium-grid","selenium","selenium-grid","selenium-grid-4","selenium-grid-setup","selenium-server","tools-and-automation","webdriver","2026-06-12 04:00:47","[![Build & test](https:\u002F\u002Fgithub.com\u002FSeleniumHQ\u002Fdocker-selenium\u002Factions\u002Fworkflows\u002Fbuild-test.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002FSeleniumHQ\u002Fdocker-selenium\u002Factions\u002Fworkflows\u002Fbuild-test.yml)\n[![Deploys](https:\u002F\u002Fgithub.com\u002FSeleniumHQ\u002Fdocker-selenium\u002Factions\u002Fworkflows\u002Fdeploy.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002FSeleniumHQ\u002Fdocker-selenium\u002Factions\u002Fworkflows\u002Fdeploy.yml)\n[![Release Charts](https:\u002F\u002Fgithub.com\u002FSeleniumHQ\u002Fdocker-selenium\u002Factions\u002Fworkflows\u002Fhelm-chart-release.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002FSeleniumHQ\u002Fdocker-selenium\u002Factions\u002Fworkflows\u002Fhelm-chart-release.yml)\n[![Nightly](https:\u002F\u002Fgithub.com\u002FSeleniumHQ\u002Fdocker-selenium\u002Factions\u002Fworkflows\u002Fnightly.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002FSeleniumHQ\u002Fdocker-selenium\u002Factions\u002Fworkflows\u002Fnightly.yml)\n[![Update Dev\u002FBeta Browser Images](https:\u002F\u002Fgithub.com\u002FSeleniumHQ\u002Fdocker-selenium\u002Factions\u002Fworkflows\u002Fupdate-dev-beta-browser-images.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002FSeleniumHQ\u002Fdocker-selenium\u002Factions\u002Fworkflows\u002Fupdate-dev-beta-browser-images.yml)\n[![Releases downloads](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fdownloads\u002Fseleniumhq\u002Fdocker-selenium\u002Ftotal.svg)](https:\u002F\u002Fgithub.com\u002FSeleniumHQ\u002Fdocker-selenium\u002Freleases)\n[![Ask DeepWiki](https:\u002F\u002Fdeepwiki.com\u002Fbadge.svg)](https:\u002F\u002Fdeepwiki.com\u002FSeleniumHQ\u002Fdocker-selenium)\n\n![GitHub Last Commit](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flast-commit\u002Fseleniumhq\u002Fdocker-selenium)\n[![GitHub Release](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fv\u002Frelease\u002Fseleniumhq\u002Fdocker-selenium?link=https%3A%2F%2Fgithub.com%2Fseleniumhq%2Fdocker-selenium%2Freleases%2Flatest&label=latest%20Image)](https:\u002F\u002Fgithub.com\u002Fseleniumhq\u002Fdocker-selenium\u002Freleases\u002F)\n![GitHub Commits Since Latest Release](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fcommits-since\u002Fseleniumhq\u002Fdocker-selenium\u002Flatest)\n![GitHub Commit Activity](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fcommit-activity\u002Fm\u002Fseleniumhq\u002Fdocker-selenium)\n![GitHub Contributors](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fcontributors\u002Fseleniumhq\u002Fdocker-selenium?label=Contributors%20-%20Thank%20you!)\n\n# Docker images for the Selenium Grid Server\n\nThe project is made possible by volunteer contributors who have put in thousands of hours of their own time, \nand made the source code freely available under the [Apache License 2.0](LICENSE.md).\n\nThese Docker images come with a handful of tags to simplify its usage, have a look at them in one of \nour [releases](https:\u002F\u002Fgithub.com\u002FSeleniumHQ\u002Fdocker-selenium\u002Freleases\u002Ftag\u002F4.43.0-20260404).\n\nTo get notifications of new releases, add yourself as a \"Releases only\" watcher. \n\nThese images are published to the Docker Hub registry at [Selenium Docker Hub](https:\u002F\u002Fhub.docker.com\u002Fu\u002Fselenium).\n- Hub: [![Docker Pulls](https:\u002F\u002Fimg.shields.io\u002Fdocker\u002Fpulls\u002Fselenium\u002Fhub.svg?maxAge=604800)](https:\u002F\u002Fhub.docker.com\u002Fr\u002Fselenium\u002Fhub\u002F)\n- Node-Chrome: [![Docker Pulls](https:\u002F\u002Fimg.shields.io\u002Fdocker\u002Fpulls\u002Fselenium\u002Fnode-chrome.svg?maxAge=604800)](https:\u002F\u002Fhub.docker.com\u002Fr\u002Fselenium\u002Fnode-chrome\u002F)\n- Standalone-Chrome: [![Docker Pulls](https:\u002F\u002Fimg.shields.io\u002Fdocker\u002Fpulls\u002Fselenium\u002Fstandalone-chrome.svg?maxAge=604800)](https:\u002F\u002Fhub.docker.com\u002Fr\u002Fselenium\u002Fstandalone-chrome\u002F)\n\nHelm Chart enables the creation of a Selenium Grid Server in Kubernetes at [![Artifact Hub](https:\u002F\u002Fimg.shields.io\u002Fendpoint?url=https:\u002F\u002Fartifacthub.io\u002Fbadge\u002Frepository\u002Fselenium-grid)](https:\u002F\u002Fartifacthub.io\u002Fpackages\u002Fsearch?repo=selenium-grid)\n\n## Community\n\nDo you need help to use these Docker images?\nTalk to us at https:\u002F\u002Fwww.selenium.dev\u002Fsupport\u002F\n\n## Contents\n\n\u003C!-- TOC -->\n* [Community](#community)\n* [Contents](#contents)\n* [System Recommendations](#system-recommendations)\n* [Quick start](#quick-start)\n  * [Try them out in a ready-to-use GitPod environment!](#try-them-out-in-a-ready-to-use-gitpod-environment)\n* [Experimental Multi-Arch amd64\u002Faarch64\u002Farmhf Images](#experimental-multi-arch-amd64aarch64armhf-images)\n* [Nightly Images](#nightly-images)\n* [Dev and Beta Channel Browser Images](#dev-and-beta-channel-browser-images)\n  * [Dev and Beta Standalone Mode](#dev-and-beta-standalone-mode)\n  * [Dev and Beta on the Grid](#dev-and-beta-on-the-grid)\n* [Single Node\u002FStandalone Image With All Browsers](#single-nodestandalone-image-with-all-browsers)\n* [Environment Variables](#environment-variables)\n* [Execution modes](#execution-modes)\n  * [Standalone](#standalone)\n  * [Hub and Nodes](#hub-and-nodes)\n  * [Fully distributed mode - Router, Queue, Distributor, EventBus, SessionMap and Nodes](#fully-distributed-mode---router-queue-distributor-eventbus-sessionmap-and-nodes)\n* [Video recording](#video-recording)\n* [Video recording with dynamic file name based on metadata in tests](#video-recording-with-dynamic-file-name-based-on-metadata-in-tests)\n* [Video recording and uploading](#video-recording-and-uploading)\n* [Retain recordings for failed sessions only](#retain-recordings-for-failed-sessions-only)\n* [Dynamic Grid](#dynamic-grid)\n  * [Configuration example](#configuration-example)\n  * [Share volumes config of Dynamic Grid container to node browser containers](#share-volumes-config-of-dynamic-grid-container-to-node-browser-containers)\n  * [Execution with Hub & Node roles](#execution-with-hub--node-roles)\n  * [Execution with Standalone roles](#execution-with-standalone-roles)\n  * [Using Dynamic Grid in different machines\u002FVMs](#using-dynamic-grid-in-different-machinesvms)\n  * [Execution with Docker Compose](#execution-with-docker-compose)\n  * [Configuring the child containers](#configuring-the-child-containers)\n  * [Video recording, screen resolution, and time zones in a Dynamic Grid](#video-recording-screen-resolution-and-time-zones-in-a-dynamic-grid)\n  * [Time zone configuration via env variable](#time-zone-configuration-via-env-variable)\n* [Deploying to Kubernetes](#deploying-to-kubernetes)\n* [Configuring the containers](#configuring-the-containers)\n  * [SE_OPTS Selenium Configuration Options](#se_opts-selenium-configuration-options)\n  * [SE_JAVA_OPTS Java Environment Options](#se_java_opts-java-environment-options)\n  * [SE_BROWSER_ARGS_* Add arguments for launching browser](#se_browser_args_-add-arguments-for-launching-browser)\n  * [Node configuration options](#node-configuration-options)\n  * [Node configuration relay commands](#node-configuration-relay-commands)\n  * [Setting Sub Path](#setting-sub-path)\n  * [Setting Screen Resolution](#setting-screen-resolution)\n  * [Grid Url and Session Timeout](#grid-url-and-session-timeout)\n  * [Session request timeout](#session-request-timeout)\n  * [Increasing session concurrency per container](#increasing-session-concurrency-per-container)\n  * [Running in Headless mode](#running-in-headless-mode)\n  * [Stopping the Node\u002FStandalone after N sessions have been executed](#stopping-the-nodestandalone-after-n-sessions-have-been-executed)\n  * [Automatic browser leftovers cleanup](#automatic-browser-leftovers-cleanup)\n  * [Mask sensitive information in console logs](#mask-sensitive-information-in-console-logs)\n  * [Secure Connection](#secure-connection)\n  * [Browser language and locale](#browser-language-and-locale)\n  * [Managing processes in container](#managing-processes-in-container)\n* [Building the images](#building-the-images)\n* [Build the images with specific versions](#build-the-images-with-specific-versions)\n* [Upgrade browser version in the images](#upgrade-browser-version-in-the-images)\n* [Upgrade browser and driver versions in the images](#upgrade-browser-and-driver-versions-in-the-images)\n* [Waiting for the Grid to be ready](#waiting-for-the-grid-to-be-ready)\n  * [Adding a HEALTHCHECK to the Grid](#adding-a-healthcheck-to-the-grid)\n  * [Using a bash script to wait for the Grid](#using-a-bash-script-to-wait-for-the-grid)\n* [Install certificates for Chromium-based browsers](#install-certificates-for-chromium-based-browsers)\n* [Alternative method: Add certificates to existing Selenium based images for browsers](#alternative-method-add-certificates-to-existing-selenium-based-images-for-browsers)\n* [Debugging](#debugging)\n  * [Using a VNC client](#using-a-vnc-client)\n  * [Using your browser (no VNC client is needed)](#using-your-browser-no-vnc-client-is-needed)\n  * [Disabling VNC](#disabling-vnc)\n* [Tracing in Grid](#tracing-in-grid)\n* [Troubleshooting](#troubleshooting)\n  * [`--shm-size=\"2g\"`](#--shm-size2g)\n  * [Headless](#headless)\n  * [Mounting volumes to retrieve downloaded files](#mounting-volumes-to-retrieve-downloaded-files)\n  * [Mounting volumes to retrieve video files](#mounting-volumes-to-retrieve-video-files)\n* [Stargazers over time](#stargazers-over-time)\n\u003C!-- TOC -->\n\n## System Recommendations\n- Docker Engine 26.1.4 or later\n- Docker Compose v2.34.0 or later\n- Docker Buildx v0.25.0 or later\n- Kubernetes v1.26.15 or later\n\n## Quick start\n\n1. Start a Docker container with Firefox\n\n```bash\ndocker run -d -p 4444:4444 -p 7900:7900 --shm-size=\"2g\" selenium\u002Fstandalone-firefox:4.43.0-20260404\n```\n\n2. Point your WebDriver tests to http:\u002F\u002Flocalhost:4444\n\n3. That's it! \n\n4. (Optional) To see what is happening inside the container, head to \u003Chttp:\u002F\u002Flocalhost:7900\u002F?autoconnect=1&resize=scale&password=secret>.\n\nFor more details about visualising the container activity, check the [Debugging](#debugging) section.\n\n:point_up: When executing `docker run` for an image that contains a browser please use \nthe flag `--shm-size=2g` to use the host's shared memory.\n  \n:point_up: Always use a Docker image with a full tag to pin a specific browser and Grid version.\nSee [Tagging Conventions](https:\u002F\u002Fgithub.com\u002FSeleniumHQ\u002Fdocker-selenium\u002Fwiki\u002FTagging-Convention) for details.\n\n### Try them out in a ready-to-use GitPod environment!\n\n[![Open in Gitpod](https:\u002F\u002Fgitpod.io\u002Fbutton\u002Fopen-in-gitpod.svg)](https:\u002F\u002Fgitpod.io\u002F#https:\u002F\u002Fgithub.com\u002FSeleniumHQ\u002Fdocker-selenium)\n\n___\n\n## Experimental Multi-Arch amd64\u002Faarch64\u002Farmhf Images\n\nFrom image tag based `4.21.0` onwards, the architectures supported by this project are as below:\n\n|       Architecture        | Available |\n|:-------------------------:|:---------:|\n|    x86_64 (aka amd64)     |     ✅     |\n| aarch64 (aka arm64\u002Farmv8) |     ✅     |\n| armhf (aka arm32\u002Farmv7l)  |     ❌     |\n\n### Browser images in multi-arch\n\nThe following browsers are available in multi-arch images:\n\n|       Architecture        | Chrome | Chromium | Firefox | Edge | CfT |\n|:-------------------------:|:------:|:--------:|:-------:|:----:|-----|\n|    x86_64 (aka amd64)     |   ✅    |    ✅     |    ✅    |  ✅   | ✅   |\n| aarch64 (aka arm64\u002Farmv8) |   ❌    |    ✅     |    ✅    |  ❌   | ❌   |\n| armhf (aka arm32\u002Farmv7l)  |   ❌    |    ❌     |    ❌    |  ❌   | ❌   |\n\nNote:\n\n- **Running an AMD64 image under emulation on an ARM64 platform is not recommended due to performance and [stability issues](https:\u002F\u002Fgithub.com\u002FSeleniumHQ\u002Fdocker-selenium\u002Fissues\u002F2298), or browsers could not launch.**\n\n- Google does not build Chrome (`google-chrome`) for Linux\u002FARM platforms. Hence, the Chrome (node and standalone) images are only available for AMD64.\nSimilarly, Microsoft does not build Edge (`microsoft-edge`) for Linux\u002FARM platforms.\n\n- We also supply Chrome for Testing (CfT), but it is only available for Linux\u002FAMD64.\n\n- For Linux\u002FARM use the open source Chromium browser. The Chromium (node and standalone) images are available in multi-arch.\n\n```bash\n$ docker run --rm -it -p 4444:4444 -p 5900:5900 -p 7900:7900 --shm-size 2g selenium\u002Fstandalone-chromium:latest\n```\n\n- Mozilla Firefox now is available for Linux\u002FARM64 via APT stable channel from v136+. The Firefox (node and standalone) images are available in multi-arch.\n\n~~Multi-arch images are tested on CircleCI with resource class Linux\u002FARM64. See the status below.~~ (Moved to GitHub Actions)\n\n[![CircleCI](https:\u002F\u002Fdl.circleci.com\u002Fstatus-badge\u002Fimg\u002Fgh\u002FSeleniumHQ\u002Fdocker-selenium\u002Ftree\u002Ftrunk.svg?style=svg)](https:\u002F\u002Fdl.circleci.com\u002Fstatus-badge\u002Fredirect\u002Fgh\u002FSeleniumHQ\u002Fdocker-selenium\u002Ftree\u002Ftrunk)\n\n### History of the multi-arch images\n\nFor experimental docker container images, which run on platforms such as the Apple M-series or Raspberry Pi,\nthe repository at\n[seleniumhq-community\u002Fdocker-seleniarm](https:\u002F\u002Fgithub.com\u002Fseleniumhq-community\u002Fdocker-seleniarm) provided images which\nare published on the [Seleniarm Docker Hub](https:\u002F\u002Fhub.docker.com\u002Fu\u002Fseleniarm) registry.\n\nSee issue [#1076](https:\u002F\u002Fgithub.com\u002FSeleniumHQ\u002Fdocker-selenium\u002Fissues\u002F1076) for more information on these images.\n\nNow, the fork [seleniumhq-community\u002Fdocker-seleniarm](https:\u002F\u002Fgithub.com\u002Fseleniumhq-community\u002Fdocker-seleniarm) was merged.\n\n### Build the multi-arch images locally\n\nWe recommend to enable the experimental feature [containerd image store](https:\u002F\u002Fdocs.docker.com\u002Fstorage\u002Fcontainerd\u002F) in Docker Engine.\n`containerd` understands multiplatform images, where a single image tag can refer to different variants covering a range of OS and hardware architectures.\nIt simplifies the process of building, storing, and distributing images across different platforms.\n\nA single command to enable that feature in Docker Engine:\n\n```bash\nmake set_containerd_image_store\n```\n\nNoted: That command is only compatible with Ubuntu. For users use Docker Desktop on macOS, it can be enabled easily via\n\n> `Settings > General > Use containerd for pulling and storing images`\n\nTo build all the images for multiplatform at once, run the following command:\n\n```bash\nPLATFORMS=linux\u002Famd64,linux\u002Farm64 make all\n```\n\nTo build the images for a specific platform, run the following command:\n\n```bash\nPLATFORMS=linux\u002Farm64 make all\n```\n\nBy default, without specifying the `PLATFORMS` variable, the images are built with current host architecture.\n\nSimilarly, if you are using host ARM64 architecture, you can build the images for AMD64 architecture by running the following command:\n\n```bash\nPLATFORMS=linux\u002Famd64 make all\n```\n\n___\n\n## Nightly Images\n\nNightly images are built on top of the [Nightly](https:\u002F\u002Fgithub.com\u002FSeleniumHQ\u002Fselenium\u002Freleases\u002Ftag\u002Fnightly) build on the upstream project [Selenium](https:\u002F\u002Fgithub.com\u002FSeleniumHQ\u002Fselenium) with the latest changes on main branch in this repository. The image tag is `nightly`. This is not recommended to use images in production. It is only for testing purpose.\n\n```bash\n$ docker run -d -p 4442-4444:4442-4444 --name selenium-hub selenium\u002Fhub:nightly\n```\n\nCheck out the docker compose to get started with Nightly images [docker-compose-v3-full-grid-nightly.yml](docker-compose-v3-full-grid-nightly.yml)\n\n## Dev and Beta Channel Browser Images\n\nTo run tests or otherwise work with pre-release browsers, Google, Mozilla, and Microsoft maintain a Dev and Beta release channel for those who need to see what's soon to be released to the general population.  \n\n### Dev and Beta Standalone Mode\n\nHere are the instructions to run them in Standalone mode:\n\n**Chrome Beta:**\n\n```bash\n$ docker run --platform linux\u002Famd64 --rm -it -p 4444:4444 -p 7900:7900 --shm-size 2g selenium\u002Fstandalone-chrome:beta\n```\n\n**Chrome Dev:**\n\n```bash\n$ docker run --platform linux\u002Famd64 --rm -it -p 4444:4444 -p 7900:7900 --shm-size 2g selenium\u002Fstandalone-chrome:dev\n```\n\n**Firefox Beta:**\n\n```bash\n$ docker run --rm -it -p 4444:4444 -p 7900:7900 --shm-size 2g selenium\u002Fstandalone-firefox:beta\n```\n\n**Firefox Dev:**\n\n```bash\n$ docker run --rm -it -p 4444:4444 -p 7900:7900 --shm-size 2g selenium\u002Fstandalone-firefox:dev\n```\n\n**Edge Beta:**\n\n```bash\n$ docker run --platform linux\u002Famd64 --rm -it -p 4444:4444 -p 7900:7900 --shm-size 2g selenium\u002Fstandalone-edge:beta\n```\n\n**Edge Dev:**\n\n```bash\n$ docker run --platform linux\u002Famd64 --rm -it -p 4444:4444 -p 7900:7900 --shm-size 2g selenium\u002Fstandalone-edge:dev\n```\n\n**Chrome for Testing Beta:**\n\n```bash\n$ docker run --platform linux\u002Famd64 --rm -it -p 4444:4444 -p 7900:7900 --shm-size 2g selenium\u002Fstandalone-chrome-for-testing:beta\n```\n\n**Chrome for Testing Dev:**\n\n```bash\n$ docker run --platform linux\u002Famd64 --rm -it -p 4444:4444 -p 7900:7900 --shm-size 2g selenium\u002Fstandalone-chrome-for-testing:dev\n```\n\n**Chrome for Testing Canary:**\n\n```bash\n$ docker run --platform linux\u002Famd64 --rm -it -p 4444:4444 -p 7900:7900 --shm-size 2g selenium\u002Fstandalone-chrome-for-testing:canary\n```\n\n### Dev and Beta on the Grid\n\n**docker-compose-v3-beta-channel.yml:**\n```bash\n# To execute this docker compose yml file use `docker compose -f docker-compose-v3-beta-channel.yml up`\n# Add the `-d` flag at the end for detached execution\n# To stop the execution, hit Ctrl+C, and then `docker compose -f docker-compose-v3-beta-channel.yml down`\nservices:\n  chrome:\n    image: selenium\u002Fnode-chrome:beta\n    platform: linux\u002Famd64\n    shm_size: 2gb\n    depends_on:\n      - selenium-hub\n    environment:\n      - SE_EVENT_BUS_HOST=selenium-hub\n\n  edge:\n    image: selenium\u002Fnode-edge:beta\n    platform: linux\u002Famd64\n    shm_size: 2gb\n    depends_on:\n      - selenium-hub\n    environment:\n      - SE_EVENT_BUS_HOST=selenium-hub\n\n  firefox:\n    image: selenium\u002Fnode-firefox:beta\n    shm_size: 2gb\n    depends_on:\n      - selenium-hub\n    environment:\n      - SE_EVENT_BUS_HOST=selenium-hub\n\n  chrome-for-testing:\n    image: selenium\u002Fnode-chrome-for-testing:beta\n    platform: linux\u002Famd64\n    shm_size: 2gb\n    depends_on:\n      - selenium-hub\n    environment:\n      - SE_EVENT_BUS_HOST=selenium-hub\n\n  selenium-hub:\n    image: selenium\u002Fhub:latest\n    container_name: selenium-hub\n    ports:\n      - \"4442:4442\"\n      - \"4443:4443\"\n      - \"4444:4444\"\n```\n\n**docker-compose-v3-dev-channel.yml:**\n```bash\n# To execute this docker compose yml file use `docker compose -f docker-compose-v3-dev-channel.yml up`\n# Add the `-d` flag at the end for detached execution\n# To stop the execution, hit Ctrl+C, and then `docker compose -f docker-compose-v3-dev-channel.yml down`\nservices:\n  chrome:\n    image: selenium\u002Fnode-chrome:dev\n    platform: linux\u002Famd64\n    shm_size: 2gb\n    depends_on:\n      - selenium-hub\n    environment:\n      - SE_EVENT_BUS_HOST=selenium-hub\n\n  edge:\n    image: selenium\u002Fnode-edge:dev\n    platform: linux\u002Famd64\n    shm_size: 2gb\n    depends_on:\n      - selenium-hub\n    environment:\n      - SE_EVENT_BUS_HOST=selenium-hub\n\n  firefox:\n    image: selenium\u002Fnode-firefox:dev\n    shm_size: 2gb\n    depends_on:\n      - selenium-hub\n    environment:\n      - SE_EVENT_BUS_HOST=selenium-hub\n\n  chrome-for-testing:\n    image: selenium\u002Fnode-chrome-for-testing:dev\n    platform: linux\u002Famd64\n    shm_size: 2gb\n    depends_on:\n      - selenium-hub\n    environment:\n      - SE_EVENT_BUS_HOST=selenium-hub\n\n  selenium-hub:\n    image: selenium\u002Fhub:latest\n    container_name: selenium-hub\n    ports:\n      - \"4442:4442\"\n      - \"4443:4443\"\n      - \"4444:4444\"\n```\n\nFor more information on the Dev and Beta channel container images, see the blog post on [Dev and Beta Channel Browsers via Docker Selenium](https:\u002F\u002Fwww.selenium.dev\u002Fblog\u002F2022\u002Fdev-and-beta-channel-browsers-via-docker-selenium\u002F).\n\n## Single Node\u002FStandalone Image With All Browsers\n\nFrom image tag `4.35.0` onwards, a single Node\u002FStandalone image is available with all browsers are pre-installed. Those images are `selenium\u002Fstandalone-all-browsers` (standalone all in one), `selenium\u002Fnode-all-browsers` (for Hub-Node mode).\n\nThese two images are suitable for users:\n- Prefer a single container with \"all-in-one\" includes Selenium Grid and popular browsers.\n- Don't care about the image size, prefer the convenience.\n- Lightweight workload, able to figure out for yourself the resource consumption.\n\nAccording to multi-arch support, browsers are available in images `selenium\u002Fnode-all-browsers` and `selenium\u002Fstandalone-all-browsers` would be different per architecture.\n\n| Browser \u002F Arch | x86_64 (aka amd64) | aarch64 (aka arm64\u002Farmv8) |\n|----------------|--------------------|---------------------------|\n| Chrome         | ✅                  | ❌                         |\n| Edge           | ✅                  | ❌                         |\n| Firefox        | ✅                  | ✅                         |\n| Chromium       | ✅                  | ✅                         |\n\nBoth Chrome and Chromium browser binary are available in image arch `linux\u002Famd64`. However, Chrome browser binary is activated by default. In case you want to switch to Chromium browser binary, you can set environment variable `SE_BROWSER_BINARY_LOCATION_CHROME=\u002Fusr\u002Fbin\u002Fchromium`.\n\nVia environment variable `SE_NODE_ENABLE_BROWSER_\u003CBROWSER>`, with `\u003CBROWSER>` is the name of browser in uppercase (e.g. `CHROME`, `FIREFOX`, `EDGE`). You can disable a browser to be installed in the Node\u002FStandalone image all browsers.\n\nFor example with image linux\u002Famd64 and linux\u002Farm64, you can disable Firefox browser by setting environment variable `SE_NODE_ENABLE_BROWSER_FIREFOX=false`.\n\nFor example with image linux\u002Famd64, you can disable Chrome browser by setting environment variable `SE_NODE_ENABLE_BROWSER_CHROME=false`. Similar for Edge browser, set `SE_NODE_ENABLE_BROWSER_EDGE=false`.\n\nHere is list of environment variables which support suffix `_\u003CBROWSER>` in Node\u002FStandalone image all browsers:\n\n```\nSE_NODE_STEREOTYPE\nSE_NODE_BROWSER_NAME\nSE_NODE_BROWSER_VERSION\nSE_NODE_PLATFORM_NAME\nSE_BROWSER_BINARY_LOCATION\nSE_NODE_STEREOTYPE_EXTRA\nSE_NODE_MAX_SESSIONS\n```\n\n## Environment Variables\n\n**Checkout full list of environment variables [here](ENV_VARIABLES.md).**\n\nHow to update or contribute to list of environment variables? Follow below steps:\n\n1. Refresh the list to pick up new environment variables or default value\n\n    ```bash\n    make update_list_env_vars\n    ```\n\n    The script can be updated in [scripts\u002Fgenerate_list_env_vars\u002Fextract_env.py](scripts\u002Fgenerate_list_env_vars\u002Fextract_env.py).\n\n2. Update the description for each environment variable in the file [scripts\u002Fgenerate_list_env_vars\u002Fdescription.yaml](scripts\u002Fgenerate_list_env_vars\u002Fdescription.yaml).\n\n3. Run the command in step (1) one more time to update the list of environment variables with new descriptions.\n\n## Execution modes\n\n### Standalone\n\n#### ![Firefox](https:\u002F\u002Fraw.githubusercontent.com\u002Falrra\u002Fbrowser-logos\u002Fmain\u002Fsrc\u002Ffirefox\u002Ffirefox_24x24.png) Firefox \n```bash\ndocker run -d -p 4444:4444 --shm-size=\"2g\" selenium\u002Fstandalone-firefox:4.43.0-20260404\n```\n\n#### ![Chrome](https:\u002F\u002Fraw.githubusercontent.com\u002Falrra\u002Fbrowser-logos\u002Fmain\u002Fsrc\u002Fchrome\u002Fchrome_24x24.png) Chrome \n```bash\ndocker run -d -p 4444:4444 --shm-size=\"2g\" selenium\u002Fstandalone-chrome:4.43.0-20260404\n```\n\n#### ![Edge](https:\u002F\u002Fraw.githubusercontent.com\u002Falrra\u002Fbrowser-logos\u002Fmain\u002Fsrc\u002Fedge\u002Fedge_24x24.png) Edge\n```bash\ndocker run -d -p 4444:4444 --shm-size=\"2g\" selenium\u002Fstandalone-edge:4.43.0-20260404\n```\n\n#### All browsers in single container\n```bash\ndocker run -d -p 4444:4444 --shm-size=\"3g\" selenium\u002Fstandalone-all-browsers:4.43.0-20260404\n```\n\n_Note: Only one Standalone container can run on port_ `4444` _at the same time._\n\n___\n\n### Hub and Nodes\n\nThere are different ways to run the images and create a Grid with a Hub and Nodes, check the following options.\n\n#### Docker networking\nThe Hub and Nodes will be created in the same network and they will recognize each other by their container name.\nA Docker [network](https:\u002F\u002Fdocs.docker.com\u002Fengine\u002Freference\u002Fcommandline\u002Fnetwork_create\u002F) needs to be created as a first step.\n\n##### macOS\u002FLinux\n\n**Hub and multiple browser Node containers**\n\n```bash\n$ docker network create grid\n$ docker run -d -p 4442-4444:4442-4444 --net grid --name selenium-hub selenium\u002Fhub:4.43.0-20260404\n$ docker run -d --net grid -e SE_EVENT_BUS_HOST=selenium-hub \\\n    --shm-size=\"2g\" \\\n    selenium\u002Fnode-chrome:4.43.0-20260404\n$ docker run -d --net grid -e SE_EVENT_BUS_HOST=selenium-hub \\\n    --shm-size=\"2g\" \\\n    selenium\u002Fnode-edge:4.43.0-20260404\n$ docker run -d --net grid -e SE_EVENT_BUS_HOST=selenium-hub \\\n    --shm-size=\"2g\" \\\n    selenium\u002Fnode-firefox:4.43.0-20260404\n```\n\n**Hub and single Node container with all browsers**\n\n```bash\n$ docker network create grid\n$ docker run -d -p 4442-4444:4442-4444 --net grid --name selenium-hub selenium\u002Fhub:4.43.0-20260404\n$ docker run -d --net grid -e SE_EVENT_BUS_HOST=selenium-hub \\\n    --shm-size=\"3g\" \\\n    selenium\u002Fnode-all-browsers:4.43.0-20260404\n```\n\n##### Windows PowerShell\n\n**Hub and multiple browser Node containers**\n\n```powershell\n$ docker network create grid\n$ docker run -d -p 4442-4444:4442-4444 --net grid --name selenium-hub selenium\u002Fhub:4.43.0-20260404\n$ docker run -d --net grid -e SE_EVENT_BUS_HOST=selenium-hub `\n    --shm-size=\"2g\" `\n    selenium\u002Fnode-chrome:4.43.0-20260404\n$ docker run -d --net grid -e SE_EVENT_BUS_HOST=selenium-hub `\n    --shm-size=\"2g\" `\n    selenium\u002Fnode-edge:4.43.0-20260404\n$ docker run -d --net grid -e SE_EVENT_BUS_HOST=selenium-hub `\n    --shm-size=\"2g\" `\n    selenium\u002Fnode-firefox:4.43.0-20260404\n```\n\n**Hub and single Node container with all browsers**\n\n```powershell\n$ docker network create grid\n$ docker run -d -p 4442-4444:4442-4444 --net grid --name selenium-hub selenium\u002Fhub:4.43.0-20260404\n$ docker run -d --net grid -e SE_EVENT_BUS_HOST=selenium-hub `\n    --shm-size=\"3g\" `\n    selenium\u002Fnode-all-browsers:4.43.0-20260404\n```\n\nWhen you are done using the Grid, and the containers have exited, the network can be removed with the following command:\n\n``` bash\n# Removes the grid network\n$ docker network rm grid\n```\n\n#### Using different machines\u002FVMs\nThe Hub and Nodes will be created on different machines\u002FVMs, they need to know each other's IPs to\ncommunicate properly. If more than one node will be running on the same Machine\u002FVM, they must be\nconfigured to expose different ports.\n\n##### Hub - Machine\u002FVM 1\n```bash\n$ docker run -d -p 4442-4444:4442-4444 --name selenium-hub selenium\u002Fhub:4.43.0-20260404\n```\n\n##### Node Chrome - Machine\u002FVM 2\n\n###### macOS\u002FLinux\n\n```bash\n$ docker run -d -p 5555:5555 \\\n    --shm-size=\"2g\" \\\n    -e SE_EVENT_BUS_HOST=\u003Cip-from-machine-1> \\\n    -e SE_NODE_HOST=\u003Cip-from-machine-2> \\\n    selenium\u002Fnode-chrome:4.43.0-20260404\n```\n\n###### Windows PowerShell\n\n```powershell\n$ docker run -d -p 5555:5555 `\n    --shm-size=\"2g\" `\n    -e SE_EVENT_BUS_HOST=\u003Cip-from-machine-1> `\n    -e SE_NODE_HOST=\u003Cip-from-machine-2> `\n    selenium\u002Fnode-chrome:4.43.0-20260404\n```\n\n\n##### Node Edge - Machine\u002FVM 3\n\n###### macOS\u002FLinux\n\n```bash\n$ docker run -d -p 5555:5555 \\\n    --shm-size=\"2g\" \\\n    -e SE_EVENT_BUS_HOST=\u003Cip-from-machine-1> \\\n    -e SE_NODE_HOST=\u003Cip-from-machine-3> \\\n    selenium\u002Fnode-edge:4.43.0-20260404\n```\n\n###### Windows PowerShell\n\n```powershell\n$ docker run -d -p 5555:5555 `\n    --shm-size=\"2g\" `\n    -e SE_EVENT_BUS_HOST=\u003Cip-from-machine-1> `\n    -e SE_NODE_HOST=\u003Cip-from-machine-3> `\n    selenium\u002Fnode-edge:4.43.0-20260404\n```\n\n##### Node Firefox - Machine\u002FVM 4\n\n###### macOS\u002FLinux\n\n```bash\n$ docker run -d -p 5555:5555 \\\n    --shm-size=\"2g\" \\\n    -e SE_EVENT_BUS_HOST=\u003Cip-from-machine-1> \\\n    -e SE_NODE_HOST=\u003Cip-from-machine-4> \\\n    selenium\u002Fnode-firefox:4.43.0-20260404\n```\n\n###### Windows PowerShell\n\n```powershell\n$ docker run -d -p 5555:5555 `\n    --shm-size=\"2g\" `\n    -e SE_EVENT_BUS_HOST=\u003Cip-from-machine-1> `\n    -e SE_NODE_HOST=\u003Cip-from-machine-4> `\n    selenium\u002Fnode-firefox:4.43.0-20260404\n```\n\n##### Node Chrome - Machine\u002FVM 4\n\n###### macOS\u002FLinux\n\n``` bash\n$ docker run -d -p 5556:5556 \\\n    --shm-size=\"2g\" \\\n    -e SE_EVENT_BUS_HOST=\u003Cip-from-machine-1> \\\n    -e SE_NODE_HOST=\u003Cip-from-machine-4> \\\n    -e SE_NODE_PORT=5556 \\\n    selenium\u002Fnode-chrome:4.43.0-20260404\n```\n\n###### Windows PowerShell\n\n```powershell\n$ docker run -d -p 5556:5556 `\n    --shm-size=\"2g\" `\n    -e SE_EVENT_BUS_HOST=\u003Cip-from-machine-1> `\n    -e SE_NODE_HOST=\u003Cip-from-machine-4> `\n    -e SE_NODE_PORT=5556 `\n    selenium\u002Fnode-chrome:4.43.0-20260404\n```\n\n#### Docker Compose\n[Docker Compose](https:\u002F\u002Fdocs.docker.com\u002Fcompose\u002F) is the simplest way to start a Grid. Use the\nlinked resources below, save them locally and check the execution instructions on top of each file.\n\n##### Version 2\n[`docker-compose-v2.yml`](docker-compose-v2.yml)\n\n##### Version 3\n[`docker-compose-v3.yml`](docker-compose-v3.yml)\n\nTo stop the Grid and cleanup the created containers, run `docker compose down`.\n\n##### Version 3 with Swarm support \n[`docker-compose-v3-swarm.yml`](docker-compose-v3-swarm.yml)\n\n___\n\n### Fully distributed mode - Router, Queue, Distributor, EventBus, SessionMap and Nodes\n\nIt is possible to start a Selenium Grid with all its components apart. For simplicity, only an\nexample with docker compose will be provided. Save the file locally, and check the execution \ninstructions on top of it.\n\n[`docker-compose-v3-full-grid.yml`](docker-compose-v3-full-grid.yml)\n\n#### Distributor configuration\n\n| Environment variable           | Option                      | Type    | Default value | Description                                                                                                           |\n|--------------------------------|-----------------------------|---------|---------------|-----------------------------------------------------------------------------------------------------------------------|\n| `SE_REJECT_UNSUPPORTED_CAPS`   | `--reject-unsupported-caps` | boolean | `false`       | Allow the Distributor to reject a request immediately if the Grid does not support the requested capability.          |\n| `SE_HEALTHCHECK_INTERVAL`      | `--healthcheck-interval`    | int     | `120`         | This ensures the server can ping all the Nodes successfully after an interval.                                        |\n| `SE_DISTRIBUTOR_SLOT_SELECTOR` | `--slot-selector`           | string  | ``            | Full class name of non-default slot selector. This is used to select a slot in a Node once the Node has been matched. |\n\nDistributor component comes with two main built-in Slot Selector implementations\n* `org.openqa.selenium.grid.distributor.selector.DefaultSlotSelector`: Grid’s default strategy (used if you don’t configure anything else). It follows the balanced, least-recently-used approach described above. The `DefaultSlotSelector` will choose the Node that has been free for the longest time, ensuring no single node is overused when others are idle. This simple strategy has minimal overhead and works well for most general testing scenarios where an even distribution of sessions is desired.\n\n* `org.openqa.selenium.grid.distributor.selector.GreedySlotSelector`: An alternative built-in provided. The `GreedySlotSelector` aims to maximize node utilization by concentrating sessions on one node before using another. As noted, it will tend to fill up a node’s slots one by one, reducing the number of nodes that are partially utilized at any given time. This strategy is beneficial for resource-intensive or high-concurrency scenarios (for example, load testing or running in an environment where you scale nodes on demand). More insight, let's refer to [#2990](https:\u002F\u002Fgithub.com\u002FSeleniumHQ\u002Fdocker-selenium\u002Fissues\u002F2990).\n\n___\n\n## Video recording\n\nTests execution can be recorded by using the `selenium\u002Fvideo:ffmpeg-8.1-20260404`\nDocker image. One container is needed per each container where a browser is running. This means if you are\nrunning 5 Nodes\u002FStandalone containers, you will need 5 video containers, the mapping is 1-1.\n\nCurrently, the only way to do this mapping is manually (either starting the containers manually or through\n`docker compose`). We are iterating on this process and probably this setup will be more simple in the future.\n\nThe video Docker image we provide is based on the ffmpeg Ubuntu image provided by the \n[jrottenberg\u002Fffmpeg](https:\u002F\u002Fgithub.com\u002Fjrottenberg\u002Fffmpeg) project, thank you for providing this image and\nsimplifying our work :tada:\n\nFrom image tag based `4.20.0` onwards, the video Docker image is based on the FFmpeg Ubuntu image provided by\n[linuxserver\u002Fdocker-ffmpeg](https:\u002F\u002Fgithub.com\u002Flinuxserver\u002Fdocker-ffmpeg) project since the image is available for multi-platform.\nThank you for simplifying our project and helping us move forward with multiple architecture support.\n\n**Notes**:\n- If you have questions or feedback, please use the community contact points shown [here](https:\u002F\u002Fwww.selenium.dev\u002Fsupport\u002F). \n- Please report any bugs through GitHub [issues](https:\u002F\u002Fgithub.com\u002FSeleniumHQ\u002Fdocker-selenium\u002Fissues\u002Fnew\u002Fchoose), and provide\nall the information requested on the template.\n- Video recording for headless browsers is not supported. \n- Video recording tends to use considerable amounts of CPU. Normally you should estimate 1CPU per video container, \nand 1 CPU per browser container.\n- Videos are stored in the `\u002Fvideos` directory inside the video container. Map a local directory to get the videos.\n- If you are running more than one video container, be sure to overwrite the video file name through the `FILE_NAME`\nenvironment variable to avoid unexpected results.\n\nThis example shows how to start the containers manually:\n\n``` bash\n$ docker network create grid\n$ docker run -d -p 4444:4444 -p 6900:5900 --net grid --name selenium --shm-size=\"2g\" selenium\u002Fstandalone-chrome:4.43.0-20260404\n$ docker run -d --net grid --name video -v \u002Ftmp\u002Fvideos:\u002Fvideos selenium\u002Fvideo:ffmpeg-8.1-20260404\n# Run your tests\n$ docker stop video && docker rm video\n$ docker stop selenium && docker rm selenium\n```\nAfter the containers are stopped and removed, you should see a video file on your machine's `\u002Ftmp\u002Fvideos` directory.\n\nHere is an example using a Hub and a few Nodes:\n\n[`docker-compose-v3-video.yml`](docker-compose-v3-video.yml)\n\n## Video recording with dynamic file name based on metadata in tests\n\nBased on the support of [Metadata in tests](https:\u002F\u002Fwww.selenium.dev\u002Fdocumentation\u002Fgrid\u002Fgetting_started\u002F#metadata-in-tests). When the video recorder is sidecar deployed with the browser node with enabling `SE_VIDEO_FILE_NAME=auto` and adding metadata to your tests, video file name will extract value of capability `se:name` and use it as the video file name.\n\nFor example in Python binding:\n\n```python\nfrom selenium.webdriver.chrome.options import Options as ChromeOptions\nfrom selenium import webdriver\n\noptions = ChromeOptions()\noptions.set_capability('se:name', 'test_visit_basic_auth_secured_page (ChromeTests)')\ndriver = webdriver.Remote(options=options, command_executor=\"http:\u002F\u002Flocalhost:4444\")\ndriver.get(\"https:\u002F\u002Fselenium.dev\")\ndriver.quit()\n```\n\nThe output video file name will be `test_visit_basic_auth_secured_page_ChromeTests_\u003CsessionId>.mp4`.\n\nIf your test name is handled by the test framework, and it is unique for sure, you also can disable the session id appends to the video file name by setting `SE_VIDEO_FILE_NAME_SUFFIX=false`.\n\nFile name will be trimmed to 255 characters to avoid long file names. Moreover, `space` character will be replaced by `_` and only characters alphabets, numbers, `-` (hyphen), `_` (underscore) are retained in the file name.\n\nThe trim regex is able to be customized by setting `SE_VIDEO_FILE_NAME_TRIM_REGEX` environment variable. The default value is `[^a-zA-Z0-9-_]`. The regex should be compatible with Python `re.compile()` function.\n\nAt deployment level, the recorder container is up always. In addition, you can disable video recording process via session capability `se:recordVideo`. For example in Python binding:\n\n```python\noptions.set_capability('se:recordVideo', False)\n```\n\nIn recorder container will perform query GraphQL in Hub based on Node SessionId and extract the value of `se:recordVideo` in capabilities before deciding to start video recording process or not.\n\nNotes: To reach the GraphQL endpoint, the recorder container needs to know the Hub URL. The Hub URL can be passed via environment variable `SE_NODE_GRID_URL`. For example `SE_NODE_GRID_URL` is `http:\u002F\u002Fselenium-hub:4444`.\n\n## Video recording and uploading\n\n[RCLONE](https:\u002F\u002Frclone.org\u002F) is installed in the video recorder image. You can use it to upload the videos to a cloud storage service.\nBesides the video recording mentioned above, you can enable the upload functionality by setting the following environment variables:\n\n```yaml\nservices:\n  chrome_video:\n    image: selenium\u002Fvideo:ffmpeg-8.1-20260404\n    depends_on:\n      - chrome\n    environment:\n      - DISPLAY_CONTAINER_NAME=chrome\n      - SE_VIDEO_FILE_NAME=auto\n      - SE_VIDEO_UPLOAD_ENABLED=true\n      - SE_UPLOAD_DESTINATION_PREFIX=s3:\u002F\u002Fmybucket\u002Fpath\n      - RCLONE_CONFIG_S3_TYPE=s3\n      - RCLONE_CONFIG_S3_PROVIDER=GCS\n      - RCLONE_CONFIG_S3_ENV_AUTH=true\n      - RCLONE_CONFIG_S3_REGION=asia-southeast1\n      - RCLONE_CONFIG_S3_LOCATION_CONSTRAINT=asia-southeast1\n      - RCLONE_CONFIG_S3_ACL=private\n      - RCLONE_CONFIG_S3_ACCESS_KEY_ID=xxx\n      - RCLONE_CONFIG_S3_SECRET_ACCESS_KEY=xxx\n      - RCLONE_CONFIG_S3_ENDPOINT=https:\u002F\u002Fstorage.googleapis.com\n      - RCLONE_CONFIG_S3_NO_CHECK_BUCKET=true\n```\n\n`SE_VIDEO_FILE_NAME=auto` will use the session id as the video file name. This ensures that the video file name is unique to upload.\nVideo file name construction automatically works based on Node endpoint `\u002Fstatus` (and optional GraphQL endpoint) to get session ID, capabilities.\n\n`SE_VIDEO_UPLOAD_ENABLED=true` enables upload in the legacy shell-based mode (`SE_VIDEO_EVENT_DRIVEN=false`). In event-driven mode (the default), this variable is **deprecated** — upload is enabled automatically when `SE_UPLOAD_DESTINATION_PREFIX` is set to a non-empty value.\n\n`SE_VIDEO_INTERNAL_UPLOAD=true` (by default) will use RCLONE installed in the container for upload. If you want to use another sidecar container for upload, set it to `false`.\n\n| ENV variables per mode                   | Hub\u002FNodes         | Standalone roles | Dynamic Grid   |\n|------------------------------------------|-------------------|------------------|----------------|\n| `SE_VIDEO_RECORD_STANDALONE` (mandatory) | `false` (default) | `true`           | `true`         |\n| `DISPLAY_CONTAINER_NAME` (mandatory)     | user input        | user input       | (not required) |\n| `SE_NODE_PORT` (optional)                | `5555`            | `4444`           | (not required) |\n| `SE_NODE_GRID_URL` (optional)            | user input        | (not required)   | (not required) |\n\nFor environment variables with prefix `RCLONE_` is used to pass remote configuration to RCLONE. You can find more information about RCLONE configuration [here](https:\u002F\u002Frclone.org\u002Fdocs\u002F).\nWhen using in Dynamic Grid, those variables should be combined with the prefix `SE_`, for example `SE_RCLONE_`. See below reference for more details.\n\n### Reference\n- Configure video recording and uploading for Hub and Nodes: [docker-compose-v3-video-upload.yml](docker-compose-v3-video-upload.yml)\n\n- Configure video recording and uploading for Standalone roles: [docker-compose-v3-video-upload-standalone.yml](docker-compose-v3-video-upload-standalone.yml)\n\n- Configure video recording and uploading for Dynamic Grid (node-docker): [docker-compose-v3-video-upload-dynamic-grid.yml](docker-compose-v3-video-upload-dynamic-grid.yml)\n\n- Configure video recording and uploading for Dynamic Grid standalone (standalone-docker): [tests\u002Fdocker-compose-v3-test-standalone-docker.yaml](tests\u002Fdocker-compose-v3-test-standalone-docker.yaml)\n\n### Environment variables and default values for upload feature\n\n| Environment variable          | Default value                                | Description                                                                               |\n|-------------------------------|----------------------------------------------|-------------------------------------------------------------------------------------------|\n| `SE_UPLOAD_RETAIN_LOCAL_FILE` | `false`                                      | Keep local file after uploading successfully                                              |\n| `SE_UPLOAD_COMMAND`           | `copy`                                       | RCLONE command is used to transfer file. Enforce `move` when retain local file is `false` |\n| `SE_UPLOAD_OPTS`              | `-P --cutoff-mode SOFT --metadata --inplace` | Other options belong to RCLONE command can be set.                                        |\n| `SE_UPLOAD_CONFIG_FILE_NAME`  | `upload.conf`                                | Config file for remote host instead of set via env variable prefix SE_RCLONE_*            |\n| `SE_UPLOAD_CONFIG_DIRECTORY`  | `\u002Fopt\u002Fbin`                                   | Directory of config file (change it when conf file in another directory is mounted)       |\n\n## Retain recordings for failed sessions only\n\nIn event-driven mode (`SE_VIDEO_EVENT_DRIVEN=true`, the default), the video service subscribes to the Grid's ZeroMQ event bus and reacts to session lifecycle events in real time. This enables a **retain-on-failure** strategy: record every session, but automatically discard the video when the session passes and only keep (and upload) recordings from sessions that fail.\n\nEnable it globally with the environment variable:\n\n```yaml\nSE_RETAIN_ON_FAILURE=true\n```\n\nA session is treated as **failed** when either of the following is true:\n\n1. The test code fires a session event whose `eventType` contains a substring from `SE_FAILURE_SESSION_EVENTS` (default: `:failed,:failure,:error,:aborted`).\n2. The session closes with an abnormal reason — `TIMEOUT`, `NODE_REMOVED`, or `NODE_RESTARTED` — instead of the normal `QUIT_COMMAND`.\n\n| Environment variable      | Default                          | Description                                                                                                                         |\n|---------------------------|----------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| `SE_RETAIN_ON_FAILURE`    | `false`                          | Discard recordings of sessions that pass. Only recordings from failed sessions are retained on disk and queued for upload.          |\n| `SE_FAILURE_SESSION_EVENTS` | `:failed,:failure,:error,:aborted` | Comma-separated substrings. Any session event whose `eventType` contains one of these (case-insensitive) marks the session as failed. |\n\nThe `se:retainOnFailure` session **capability** overrides the global container env var for a specific session. For example, to retain the recording of a single session regardless of the global setting:\n\n```python\noptions.set_capability('se:retainOnFailure', True)\n```\n\n| `se:retainOnFailure` cap | `SE_RETAIN_ON_FAILURE` env | Effective behaviour              |\n|--------------------------|----------------------------|----------------------------------|\n| `true`                   | `false` (default)          | Retain on failure for this session |\n| `false`                  | `true`                     | Always retain for this session   |\n| absent                   | `true`                     | Retain on failure (global default) |\n| absent                   | `false` (default)          | Always retain (global default)   |\n\n#### Firing session events from test code\n\nThe [Session Event API](https:\u002F\u002Fwww.selenium.dev\u002Fblog\u002F2026\u002Fselenium-grid-4-41-deep-dive\u002F) lets test code push named events directly to the Grid. The video service listens for these events on the ZeroMQ bus and uses them to determine session failure.\n\nCall `driver.fire_session_event(eventType, payload)` from your test. Any `eventType` that contains a configured failure substring (e.g. `\"test:failed\"` contains `\":failed\"`) marks the session as failed.\n\n```python\nfrom selenium.webdriver.chrome.options import Options as ChromeOptions\nfrom selenium import webdriver\n\noptions = ChromeOptions()\noptions.set_capability('se:name', 'checkout_flow')\noptions.set_capability('se:retainOnFailure', True)   # discard video if this session passes\n\ndriver = webdriver.Remote(options=options, command_executor=\"http:\u002F\u002Flocalhost:4444\")\n\ntry:\n    driver.get(\"https:\u002F\u002Fselenium.dev\")\n    # ... test steps ...\nexcept Exception as exc:\n    # \"test:failed\" contains \":failed\" — matches the default SE_FAILURE_SESSION_EVENTS\n    driver.fire_session_event(\"test:failed\", {\"error\": str(exc)})\n    raise\nfinally:\n    driver.quit()\n```\n\n> **Note:** If the test catches an exception and still calls `driver.quit()` normally, the session close reason is `QUIT_COMMAND` (not abnormal). In that case, firing a failure event **before** `quit()` is the only way to mark the session as failed and prevent the recording from being discarded.\n\nSo, you can control the **retain-on-failure** strategy fully from test code via session capabilities and fire session event.\n\n## Video recordings manager\n\nWe utilize [File Browser](https:\u002F\u002Ffilebrowser.org\u002F) as a video manager. It is a web-based file manager that allows you to manage files and folders in the storage.\n\nThe File Browser container dir `\u002Fsrv` should be mounted to the same storage as video recordings stored. For example a compose file:\n\n```yaml\nservices:\n  chrome:\n    deploy:\n      mode: replicated\n      replicas: 3\n    image: selenium\u002Fnode-chrome:4.43.0-20260404\n    platform: linux\u002Famd64\n    shm_size: 2gb\n    depends_on:\n      - selenium-hub\n    volumes:\n      - \u002Ftmp\u002Fvideos:\u002Fvideos\n    environment:\n      - SE_EVENT_BUS_HOST=selenium-hub\n      - SE_RECORD_VIDEO=true\n      - SE_VIDEO_FILE_NAME=auto\n      - SE_NODE_GRID_URL=http:\u002F\u002Fselenium-hub:4444\n\n  file_browser:\n      image: filebrowser\u002Ffilebrowser:latest\n      container_name: file_browser\n      restart: always\n      ports:\n          - \"8081:80\"\n      volumes:\n          - \u002Ftmp\u002Fvideos:\u002Fsrv\n      environment:\n          - FB_NOAUTH=true\n```\n\n___\n\n## Dynamic Grid\n\nGrid 4 has the ability to start Docker containers on demand, this means that it starts\na Docker container in the background for each new session request, the test gets executed\nthere, and when the test completes, the container gets thrown away.\n\nThis execution mode can be used either in the Standalone or Node roles. The \"dynamic\"\nexecution mode needs to be told what Docker images to use when the containers get started.\nAdditionally, the Grid needs to know the URI of the Docker daemon. This configuration can\nbe placed in a local `toml` file.\n\n### Configuration example\n\nYou can save this file locally and name it, for example, `config.toml`.\n```toml\n[docker]\n# Configs have a mapping between the Docker image to use and the capabilities that need to be matched to\n# start a container with the given image.\nconfigs = [\n    \"selenium\u002Fstandalone-firefox:4.43.0-20260404\", '{\"browserName\": \"firefox\"}',\n    \"selenium\u002Fstandalone-chrome:4.43.0-20260404\", '{\"browserName\": \"chrome\"}',\n    \"selenium\u002Fstandalone-edge:4.43.0-20260404\", '{\"browserName\": \"MicrosoftEdge\"}'\n]\n\nhost-config-keys = [\"Dns\", \"DnsOptions\", \"DnsSearch\", \"ExtraHosts\", \"Binds\"]\n\n# URL for connecting to the docker daemon\n# Most simple approach, leave it as http:\u002F\u002F127.0.0.1:2375, and mount \u002Fvar\u002Frun\u002Fdocker.sock.\n# 127.0.0.1 is used because internally the container uses socat when \u002Fvar\u002Frun\u002Fdocker.sock is mounted \n# If var\u002Frun\u002Fdocker.sock is not mounted: \n# Windows: make sure Docker Desktop exposes the daemon via tcp, and use http:\u002F\u002Fhost.docker.internal:2375.\n# macOS: install socat and run the following command, socat -4 TCP-LISTEN:2375,fork UNIX-CONNECT:\u002Fvar\u002Frun\u002Fdocker.sock,\n# then use http:\u002F\u002Fhost.docker.internal:2375.\n# Linux: varies from machine to machine, please mount \u002Fvar\u002Frun\u002Fdocker.sock. If this does not work, please create an issue.\nurl = \"http:\u002F\u002F127.0.0.1:2375\"\n# Docker image used for video recording\nvideo-image = \"selenium\u002Fvideo:ffmpeg-8.1-20260404\"\n\n# Uncomment the following section if you are running the node on a separate VM\n# Fill out the placeholders with appropriate values\n#[server]\n#host = \u003Cip-from-node-machine>\n#port = \u003Cport-from-node-machine>\n```\n\n**Mount the local `config.toml` file to the container path `\u002Fopt\u002Fselenium\u002Fdocker.toml`**.\nThis config file path specific for Dynamic Grid (node\u002Fstandalone docker) by default to avoid conflict with the config file in node browser containers (since users can share volumes config to node browser containers, see below section for details).\n\nWith the optional config key `host-config-keys` under section [docker] in a config.toml file (or CLI option --docker-host-config-keys). Users can specify a list of docker host configuration keys that should be passed to browser containers.\n\nValid key names for Docker host config can be found in the Docker API [documentation](https:\u002F\u002Fdocs.docker.com\u002Fengine\u002Fapi\u002Flatest\u002F#tag\u002FContainer\u002Foperation\u002FContainerCreate) or via the command `docker inspect` the node-docker container.\n\n### Share volumes config of Dynamic Grid container to node browser containers\n\nIn case you want to access download directory in node browser containers (e.g `\u002Fhome\u002Fseluser\u002FDownloads`) via volumes config of Dynamic Grid container, you can add the following config to the `config.toml` file\n\n```toml\n[docker]\nhost-config-keys = [\"Binds\"]\n```\n\nVolumes config in docker compose file\n\n```yaml\nservices:\n  node-docker:\n    image: selenium\u002Fnode-docker:latest\n    volumes:\n      - .\u002Fassets:\u002Fopt\u002Fselenium\u002Fassets\n      - .\u002Fconfig.toml:\u002Fopt\u002Fselenium\u002Fdocker.toml\n      - .\u002Fdownloads:\u002Fhome\u002Fseluser\u002FDownloads\n      - \u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock\n    environment:\n      - SE_NODE_DOCKER_CONFIG_FILENAME=docker.toml\n```\n\n`\u002Fopt\u002Fselenium\u002Fconfig.toml` is the default path for the config file in all images. Once volumes config is shared to node browser containers, its `config.toml` could be overwritten by node-docker container config file.\n\nIn this case, mount your `config.toml` file to `\u002Fopt\u002Fselenium\u002Fdocker.toml` in node-docker container. And set the environment variable `SE_NODE_DOCKER_CONFIG_FILENAME=docker.toml` to specify that config file name for the startup script.\n\nRefer to example [docker-compose-v3-test-node-docker.yaml](.\u002Ftests\u002Fdocker-compose-v3-test-node-docker.yaml)\n\n### Execution with Hub & Node roles\n\nThis can be expanded to a full Grid deployment, all components deployed individually. The overall\nidea is to have the Hub in one virtual machine, and each of the Nodes in separate and more powerful\nvirtual machines. \n\n#### macOS\u002FLinux\n\n```bash\n$ docker network create grid\n$ docker run -d -p 4442-4444:4442-4444 --net grid --name selenium-hub selenium\u002Fhub:4.43.0-20260404\n$ docker run -d --net grid -e SE_EVENT_BUS_HOST=selenium-hub \\\n    -v ${PWD}\u002Fconfig.toml:\u002Fopt\u002Fselenium\u002Fdocker.toml \\\n    -v ${PWD}\u002Fassets:\u002Fopt\u002Fselenium\u002Fassets \\\n    -v \u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock \\\n    selenium\u002Fnode-docker:4.43.0-20260404\n```\n\n#### Windows PowerShell\n\n```powershell\n$ docker network create grid\n$ docker run -d -p 4442-4444:4442-4444 --net grid --name selenium-hub selenium\u002Fhub:4.43.0-20260404\n$ docker run -d --net grid -e SE_EVENT_BUS_HOST=selenium-hub `\n    -v ${PWD}\u002Fconfig.toml:\u002Fopt\u002Fselenium\u002Fdocker.toml `\n    -v ${PWD}\u002Fassets:\u002Fopt\u002Fselenium\u002Fassets `\n    -v \u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock `\n    selenium\u002Fnode-docker:4.43.0-20260404\n```\n\nTo have the assets saved on your host, please mount your host path to `\u002Fopt\u002Fselenium\u002Fassets`.\n\nWhen you are done using the Grid, and the containers have exited, the network can be removed with the following command:\n\n``` bash\n# Removes the grid network\n$ docker network rm grid\n```\n\n### Execution with Standalone roles\n\n#### macOS\u002FLinux\n\n```bash\ndocker run --rm --name selenium-docker -p 4444:4444 \\\n    -v ${PWD}\u002Fconfig.toml:\u002Fopt\u002Fselenium\u002Fdocker.toml \\\n    -v ${PWD}\u002Fassets:\u002Fopt\u002Fselenium\u002Fassets \\\n    -v \u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock \\\n    selenium\u002Fstandalone-docker:4.43.0-20260404\n```\n\n#### Windows PowerShell\n\n```bash\ndocker run --rm --name selenium-docker -p 4444:4444 `\n    -v ${PWD}\u002Fconfig.toml:\u002Fopt\u002Fselenium\u002Fdocker.toml `\n    -v ${PWD}\u002Fassets:\u002Fopt\u002Fselenium\u002Fassets `\n    -v \u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock `\n    selenium\u002Fstandalone-docker:4.43.0-20260404\n```\n\n### Using Dynamic Grid in different machines\u002FVMs\n\n#### Hub - Machine\u002FVM 1\n\n```bash\n$ docker run -d -p 4442-4444:4442-4444 --name selenium-hub selenium\u002Fhub:4.43.0-20260404\n```\n\n#### Node Chrome - Machine\u002FVM 2\n\n#### macOS\u002FLinux\n\n```bash\n$ docker run -d -p 5555:5555 \\\n    -e SE_EVENT_BUS_HOST=\u003Cip-from-machine-1> \\\n    -v ${PWD}\u002Fconfig.toml:\u002Fopt\u002Fselenium\u002Fdocker.toml \\\n    -v ${PWD}\u002Fassets:\u002Fopt\u002Fselenium\u002Fassets \\\n    -v \u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock \\\n    selenium\u002Fnode-docker:4.43.0-20260404\n```\n\n#### Windows PowerShell\n\n```bash\n$ docker run -d -p 5555:5555 `\n    -e SE_EVENT_BUS_HOST=\u003Cip-from-machine-1> `\n    -v ${PWD}\u002Fconfig.toml:\u002Fopt\u002Fselenium\u002Fdocker.toml `\n    -v ${PWD}\u002Fassets:\u002Fopt\u002Fselenium\u002Fassets `\n    -v \u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock `\n    selenium\u002Fnode-docker:4.43.0-20260404\n```\n\nComplete the `[server]` section in the `config.toml` file.\n```toml\n[docker]\n# Configs have a mapping between the Docker image to use and the capabilities that need to be matched to\n# start a container with the given image.\nconfigs = [\n    \"selenium\u002Fstandalone-firefox:4.43.0-20260404\", \"{\\\"browserName\\\": \\\"firefox\\\"}\",\n    \"selenium\u002Fstandalone-chrome:4.43.0-20260404\", \"{\\\"browserName\\\": \\\"chrome\\\"}\",\n    \"selenium\u002Fstandalone-edge:4.43.0-20260404\", \"{\\\"browserName\\\": \\\"MicrosoftEdge\\\"}\"\n    ]\n\n# URL for connecting to the docker daemon\n# Most simple approach, leave it as http:\u002F\u002F127.0.0.1:2375, and mount \u002Fvar\u002Frun\u002Fdocker.sock.\n# 127.0.0.1 is used because interally the container uses socat when \u002Fvar\u002Frun\u002Fdocker.sock is mounted \n# If var\u002Frun\u002Fdocker.sock is not mounted: \n# Windows: make sure Docker Desktop exposes the daemon via tcp, and use http:\u002F\u002Fhost.docker.internal:2375.\n# macOS: install socat and run the following command, socat -4 TCP-LISTEN:2375,fork UNIX-CONNECT:\u002Fvar\u002Frun\u002Fdocker.sock,\n# then use http:\u002F\u002Fhost.docker.internal:2375.\n# Linux: varies from machine to machine, please mount \u002Fvar\u002Frun\u002Fdocker.sock. If this does not work, please create an issue.\nurl = \"http:\u002F\u002F127.0.0.1:2375\"\n# Docker image used for video recording\nvideo-image = \"selenium\u002Fvideo:ffmpeg-8.1-20260404\"\n\n# Uncomment the following section if you are running the node on a separate VM\n# Fill out the placeholders with appropriate values\n[server]\nhost = \u003Cip-from-node-machine>\nport = \u003Cport-from-node-machine>\n```\n\nTo have the assets saved on your host, please mount your host path to `\u002Fopt\u002Fselenium\u002Fassets`.\n\n### Execution with Docker Compose\n\nHere is an example using a Hub and a Node:\n\n[`docker-compose-v3-dynamic-grid.yml`](docker-compose-v3-dynamic-grid.yml)\n\n\n### Configuring the child containers\n\nContainers can be further configured through environment variables, such as `SE_NODE_SESSION_TIMEOUT`\nand `SE_OPTS`. When a child container is created, all environment variables prefixed with `SE_` will\nbe forwared and set in the container. You can set the desired environment variables in the \n`standalone-docker` or `node-docker` containers. The following example sets the session timeout to\n700 seconds for all sessions:\n\n#### macOS\u002FLinux\n\n```bash\ndocker run --rm --name selenium-docker -p 4444:4444 \\\n    -e SE_NODE_SESSION_TIMEOUT=700 \\\n    -v ${PWD}\u002Fconfig.toml:\u002Fopt\u002Fselenium\u002Fdocker.toml \\\n    -v ${PWD}\u002Fassets:\u002Fopt\u002Fselenium\u002Fassets \\\n    -v \u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock \\\n    selenium\u002Fstandalone-docker:4.43.0-20260404\n```\n\n#### Windows PowerShell\n\n```bash\ndocker run --rm --name selenium-docker -p 4444:4444 `\n    -e SE_NODE_SESSION_TIMEOUT=700 `\n    -v ${PWD}\u002Fconfig.toml:\u002Fopt\u002Fselenium\u002Fdocker.toml `\n    -v ${PWD}\u002Fassets:\u002Fopt\u002Fselenium\u002Fassets `\n    -v \u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock `\n    selenium\u002Fstandalone-docker:4.43.0-20260404\n```\n\n### Video recording, screen resolution, and time zones in a Dynamic Grid\nTo record your WebDriver session, you need to add a `se:recordVideo` \nfield set to `true`. You can also set a time zone and a screen resolution,\nfor example:\n\n```json\n{\n  \"browserName\": \"firefox\",\n  \"platformName\": \"linux\",\n  \"se:recordVideo\": \"true\",\n  \"se:timeZone\": \"US\u002FPacific\",\n  \"se:screenResolution\": \"1920x1080\"  \n}\n```\n\nAfter running a test, check the path you mounted to the Docker container, \n(`${PWD}\u002Fassets`), and you should see videos and session information. \n\nFrom language bindings, you can set the `se:name` capability to change output video file name dynamically. For example, in Python binding:\n\n```python\nfrom selenium.webdriver.chrome.options import Options as ChromeOptions\nfrom selenium import webdriver\n\noptions = ChromeOptions()\noptions.set_capability('se:recordVideo', True)\noptions.set_capability('se:screenResolution', '1920x1080')\noptions.set_capability('se:name', 'test_visit_basic_auth_secured_page (ChromeTests)')\ndriver = webdriver.Remote(options=options, command_executor=\"http:\u002F\u002Flocalhost:4444\")\ndriver.get(\"https:\u002F\u002Fselenium.dev\")\ndriver.quit()\n```\n\nAfter test executed, under (`${PWD}\u002Fassets`) you can see the video file name in path `\u002F\u003CsessionId>\u002Ftest_visit_basic_auth_secured_page_ChromeTests.mp4`\n\nThe file name will be trimmed to 255 characters to avoid long file names. Moreover, the `space` character will be replaced by `_`, and only the characters alphabets, numbers, `-` (hyphen), and `_` (underscore) are retained in the file name. (This feat is available once this [PR](https:\u002F\u002Fgithub.com\u002FSeleniumHQ\u002Fselenium\u002Fpull\u002F13907) merged)\n\n### Time zone configuration via env variable\n\n`tzdata` is installed in based images, and you can set the time zone in container by using the env variable `TZ`.\nBy default, the time zone is set to `UTC`.\nList of supported time zones can be found [here](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FList_of_tz_database_time_zones). For example:\n\n```bash\n$ docker run --rm --entrypoint=\"\" -e TZ=Asia\u002FHo_Chi_Minh selenium\u002Fnode-chromium:latest date +%FT%T%Z\n2024-08-28T18:19:26+07\n```\n\n___\n\n## Deploying to Kubernetes\n\nGet started to deploy Selenium Grid on Kubernetes, you can refer to YAML files in the [kubernetes](.\u002Fkubernetes) directory.\n\nTo simplify the deployment process, hide the complexity of Kubernetes objects, and provide a more straightforward way to deploy Selenium Grid on Kubernetes, we offer a Helm chart to deploy Selenium Grid to Kubernetes.\nRead more details at the Helm [chart README](.\u002Fcharts\u002Fselenium-grid\u002FREADME.md) and [chart CONFIGURATION](.\u002Fcharts\u002Fselenium-grid\u002FCONFIGURATION.md).\n\n- Get started to hands-on with Selenium Grid on Kubernetes. See local env setup with [Docker Desktop](.\u002Ftests\u002Fcharts\u002FrefValues\u002FREADME.md).\n\n___\n\n## Configuring the containers\n\n### SE_OPTS Selenium Configuration Options\n\nYou can pass `SE_OPTS` variable with additional command line parameters for starting a hub or a node.\n\n``` bash\n$ docker run -d -p 4444:4444 -e SE_OPTS=\"--log-level FINE\" --name selenium-hub selenium\u002Fhub:4.43.0-20260404\n```\n\n### SE_JAVA_OPTS Java Environment Options\n\nYou can pass `SE_JAVA_OPTS` environment variable to the Java process.\n\n``` bash\n$ docker run -d -p 4444:4444 -e SE_JAVA_OPTS=-Xmx512m --name selenium-hub selenium\u002Fhub:4.43.0-20260404\n```\n\n### SE_BROWSER_ARGS_* Add arguments for launching browser\n\nInstead of adding arguments via the browser options from language bindings, for example:\n\n```python\noptions = ChromeOptions()\noptions.add_argument('--incognito')\noptions.add_argument('--disable-dev-shm-usage')\ndriver = webdriver.Remote(options=options, command_executor=\"http:\u002F\u002Flocalhost:4444\u002Fwd\u002Fhub\")\n```\n\nYou also can proactive to force applying arguments directly from (node, standalone or node-docker) container environment variables. Define the environment variable with name starts with `SE_BROWSER_ARGS_` and following by config key is up to you (ensure those are unique when you define multiple arguments). For example:\n\n```bash\ndocker run -d -p 4444:4444 \\\n  -e SE_BROWSER_ARGS_INCOGNITO=--incognito \\\n  -e SE_BROWSER_ARGS_DISABLE_DSHM=--disable-dev-shm-usage \\\n  selenium\u002Fstandalone-chrome:latest\n```\n\n[List chromium command-line arguments](https:\u002F\u002Fpeter.sh\u002Fexperiments\u002Fchromium-command-line-switches\u002F) for your reference.\n\nNote: Currently, this is applicable for node browsers Chrome\u002FChromium, Edge.\n\n### Node configuration options\n\nThe Nodes register themselves through the Event Bus. When the Grid is started in its typical Hub\u002FNode\nsetup, the Hub will be the one acting as the Event Bus, and when the Grid is started with all its five\nelements apart, the Event Bus will be running on its own.\n\nIn both cases, it is necessary to tell the Node where the Event Bus is, so it can register itself. That is\nthe purpose of the `SE_EVENT_BUS_HOST`, `SE_EVENT_BUS_PUBLISH_PORT` and `SE_EVENT_BUS_SUBSCRIBE_PORT` environment\nvariables.\n\nIn some cases, for example, if you want to tag a node, it might be necessary to supply a custom stereotype to the node config. The environment variable `SE_NODE_STEREOTYPE`\nsets the stereotype entry in the node's `config.toml`. An example config.toml file can be found here: [Setting custom capabilities for matching specific Nodes](https:\u002F\u002Fwww.selenium.dev\u002Fdocumentation\u002Fgrid\u002Fconfiguration\u002Ftoml_options\u002F#setting-custom-capabilities-for-matching-specific-nodes).\n\nHere is an example with the default values of these environment variables:\n```bash\n$ docker run -d \\\n  -e SE_EVENT_BUS_HOST=\u003Cevent_bus_ip|event_bus_name> \\\n  -e SE_NODE_STEREOTYPE=\"{\\\"browserName\\\":\\\"${SE_NODE_BROWSER_NAME}\\\", \\\"browserVersion\\\":\\\"${SE_NODE_BROWSER_VERSION}\\\", \\\"platformName\\\":\\\"${SE_NODE_PLATFORM_NAME}\\\"}\" \\\n  --shm-size=\"2g\" selenium\u002Fnode-chrome:4.43.0-20260404\n```\n\nIn another case, if you want to retain the default Node stereotype and append additional capabilities, you can use the `SE_NODE_STEREOTYPE_EXTRA` environment variable to set your capabilities. Those will be merged to the default stereotype. For example:\n```bash\n$ docker run -d \\\n  -e SE_EVENT_BUS_HOST=\u003Cevent_bus_ip|event_bus_name> \\\n  -e SE_NODE_STEREOTYPE_EXTRA=\"{\\\"myApp:version\\\":\\\"beta\\\", \\\"myApp:publish:\\\":\\\"public\\\"}\" \\\n  --shm-size=\"2g\" selenium\u002Fnode-chrome:4.43.0-20260404\n```\n\nThis help setting custom capabilities for matching specific Nodes. For example, you added your custom capabilities when starting the Node, and you want assign a test to run on that Node which matches your capabilities. For example in test code:\n\n```python\noptions = ChromeOptions()\noptions.set_capability('myApp:version', 'beta')\noptions.set_capability('myApp:publish', 'public')\ndriver = webdriver.Remote(options=options, command_executor=SELENIUM_GRID_URL)\n```\n\nNoted: Your custom capabilities with key values should be in W3C capabilities convention, extension capabilities key must contain a \":\" (colon) character, denoting an implementation specific namespace.\n\nNoted: Ensure that Node config `detect-drivers = false` in `config.toml` (or `--detect-drivers false` in CLI option) to make feature setting custom capabilities for matching specific Nodes get working.\n\nIn addition, default Node stereotype includes capability `se:containerName` which can visible in node capabilities, or session capabilities to identify the container name where the node\u002Fsession is running. **The prefixed `se:containerName` is not included in slot matcher**. By default, value is getting from `hostname` command in container, this value is equivalent to the `container_id` that you saw via `docker ps` command. If you want to override this value, you can set the environment variable `SE_NODE_CONTAINER_NAME` to your desired value. For example, when deploy to Kubernetes cluster, you can assign Pod name to env var `SE_NODE_CONTAINER_NAME` to track a node is running in which Pod.\n\n```yaml\n  env:\n    - name: SE_NODE_CONTAINER_NAME\n      valueFrom:\n        fieldRef:\n          fieldPath: metadata.name\n```\n\nIn an advanced case, where you control to spawn up a Node container, let it register to Hub, and then trigger a test to be assigned exactly to run on that Node. By default, the value of command `$(hostname)` is added to capability name `container:hostname` in Node stereotype. Combine with above feature setting custom capabilities for matching specific Nodes. You can use the `hostname` of the Node container just spawned up and set it as a custom capability. For example, in Python binding:\n\n```bash\n$ docker run -d --name my-node-1 -e SE_EVENT_BUS_HOST=localhost \\\n  --shm-size=\"2g\" selenium\u002Fnode-chrome:4.43.0-20260404\n$ docker exec -i my-node-1 hostname\na6971f95bbab\n```\n\n```python\noptions = ChromeOptions()\noptions.set_capability('container:hostname', 'a6971f95bbab')\ndriver = webdriver.Remote(options=options, command_executor=SELENIUM_GRID_URL)\n```\n\n_Noted: Those above changes require new image tag where the changeset is included & released._\n\n### Node configuration relay commands\n\nRelaying commands to a service endpoint that supports WebDriver.\nIt is useful to connect an external service that supports WebDriver to Selenium Grid. An example of such service could be a cloud provider or an Appium server. \nIn this way, Grid can enable more coverage to platforms and versions not present locally.\n\nThe following is an en example of configuration relay commands.\n\n[docker-compose-v3-test-node-relay.yml](tests\u002Fdocker-compose-v3-test-node-relay.yml)\n\nIf you want to relay commands only, `selenium\u002Fnode-base` is suitable and lightweight for this purpose.\nIn case you want to configure node with both browsers and relay commands, respective node images can be used.\n\nTo use environment variables for generate relay configs, set `SE_NODE_RELAY_URL` and other variables as below. Those will be used to generate the default relay config in TOML format looks like below.\n\n```toml\n[relay]\nurl = \"${SE_NODE_RELAY_URL}\"\nstatus-endpoint = \"${SE_NODE_RELAY_STATUS_ENDPOINT}\"\nprotocol-version = \"${SE_NODE_RELAY_PROTOCOL_VERSION}\"\nconfigs = [ '${SE_NODE_RELAY_MAX_SESSIONS}', '{\"browserName\": \"${SE_NODE_RELAY_BROWSER_NAME}\", \"platformName\": \"${SE_NODE_RELAY_PLATFORM_NAME}\", \"appium:platformVersion\": \"${SE_NODE_RELAY_PLATFORM_VERSION}\"}' ]\n```\n\nInstead of input value for each environment variable to construct the default relay stereotype, you can use the `SE_NODE_RELAY_STEREOTYPE` environment variable to overwrite the default relay stereotype with your custom stereotype.\n\nIn another case, if you want to retain the default relay stereot","SeleniumHQ\u002Fdocker-selenium 项目提供了一种简便的方法来使用容器平台运行带有 Chrome、Firefox 和 Edge 的 Selenium Grid，从而简化大规模浏览器自动化任务。该项目利用 Docker 容器化技术，支持分布式系统架构，能够轻松部署和管理 Selenium Grid 环境，并且兼容 Kubernetes 等主流容器编排工具。它非常适合需要在多种浏览器上执行自动化测试的开发团队或持续集成\u002F持续交付（CI\u002FCD）流程中使用。此外，通过 Helm Chart 可以方便地在 Kubernetes 上进行安装与扩展，进一步提升了其在云原生环境中的适用性。",2,"2026-06-11 03:25:13","top_topic"]