# Running rasa on 0.0.0.0 instead of localhost in container

**URL:** <https://forum.rasa.com/t/running-rasa-on-0-0-0-0-instead-of-localhost-in-container/46137>\
**Category:** Rasa Open Source\
**Created:** [July 25, 2021, 9:11pm UTC](https://forum.rasa.com/t/running-rasa-on-0-0-0-0-instead-of-localhost-in-container/46137 "2021-07-25T21:11:41Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![pvbhanuteja](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/pvbhanuteja/32/7189_2.png) [@pvbhanuteja](https://forum.rasa.com/u/pvbhanuteja)\
**Post date:** [July 25, 2021, 9:11pm UTC](https://forum.rasa.com/t/running-rasa-on-0-0-0-0-instead-of-localhost-in-container/46137/1 "2021-07-25T21:11:41Z")

</div>

I’m running 2.8.1 container

it binds on localhost:5005 again I need to use Nginx reverse proxy and all to properly map ports

Is there any way to run rasa on 0.0.0.0:5005 instead of localhost:5005 inside the container?

---

<div class="post-metadata">

**Author:** ![pvbhanuteja](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/pvbhanuteja/32/7189_2.png) [@pvbhanuteja](https://forum.rasa.com/u/pvbhanuteja)\
**Post date:** [July 25, 2021, 9:36pm UTC](https://forum.rasa.com/t/running-rasa-on-0-0-0-0-instead-of-localhost-in-container/46137/3 "2021-07-25T21:36:08Z")

</div>

Hi @nik202

I’m aware of using nginx

I’m looking for a way to run rasa on 0.0.0.0:5005 instead of localhost:5005 inside the docker container so that for development sake I can directly do port mappings without all the nginx configuration

---

<div class="post-metadata">

**Author:** ![pvbhanuteja](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/pvbhanuteja/32/7189_2.png) [@pvbhanuteja](https://forum.rasa.com/u/pvbhanuteja)\
**Post date:** [July 25, 2021, 10:01pm UTC](https://forum.rasa.com/t/running-rasa-on-0-0-0-0-instead-of-localhost-in-container/46137/6 "2021-07-25T22:01:56Z")

</div>

No need to do that.

Action server by default runs on 0.0.0.0:5055

I’m looking for solution who tried running the same for rasa container as well…

Docker inspection has got nothing to address binding as far as I know

---

<div class="post-metadata">

**Author:** ![pvbhanuteja](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/pvbhanuteja/32/7189_2.png) [@pvbhanuteja](https://forum.rasa.com/u/pvbhanuteja)\
**Post date:** [July 25, 2021, 10:19pm UTC](https://forum.rasa.com/t/running-rasa-on-0-0-0-0-instead-of-localhost-in-container/46137/8 "2021-07-25T22:19:14Z")

</div>

I think you didn’t get my question it’s independent of which one I want to run… according to heading it’s more of what and how I want to run 🙂

And also it has nothing to do with docker networking it’s more of rasa thing than a docker network thing 🙂

And I have gone through all these the threads on the forum there’s no clear proper solution. So I opened one.

---

<div class="post-metadata">

**Author:** ![amardeep](https://avatars.discourse-cdn.com/v4/letter/a/ba8739/32.png) [@amardeep](https://forum.rasa.com/u/amardeep)\
**Post date:** [July 27, 2021, 11:56am UTC](https://forum.rasa.com/t/running-rasa-on-0-0-0-0-instead-of-localhost-in-container/46137/9 "2021-07-27T11:56:56Z")

</div>

What happens if you use -p option to map host’s 5005 port with the docker container 5005 port while starting it ?

---

<div class="post-metadata">

**Author:** ![souvikg10](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/souvikg10/32/93_2.png) [@souvikg10](https://forum.rasa.com/u/souvikg10)\
**Post date:** [July 27, 2021, 1:10pm UTC](https://forum.rasa.com/t/running-rasa-on-0-0-0-0-instead-of-localhost-in-container/46137/10 "2021-07-27T13:10:34Z")

</div>

By Default, Rasa runs on host=0.0.0.0, so no need to specify it

> <https://github.com/RasaHQ/rasa/blob/f78a6a17d5146248500630a2397ee099a24e0f5c/rasa/core/run.py#L221>

So if in your case, 0.0.0.0 is not pointing to localhost or you are not able to connect , it is likely that your /etc/hosts is not configured with the map of 0.0.0.0 to localhost or 127.0.0.1

while i understand this might be what you need, i would highly recommend against doing so because it essentially opens your server to potential attacks. instead use a proxy to protect direct exposure on the internet.

---

<div class="post-metadata">

**Author:** ![pvbhanuteja](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/pvbhanuteja/32/7189_2.png) [@pvbhanuteja](https://forum.rasa.com/u/pvbhanuteja)\
**Post date:** [July 29, 2021, 2:09pm UTC](https://forum.rasa.com/t/running-rasa-on-0-0-0-0-instead-of-localhost-in-container/46137/11 "2021-07-29T14:09:22Z")

</div>

Yes,

I found that later. This is the correct answer.

I got a little bit confused as in the logs in was showing localhost:5005 instead of 0.0.0.0:5005

Later on, I found out it was the issue with kubs provider where by default they were not exposing the 5005 port as it was reserved for java development. etc hosts file were all good.

Anyways, rasa by default runs on 0.0.0.0 just in the logs it’s showing as locahost.
