# Data storage location for elasticseach on docker

**URL:** <https://discuss.elastic.co/t/data-storage-location-for-elasticseach-on-docker/339602>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [July 29, 2023, 5:20pm UTC](https://discuss.elastic.co/t/data-storage-location-for-elasticseach-on-docker/339602 "2023-07-29T17:20:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mataz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mataz/32/124057_2.png) [@Mataz](https://discuss.elastic.co/u/Mataz)\
**Post date:** [July 29, 2023, 5:20pm UTC](https://discuss.elastic.co/t/data-storage-location-for-elasticseach-on-docker/339602/1 "2023-07-29T17:20:39Z")

</div>

I am trying to install elasticsearch for docker but I got stuck with configuring the data storage location for the logs collected from the log aggregators coming to elasticsearch. Basically I need to store the data on the host machine and not on the docker container to ensure no data is lost if the container failed.

---

<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:** [July 29, 2023, 5:47pm UTC](https://discuss.elastic.co/t/data-storage-location-for-elasticseach-on-docker/339602/2 "2023-07-29T17:47:31Z")

</div>

Welcome!

The installation documentation does that by default.

See the note: [Install Elasticsearch with Docker | Elasticsearch Guide [8.9] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#_always_bind_data_volumes)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 26, 2023, 5:47pm UTC](https://discuss.elastic.co/t/data-storage-location-for-elasticseach-on-docker/339602/3 "2023-08-26T17:47:48Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
