Environment variables for Elasticsearch

You need to provide a user name and password for access to Elasticsearch and, optionally, a path to store Elasticsearch data. You can also set how long generated certificates are valid.

You must set the variables that have no default value before you run the bai-start command. Otherwise, you are prompted to set these values during the start process.

The following table lists the variables for authentication and storage to Elasticsearch.
Table 1. Environment variables for Elasticsearch
Parameter Description Default value
ELASTICSEARCH_USERNAME The user name for Elasticsearch authentication. This user has administrator rights in the Kibana user interface. None
ELASTICSEARCH_PASSWORD The user password for Elasticsearch authentication. This user has administrator rights in the Kibana user interface. None
ELASTICSEARCH_CLUSTER_NAME The name of the Elasticsearch cluster elasticsearch
ELASTICSEARCH_VOLUME_DIR The directory for storing Elasticsearch data. Specify an existing absolute path with write permissions. The volumes/elasticsearch directory under the installation directory
ELASTICSEARCH_EXTERNAL_HOSTNAME Optional. The fully qualified host name where Elasticsearch is reachable. None
ELASTICSEARCH_PORT Optional. The port number where Elasticsearch is reachable. None
 New in 20.0.2 IF001  ELASTICSEARCH_CERTIFICATES_VALIDITY_DAYS Optional. The number of days during which generated Elasticsearch certificates are valid. 730
 New in 20.0.2 IF001  OPENDISTRO_CERTIFICATES_VALIDITY_DAYS Optional. The number of days during which generated Open Distro for Elasticsearch certificates are valid. 730