# ELK stack in docker

**URL:** <https://discuss.elastic.co/t/elk-stack-in-docker/378721>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-monitoring, elastic-stack-security, docker\
**Created:** [May 30, 2025, 5:23am UTC](https://discuss.elastic.co/t/elk-stack-in-docker/378721 "2025-05-30T05:23:06Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [May 30, 2025, 4:54pm UTC](https://discuss.elastic.co/t/elk-stack-in-docker/378721/6 "2025-05-30T16:54:47Z")

</div>

Can you curl the Elasticsearch endpoint from inside the logstash container? or from your host?

From inside container try this (using what you are using will probably fail)

`curl -v http://<elasticsearch>:9200`

Or try this... (probably will work)

`curl -v http://host.docker.internal:9200`

From outside container

`curl -v http://localhost:9200`

Do you know how docker networks ... how to get one container to connect to another

> [@Filebeat Docker - Elasticsearch Host Issue](https://discuss.elastic.co/t/filebeat-docker-elasticsearch-host-issue/320083/2):
>
> Hi @mwsprotte Welcome to the community! Docker Networking Issue not Elastic... Another explanation Might be worth reading... if you are new to docker try using host.docker.internal docker run \ --net=elastic docker.elastic.co/beats/filebeat:7.17.4 \ setup -E setup.kibana.host=host.docker.internal:5601 \ -E output.elasticsearch.hosts=["https://host.docker.internal:9200"]

---

_[View the full topic](https://discuss.elastic.co/t/elk-stack-in-docker/378721)._
