# To run elastic search and logstash on different server

**URL:** <https://discuss.elastic.co/t/to-run-elastic-search-and-logstash-on-different-server/216361>\
**Category:** Logstash\
**Created:** [January 24, 2020, 5:18am UTC](https://discuss.elastic.co/t/to-run-elastic-search-and-logstash-on-different-server/216361 "2020-01-24T05:18:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![amanpradhan07](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@amanpradhan07](https://discuss.elastic.co/u/amanpradhan07)\
**Post date:** [January 24, 2020, 5:18am UTC](https://discuss.elastic.co/t/to-run-elastic-search-and-logstash-on-different-server/216361/1 "2020-01-24T05:18:51Z")

</div>

Hello everyone,  
I am using logstash on a linux based server . I am collecting the logs on this server and after processing the logs with logstash i want to send these logs to elastic search which is on an amazon ec-2 instance . for this what are the changes i will have to make in logstash config file and elasticsearch.yml ,logstash.yml file...i am changing the logstash output filter from hosts =\> ["localhost:9200"] to hosts =\> ["ec-2ip:9200"] . Do i have to change anything else or should there be any protocol enabled between these two servers . TCP is enabled between them.  
Thanks in advance

---

<div class="post-metadata">

**Author:** ![inhinyera16](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/inhinyera16/32/61625_2.png) [@inhinyera16](https://discuss.elastic.co/u/inhinyera16)\
**Post date:** [January 25, 2020, 6:34pm UTC](https://discuss.elastic.co/t/to-run-elastic-search-and-logstash-on-different-server/216361/2 "2020-01-25T18:34:31Z")

</div>

You might need to provide also authentication details as well as certificates of required.

---

<div class="post-metadata">

**Author:** ![amanpradhan07](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@amanpradhan07](https://discuss.elastic.co/u/amanpradhan07)\
**Post date:** [January 27, 2020, 5:21am UTC](https://discuss.elastic.co/t/to-run-elastic-search-and-logstash-on-different-server/216361/3 "2020-01-27T05:21:58Z")

</div>

sorry i didn't get you. authentication details of what? You mean to say elastic search authentication details??  
and which certificates you are saying

---

<div class="post-metadata">

**Author:** ![vinu89](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vinu89/32/45939_2.png) [@vinu89](https://discuss.elastic.co/u/vinu89)\
**Post date:** [January 27, 2020, 9:42am UTC](https://discuss.elastic.co/t/to-run-elastic-search-and-logstash-on-different-server/216361/4 "2020-01-27T09:42:36Z")

</div>

in case if u are using a ssl certificate in logstash and elastic you have to mention in the ssl certificate path in the config file at output... and if u are using authentication mechanism in elastic(ur elastic server is enabled with username and password) then those details also has to be in config file.

[https://www.elastic.co/guide/en/elasticsearch/reference/current/setting-up-authentication.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/setting-up-authentication.html)

This is applicable only if certificate and authentication is enabled else in output ur elastichosts and index name is enough

---

<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:** [February 24, 2020, 9:42am UTC](https://discuss.elastic.co/t/to-run-elastic-search-and-logstash-on-different-server/216361/5 "2020-02-24T09:42:46Z")

</div>

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