# ElasticSearch(8.15.0) Docker setup, ENV not able to reset built in user-elastic's password

**URL:** <https://discuss.elastic.co/t/elasticsearch-8-15-0-docker-setup-env-not-able-to-reset-built-in-user-elastics-password/369891>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [October 31, 2024, 9:03pm UTC](https://discuss.elastic.co/t/elasticsearch-8-15-0-docker-setup-env-not-able-to-reset-built-in-user-elastics-password/369891 "2024-10-31T21:03:26Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Justin\_Castilla](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/justin_castilla/32/135379_2.png) [@Justin\_Castilla](https://discuss.elastic.co/u/Justin_Castilla)\
**Post date:** [October 31, 2024, 11:10pm UTC](https://discuss.elastic.co/t/elasticsearch-8-15-0-docker-setup-env-not-able-to-reset-built-in-user-elastics-password/369891/4 "2024-10-31T23:10:27Z")

</div>

Perhaps try an `.env` file and reference the password:

`.env` file:

```bash
ELASTIC_PASSWORD=elastic123

```

Dockerfile:

```bash
...
ENV ELASTIC_PASSWORD=$ELASTIC_PASSWORD
...

```

This is lifted from what I found [here](https://discuss.elastic.co/t/set-password-and-user-with-docker-compose/225075/2).

---

_[View the full topic](https://discuss.elastic.co/t/elasticsearch-8-15-0-docker-setup-env-not-able-to-reset-built-in-user-elastics-password/369891)._
