Configuration
::: warning Notice
Docker is standalone with Nstbrowser dashboard, please do not confuse the APIs between them.
:::
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 environments
TOKEN
Browserless is designed to always require a token. This means 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 pass a PORT
env variable.
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.
docker run -it \
-e TOKEN=xxx \
-e DATADIR=/tmp/browserless/profiles \
-p 8848:8848 \
--name browserless \
nstbrowser/browserless:latest
Modified at 15 days ago