# How to change configuration file path?

**URL:** <https://discuss.elastic.co/t/how-to-change-configuration-file-path/361114>\
**Category:** Elasticsearch\
**Created:** [June 9, 2024, 4:55pm UTC](https://discuss.elastic.co/t/how-to-change-configuration-file-path/361114 "2024-06-09T16:55:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![apashnin.work](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/apashnin.work/32/121946_2.png) [@apashnin.work](https://discuss.elastic.co/u/apashnin.work)\
**Post date:** [June 9, 2024, 4:55pm UTC](https://discuss.elastic.co/t/how-to-change-configuration-file-path/361114/1 "2024-06-09T16:55:59Z")

</div>

If I want to store /etc/elasticsearch/elasticsearch.yml file somewhere else how can I specify it to Elasticsearch service?

---

<div class="post-metadata">

**Author:** ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)\
**Post date:** [June 11, 2024, 2:38am UTC](https://discuss.elastic.co/t/how-to-change-configuration-file-path/361114/2 "2024-06-11T02:38:44Z")

</div>

Why do you want to store it somewhere else?

Elasticsearch requires that all of its configuration files are in the same directory. There are ways to change where that directory is, but it's not really recommended - what are you looking to achieve?

---

<div class="post-metadata">

**Author:** ![Alex\_Salgado-Elastic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alex_salgado-elastic/32/103081_2.png) [@Alex\_Salgado-Elastic](https://discuss.elastic.co/u/Alex_Salgado-Elastic)\
**Post date:** [June 11, 2024, 12:24pm UTC](https://discuss.elastic.co/t/how-to-change-configuration-file-path/361114/3 "2024-06-11T12:24:10Z")

</div>

Maybe it could help: [Configuring Elasticsearch | Elasticsearch Guide [8.14] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/settings.html)
