Skip to content

Instantly share code, notes, and snippets.

@Tuhin-thinks
Created August 18, 2025 13:58
Show Gist options
  • Save Tuhin-thinks/a3e27508a91bfa79a2f9813c8a39c0fe to your computer and use it in GitHub Desktop.
Save Tuhin-thinks/a3e27508a91bfa79a2f9813c8a39c0fe to your computer and use it in GitHub Desktop.
docker-compose.yaml file to run ES, Kibana v9.0.3
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:9.0.3
container_name: es_9.0.3
environment:
- discovery.type=single-node
- xpack.security.enabled=true
- ELASTIC_PASSWORD=tuhin190221
ports:
- "9200:9200"
volumes:
- esdata:/usr/share/elasticsearch/data
kibana:
image: docker.elastic.co/kibana/kibana:9.0.3
container_name: kibana_9.0.3
depends_on:
- elasticsearch
environment:
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
- ELASTICSEARCH_USERNAME=kibana_system
- ELASTICSEARCH_PASSWORD=tuhin190221
- XPACK_ENCRYPTEDSAVEDOBJECTS_ENCRYPTIONKEY=acdd823e2543f5db19dd646343b2bbf9
ports:
- "5601:5601"
volumes:
- kibana_data:/usr/share/kibana/data
volumes:
esdata:
kibana_data:
@Tuhin-thinks
Copy link
Author

Process to reset the elasticsearch user

**Open a bash shell inside elasticsearch docker container, and run this command:
(when prompted, set the user password)

bin/elasticsearch-reset-password --username elastic -i

Do the similar thing for kibana_system user

bin/elasticsearch-reset-password --username kibana_system -i

Once done, you are all set to log in inside the web UI on your http://localhost:5601.

The value for XPACK_ENCRYPTEDSAVEDOBJECTS_ENCRYPTIONKEY is generated by following these steps:

./bin/kibana-keystore create
./bin/kibana-keystore add elasticsearch.password

(here, elasticsearch.password is the password for user kibana_system)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment