# Changing the port number of ElasticSearch

**URL:** <https://discuss.elastic.co/t/changing-the-port-number-of-elasticsearch/10390>\
**Category:** Elasticsearch\
**Created:** [January 17, 2013, 1:05pm UTC](https://discuss.elastic.co/t/changing-the-port-number-of-elasticsearch/10390 "2013-01-17T13:05:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andreas\_Jung](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@Andreas\_Jung](https://discuss.elastic.co/u/Andreas_Jung)\
**Post date:** [January 17, 2013, 1:05pm UTC](https://discuss.elastic.co/t/changing-the-port-number-of-elasticsearch/10390/1 "2013-01-17T13:05:27Z")

</div>

We are using ElasticSearch 0.20.2 and run the daemon using

bin/elasticsearch [-f]

The bin/elasticsearch script sets ES\_HOME on its own and there seem to be  
no way to influence the path of the configuration file read. ES always  
reads the settings from

$ES\_HOME/config/elasticsearch.yml

However I must be able for specifying the path to our own configuration  
file _without_ overriding the existing _elasticsearch.yml_ that comes with  
ElasticSearch.

How do I do that?

-aj

--

---

<div class="post-metadata">

**Author:** ![Israel\_Tsadok](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/israel_tsadok/32/1283_2.png) [@Israel\_Tsadok](https://discuss.elastic.co/u/Israel_Tsadok)\
**Post date:** [January 17, 2013, 1:37pm UTC](https://discuss.elastic.co/t/changing-the-port-number-of-elasticsearch/10390/2 "2013-01-17T13:37:55Z")

</div>

You can set the system variable es.path.conf.

I run elasticsearch like this:  
$ES\_HOME/bin/elasticsearch -f -Des.path.conf=./

And I keep elasticsearch.yml and logging.yml in the current directory.

On Thu, Jan 17, 2013 at 3:05 PM, Andreas Jung [zopyxfilter@gmail.com](mailto:zopyxfilter@gmail.com) wrote:

> We are using Elasticsearch 0.20.2 and run the daemon using
> 
> bin/elasticsearch [-f]
> 
> The bin/elasticsearch script sets ES\_HOME on its own and there seem to be  
> no way to influence the path of the configuration file read. ES always  
> reads the settings from
> 
> $ES\_HOME/config/elasticsearch.yml
> 
> However I must be able for specifying the path to our own configuration  
> file _without_ overriding the existing _elasticsearch.yml_ that comes  
> with Elasticsearch.
> 
> How do I do that?
> 
> -aj
> 
> --

--

---

<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:** [July 6, 2017, 2:55am UTC](https://discuss.elastic.co/t/changing-the-port-number-of-elasticsearch/10390/3 "2017-07-06T02:55:55Z")

</div>


