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:0.0.1-beta
SERVER_PORT
By default, the Browserless server listens on port 8848. You can configure this in docker by pass a SERVER_PORT
env variable.
docker run -it -e TOKEN=xxx -e SERVER_PORT=8000 -p 8000:8000 --name browserless nstbrowser/browserless:0.0.1-beta
DATA_DIR
Sets a default directory to saving your browser data to.
docker run -it -e TOKEN=xxx -e DATA_DIR=/tmp/browserless/profiles -p 8848:8848 --name browserless nstbrowser/browserless:0.0.1-beta
Last modified: 2 months ago