# How to configure elasticsearch on ec2 of aws for a single node?

**URL:** <https://discuss.elastic.co/t/how-to-configure-elasticsearch-on-ec2-of-aws-for-a-single-node/178616>\
**Category:** Elasticsearch\
**Created:** [April 26, 2019, 9:58am UTC](https://discuss.elastic.co/t/how-to-configure-elasticsearch-on-ec2-of-aws-for-a-single-node/178616 "2019-04-26T09:58:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mohammed\_khan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mohammed_khan/32/42668_2.png) [@Mohammed\_khan](https://discuss.elastic.co/u/Mohammed_khan)\
**Post date:** [April 26, 2019, 9:58am UTC](https://discuss.elastic.co/t/how-to-configure-elasticsearch-on-ec2-of-aws-for-a-single-node/178616/1 "2019-04-26T09:58:26Z")

</div>

I saw many tutorials online for elasticsearch setup on ec2, they were for cluster setup. I want only one instance of elasticsearch. Hence i did the basic setup and changed network.host to "localhost", i was able to see output for - sudo curl [http://localhost:9200](http://localhost:9200) -, but when i tried using public ip it didnt work. I even changed network.host to private ip, even curl didnt give ouput and even in browser it didnt work. What to do?

---

<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:** [April 26, 2019, 10:43am UTC](https://discuss.elastic.co/t/how-to-configure-elasticsearch-on-ec2-of-aws-for-a-single-node/178616/2 "2019-04-26T10:43:12Z")

</div>

You probably need to configure the firewall settings to let the traffic goes from the public IP to your 9200 port on the private IP.

**BUT** never do that without any security in place.

BTW did you look at [https://www.elastic.co/cloud](https://www.elastic.co/cloud) and [https://aws.amazon.com/marketplace/pp/B01N6YCISK](https://aws.amazon.com/marketplace/pp/B01N6YCISK) ?

Cloud by elastic is one way to have access to all features, all managed by us. Think about what is there yet like Security, Monitoring, Reporting, SQL, Canvas, APM, Logs UI, Infra UI and what is coming next 🙂 ...

---

<div class="post-metadata">

**Author:** ![Mohammed\_khan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mohammed_khan/32/42668_2.png) [@Mohammed\_khan](https://discuss.elastic.co/u/Mohammed_khan)\
**Post date:** [April 26, 2019, 10:58am UTC](https://discuss.elastic.co/t/how-to-configure-elasticsearch-on-ec2-of-aws-for-a-single-node/178616/3 "2019-04-26T10:58:22Z")

</div>

i have added 9200 port in security group.

---

<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:** [April 26, 2019, 10:59am UTC](https://discuss.elastic.co/t/how-to-configure-elasticsearch-on-ec2-of-aws-for-a-single-node/178616/4 "2019-04-26T10:59:10Z")

</div>

That should be ok then.  
What are your elasticsearch logs?

---

<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:** [May 24, 2019, 10:59am UTC](https://discuss.elastic.co/t/how-to-configure-elasticsearch-on-ec2-of-aws-for-a-single-node/178616/5 "2019-05-24T10:59:17Z")

</div>

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