# Filebeat Docker - Elasticsearch Host Issue

**URL:** <https://discuss.elastic.co/t/filebeat-docker-elasticsearch-host-issue/320083>\
**Category:** Beats\
**Tags:** docker, filebeat\
**Created:** [November 29, 2022, 6:25pm UTC](https://discuss.elastic.co/t/filebeat-docker-elasticsearch-host-issue/320083 "2022-11-29T18:25:51Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [November 29, 2022, 6:51pm UTC](https://discuss.elastic.co/t/filebeat-docker-elasticsearch-host-issue/320083/2 "2022-11-29T18:51:15Z")

</div>

Hi @mwsprotte Welcome to the community!

Docker Networking Issue not Elastic...

> <https://stackoverflow.com/questions/24319662/from-inside-of-a-docker-container-how-do-i-connect-to-the-localhost-of-the-mach>

Another explanation

> **[How to Connect to Localhost Within a Docker Container](https://www.howtogeek.com/devops/how-to-connect-to-localhost-within-a-docker-container/)**
>
> When working with Docker, you usually containerize the services that form your stack and use inter-container networking to communicate between them. Sometimes you might need a container to talk to a service on your host that hasn’t been...

Might be worth reading... if you are new to docker

> **[Networking overview](https://docs.docker.com/network/)**
>
> Overview of Docker networks and networking concepts

try using

`host.docker.internal`

```auto
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/filebeat-docker-elasticsearch-host-issue/320083)._
