# Command to run multiple instances of logstash in windows

**URL:** <https://discuss.elastic.co/t/command-to-run-multiple-instances-of-logstash-in-windows/188845>\
**Category:** Logstash\
**Created:** [July 4, 2019, 6:30am UTC](https://discuss.elastic.co/t/command-to-run-multiple-instances-of-logstash-in-windows/188845 "2019-07-04T06:30:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Uchiha\_Kakashi](https://avatars.discourse-cdn.com/v4/letter/u/ecae2f/32.png) [@Uchiha\_Kakashi](https://discuss.elastic.co/u/Uchiha_Kakashi)\
**Post date:** [July 4, 2019, 6:30am UTC](https://discuss.elastic.co/t/command-to-run-multiple-instances-of-logstash-in-windows/188845/1 "2019-07-04T06:30:42Z")

</div>

I want to run multiple instances of logstash on my windows system. In elasticsearch to run multiple nodes at once I used below command.  
bin/elasticsearch -Epath.data=data1 -Epath.logs=log1 -Ecluster.name=elasticsearch -Enode.name=node-1.  
bin/elasticsearch -Epath.data=data2 -Epath.logs=log2 -Ecluster.name=elasticsearch -Enode.name=node-2. etc...  
So by defining the different parameters I could run multiple instances of ES. Can same be done with logstash. I tried bin/logstash -f sample.conf --path.data=data1 but did not work.  
Thanks in advance... 😊

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [July 4, 2019, 1:37pm UTC](https://discuss.elastic.co/t/command-to-run-multiple-instances-of-logstash-in-windows/188845/2 "2019-07-04T13:37:35Z")

</div>

> [@Uchiha\_Kakashi](#):
>
> Can same be done with logstash.

Yes. You need to specify a different --path.data for each instance.

---

<div class="post-metadata">

**Author:** ![Uchiha\_Kakashi](https://avatars.discourse-cdn.com/v4/letter/u/ecae2f/32.png) [@Uchiha\_Kakashi](https://discuss.elastic.co/u/Uchiha_Kakashi)\
**Post date:** [July 5, 2019, 5:33am UTC](https://discuss.elastic.co/t/command-to-run-multiple-instances-of-logstash-in-windows/188845/3 "2019-07-05T05:33:34Z")

</div>

Thank you,  
I got this. First create a directory and then specify the same path in command after  
--path.data.  
It worked 👍👍

---

<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 2, 2019, 5:33am UTC](https://discuss.elastic.co/t/command-to-run-multiple-instances-of-logstash-in-windows/188845/4 "2019-08-02T05:33:38Z")

</div>

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