# How to create two nodes in a single system

**URL:** https://discuss.elastic.co/t/how-to-create-two-nodes-in-a-single-system/93905
**Category:** Elasticsearch
**Created:** [July 20, 2017, 10:14am UTC](https://discuss.elastic.co/t/how-to-create-two-nodes-in-a-single-system/93905 "2017-07-20T10:14:36Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![kkotari](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kkotari/32/20272_2.png) [@kkotari](https://discuss.elastic.co/u/kkotari)
#### Post date: [July 20, 2017, 10:14am UTC](https://discuss.elastic.co/t/how-to-create-two-nodes-in-a-single-system/93905/1 "2017-07-20T10:14:36Z")

</div>

How to create 2 different data nodes and configure them to 2 projects.

Data sets are 1 GB each and I am maintaining them in my local system.

Thanks,  
Kiran Kumar

---

<div class="post-metadata">

### Author: ![kkotari](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kkotari/32/20272_2.png) [@kkotari](https://discuss.elastic.co/u/kkotari)
#### Post date: [July 20, 2017, 5:24pm UTC](https://discuss.elastic.co/t/how-to-create-two-nodes-in-a-single-system/93905/2 "2017-07-20T17:24:01Z")

</div>

I found the solution @[stackoverflow](https://stackoverflow.com/questions/35717790/how-to-add-a-new-node-to-my-elasticsearch-cluster)

Complete steps on Windows Box are:

1. unzip elastic, go to `C:\ELK\elastic` run the following command `bin\elasticsearch-service.bat install enode1` which will create service named enode1
2. edit `elasticsearch.yml` config file:

> cluster.name: Animals  
> node.name: Snake  
> node.master: true  
> node.data: true  
> path.data: C:\ELK\storage\snake\data  
> path.logs: C:\ELK\storage\snake\logs  
> http.port: 9200

1. run service manager `enode1` and set-up your services rules and start the service  
if service manager fails, start manually use the following command `bin/elasticsearch.bat`

2. unzip elastic, go to `C:\ELK\elastic2` run the following command `bin\elasticsearch-service.bat install enode2` which will create service named enode2

3. edit `elasticsearch.yml` config file:

> cluster.name: Animals  
> node.name: Baboon  
> node.master: true  
> node.data: true  
> path.data: C:\ELK\storage\baboon\data  
> path.logs: C:\ELK\storage\baboon\logs  
> http.port: 9201

1. run service manager `enode2` and set-up your services rules and start the service  
if service manager fails, start manually use the following command `bin/elasticsearch.bat`

2. At this point you have 2 separate nodes as 2 separate Windows Services and `GET http://localhost:9200/_cluster/health` shows something like:

> {  
> "cluster\_name": "Animals",  
> "status": "green",  
> "timed\_out": false,  
> "number\_of\_nodes": 2,  
> "number\_of\_data\_nodes": 2,  
> "active\_primary\_shards": 4,  
> "active\_shards": 8,  
> "relocating\_shards": 0,  
> "initializing\_shards": 0,  
> "unassigned\_shards": 0,  
> "delayed\_unassigned\_shards": 0,  
> "number\_of\_pending\_tasks": 0,  
> "number\_of\_in\_flight\_fetch": 0,  
> "task\_max\_waiting\_in\_queue\_millis": 0,  
> "active\_shards\_percent\_as\_number": 100  
> }

---

<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 17, 2017, 5:24pm UTC](https://discuss.elastic.co/t/how-to-create-two-nodes-in-a-single-system/93905/3 "2017-08-17T17:24:06Z")

</div>

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