# Unable to set password for elastic (7.1.1)

**URL:** <https://discuss.elastic.co/t/unable-to-set-password-for-elastic-7-1-1/186160>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [June 17, 2019, 10:07pm UTC](https://discuss.elastic.co/t/unable-to-set-password-for-elastic-7-1-1/186160 "2019-06-17T22:07:25Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 20, 2019, 12:55pm UTC](https://discuss.elastic.co/t/unable-to-set-password-for-elastic-7-1-1/186160/3 "2019-06-20T12:55:30Z")

</div>

Here is what I'm using:

`.env` file:

```auto
ELASTIC_VERSION=7.1.1
ELASTIC_SECURITY=true
ELASTIC_PASSWORD=changeme

```

`docker-compose.yml` file:

```auto
---
version: '3'
services:

  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:$ELASTIC_VERSION
    environment:
      - bootstrap.memory_lock=true
      - discovery.type=single-node
      - ELASTIC_PASSWORD=$ELASTIC_PASSWORD
      - xpack.security.enabled=$ELASTIC_SECURITY
    ulimits:
      memlock:
        soft: -1
        hard: -1
    ports:
      - 9200:9200
    networks: ['stack']

  kibana:
    image: docker.elastic.co/kibana/kibana:$ELASTIC_VERSION
    environment:
      - ELASTICSEARCH_USERNAME=elastic
      - ELASTICSEARCH_PASSWORD=$ELASTIC_PASSWORD
    ports: ['5601:5601']
    networks: ['stack']
    links: ['elasticsearch']
    depends_on: ['elasticsearch']

networks:
  stack: {}

```

---

_[View the full topic](https://discuss.elastic.co/t/unable-to-set-password-for-elastic-7-1-1/186160)._
