# Can I run multiple Elasticsearch instances in one server?

**URL:** https://discuss.elastic.co/t/can-i-run-multiple-elasticsearch-instances-in-one-server/321230
**Category:** Elasticsearch
**Created:** [December 14, 2022, 2:40pm UTC](https://discuss.elastic.co/t/can-i-run-multiple-elasticsearch-instances-in-one-server/321230 "2022-12-14T14:40:58Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Lakshmi\_Kumari](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lakshmi_kumari/32/81108_2.png) [@Lakshmi\_Kumari](https://discuss.elastic.co/u/Lakshmi_Kumari)
#### Post date: [December 14, 2022, 2:40pm UTC](https://discuss.elastic.co/t/can-i-run-multiple-elasticsearch-instances-in-one-server/321230/1 "2022-12-14T14:40:58Z")

</div>

Can I run multiple Elasticsearch instances in one server?  
-If yes, How can I install 2 Elasticsearch instances in a single Linux server.  
I am aware if we use "yum install" will be installed without any issue.

Thanks in Advance

---

<div class="post-metadata">

### Author: ![sai\_saran1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sai_saran1/32/116661_2.png) [@sai\_saran1](https://discuss.elastic.co/u/sai_saran1)
#### Post date: [December 14, 2022, 2:47pm UTC](https://discuss.elastic.co/t/can-i-run-multiple-elasticsearch-instances-in-one-server/321230/2 "2022-12-14T14:47:52Z")

</div>

Yes, we can run multiple instances of Elasticsearch in a single machine/server.  
Instead of using yum install command, you can download, configure and run the tar.gz files from [elastic.co](http://elastic.co), But use different ports and data directories for each instance.

---

<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: [December 14, 2022, 3:06pm UTC](https://discuss.elastic.co/t/can-i-run-multiple-elasticsearch-instances-in-one-server/321230/3 "2022-12-14T15:06:51Z")

</div>

Welcome!

Why do you want to do this?

---

<div class="post-metadata">

### Author: ![thn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thn/32/8061_2.png) [@thn](https://discuss.elastic.co/u/thn)
#### Post date: [December 14, 2022, 5:50pm UTC](https://discuss.elastic.co/t/can-i-run-multiple-elasticsearch-instances-in-one-server/321230/4 "2022-12-14T17:50:50Z")

</div>

Yes and I did that recently with my laptop for experimentation with things that I would like to do with ES Cluster. This setup simplifies my environment, instead of using docker or using multiple machines/VMs/EC2 instances.

You can download and use the .tar.gz file recommended above, and then you can do one of the following options

- **option 1** - untar the file into two directories: **es-01** , **es-02** then update the config file in each node

- **option 2** - untar the file into one directory: **es-instance** , copy the **config** directory to another location with something like **path/to/es-01/config** , **path/to/es-02/config** then create a script to launch elasticsearch from the same binary location (which is es-instance) but use different config location (one for es-01/config, one for es-02/config)

> **[Configuring Elasticsearch | Elasticsearch Guide \[8.5\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/settings.html#config-files-location)**

You need to update the following parameters in **config/elasticsearch.yml** file to separate one node from the other.

- cluster.name
- node.name
- path.data
- path.logs
- http.port

---

<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: [January 11, 2023, 5:50pm UTC](https://discuss.elastic.co/t/can-i-run-multiple-elasticsearch-instances-in-one-server/321230/5 "2023-01-11T17:50:57Z")

</div>

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