# Unable to connect filebeat to elastic search host

**URL:** <https://discuss.elastic.co/t/unable-to-connect-filebeat-to-elastic-search-host/326260>\
**Category:** Beats\
**Tags:** docker, filebeat\
**Created:** [February 23, 2023, 5:42am UTC](https://discuss.elastic.co/t/unable-to-connect-filebeat-to-elastic-search-host/326260 "2023-02-23T05:42:53Z")\
**Posts on this page:** 1\
**Showing post:** 3

<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:** [February 23, 2023, 6:10am UTC](https://discuss.elastic.co/t/unable-to-connect-filebeat-to-elastic-search-host/326260/3 "2023-02-23T06:10:10Z")

</div>

@Shrivatsa_Rao

Perhaps Take a look at this ... Localhost within your docker container is not localhost of the host/ server

> [@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/unable-to-connect-filebeat-to-elastic-search-host/326260)._
