# Run multiple Elasticsearch instance on the same server

**URL:** <https://discuss.elastic.co/t/run-multiple-elasticsearch-instance-on-the-same-server/140558>\
**Category:** Elasticsearch\
**Created:** [July 18, 2018, 12:58pm UTC](https://discuss.elastic.co/t/run-multiple-elasticsearch-instance-on-the-same-server/140558 "2018-07-18T12:58:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wrozan](https://avatars.discourse-cdn.com/v4/letter/w/7ea924/32.png) [@wrozan](https://discuss.elastic.co/u/wrozan)\
**Post date:** [July 18, 2018, 12:58pm UTC](https://discuss.elastic.co/t/run-multiple-elasticsearch-instance-on-the-same-server/140558/1 "2018-07-18T12:58:16Z")

</div>

Hi,

i have an ES server with an instance already installed and running.  
That one has been deployed from rpm file (v5.6.4)  
/etc/elasticsearch/

current yml file :

```
#cluster
cluster.name: nakisa
#node
node.name: leasing
#path
path.data: /data/ESData
path.logs: /data/ESLogs
#memory
bootstrap.memory_lock: true
#ports
network.host: 10.10.10.102
http.port: 9200
http.enabled: false

```

according ES guide, we can only ES using this command : systemctl start elasticsearch.service  
I mean service name cannot be changed as it already defined in the source (in rpm package).

I am looking for a way to create a new instance (with a different name) i could host on the same server.

is it possible to start in parallel a new instance with a different name ?  
i would for example save files in /etc/elasticsearch\_sim/

do you have any suggestion ?

thanks for you help

regards

Willy

---

<div class="post-metadata">

**Author:** ![A\_B](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/a_b/32/17104_2.png) [@A\_B](https://discuss.elastic.co/u/A_B)\
**Post date:** [July 18, 2018, 1:08pm UTC](https://discuss.elastic.co/t/run-multiple-elasticsearch-instance-on-the-same-server/140558/2 "2018-07-18T13:08:14Z")

</div>

I'm running up to 6 instances of ES on the same machine. I use Puppet and the official Puppet module from Elastic to do this. OS is Debian but I would think RedHat/Centos are supported too.

This is what `/etc/elasticsearch` looks like

> /etc/elasticsearch # find .  
> .  
> ./scripts  
> ./x-pack  
> ./x-pack/users\_roles  
> ./x-pack/users  
> ./x-pack/log4j2.properties  
> ./x-pack/roles.yml  
> ./x-pack/role\_mapping.yml  
> ./es-00  
> ./es-00/logging.yml  
> ./es-00/log4j2.properties  
> ./es-00/scripts  
> ./es-00/elasticsearch.yml  
> ./es-00/jvm.options  
> ./es-01  
> ./es-01/logging.yml  
> ./es-01/log4j2.properties  
> ./es-01/scripts  
> ./es-01/elasticsearch.yml  
> ./es-01/jvm.options  
> ./es-02  
> ./es-02/logging.yml  
> ./es-02/log4j2.properties  
> ./es-02/scripts  
> ./es-02/elasticsearch.yml  
> ./es-02/jvm.options  
> ./es-03  
> ./es-03/logging.yml  
> ./es-03/log4j2.properties  
> ./es-03/scripts  
> ./es-03/elasticsearch.yml  
> ./es-03/jvm.options

Each instance has it's on SystemD unit file

> /etc/systemd # find . -name "_elastic_"  
> ./system/multi-user.target.wants/elasticsearch-es-00.service  
> ./system/multi-user.target.wants/elasticsearch-es-01.service  
> ./system/multi-user.target.wants/elasticsearch-es-02.service  
> ./system/multi-user.target.wants/elasticsearch-es-03.service

The ES binary is just installed once

As long as you run each instance on it's own port you should be fine 🙂

---

<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 15, 2018, 1:08pm UTC](https://discuss.elastic.co/t/run-multiple-elasticsearch-instance-on-the-same-server/140558/3 "2018-08-15T13:08:15Z")

</div>

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