Configuration
The Browserless docker container is highly-configurable and accepts parameters through environment variables when starting docker container.
You can set parameters such as browserless server port, token, user data directory. Below is a description of each parameter.
Container Viewer
Connect to our docker container via VNC Viewer with default VNC server url localhost:5900
and password 1234
.
You can configure VNC server port and password by container environments.
Container environments
TOKEN(Required)
Our docker image is designed to always require a token, this means that you must pass a TOKEN
env variable.
docker run -it \
-e TOKEN=xxx \
-p 8848:8848 \
--name browserless \
nstbrowser/browserless:latest
PORT
By default, the Browserless server listens on port 8848. You can configure this in docker by PORT
env variable which limited in the range from 1024 to 65535.
docker run -it \
-e TOKEN=xxx \
-e PORT=8848 \
-p 8848:8848 \
--name browserless \
nstbrowser/browserless:latest
DATADIR
Sets a default directory to saving your browser data to, must be an absolute path and cannot be a root directory.
docker run -it \
-e TOKEN=xxx \
-e DATADIR=/tmp/browserless/profiles \
-p 8848:8848 \
--name browserless \
nstbrowser/browserless:latest
VNC_PORT
By default, the VNC server listens on port 5900. You can configure this in docker by VNC_PORT
env variable which limited in the range from 1024 to 65535.
docker run -it \
-e TOKEN=xxx \
-e VNC_PORT=6900 \
-p 8848:8848 \
-p 6900:6900 \
--name browserless \
nstbrowser/browserless:latest
VNC_PASSWORD
By default, the VNC server password is 1234
. You can configure this in docker by VNC_PASSWORD
env variable.
docker run -it \
-e TOKEN=xxx \
-e VNC_PASSWORD=4321 \
-p 8848:8848 \
--name browserless \
nstbrowser/browserless:latest