# Rasa bot is not working in localhost url

**URL:** <https://forum.rasa.com/t/rasa-bot-is-not-working-in-localhost-url/11610>\
**Category:** Rasa Open Source\
**Created:** [June 17, 2019, 11:40am UTC](https://forum.rasa.com/t/rasa-bot-is-not-working-in-localhost-url/11610 "2019-06-17T11:40:37Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mounika1](https://avatars.discourse-cdn.com/v4/letter/m/f1d935/32.png) [@Mounika1](https://forum.rasa.com/u/Mounika1)\
**Post date:** [June 17, 2019, 11:40am UTC](https://forum.rasa.com/t/rasa-bot-is-not-working-in-localhost-url/11610/1 "2019-06-17T11:40:37Z")

</div>

Hii,

I created a rasa chatbot in latest version and it is working fine in commandline and chat.html but while opening localhost url like [http://localhost:5006](http://localhost:5006) in chat.html it is showing “this site can’t be reached” How can I make this localhost url work??

thanks in advance!

---

<div class="post-metadata">

**Author:** ![JiteshGaikwad](https://avatars.discourse-cdn.com/v4/letter/j/77aa72/32.png) [@JiteshGaikwad](https://forum.rasa.com/u/JiteshGaikwad)\
**Post date:** [June 17, 2019, 1:36pm UTC](https://forum.rasa.com/t/rasa-bot-is-not-working-in-localhost-url/11610/2 "2019-06-17T13:36:19Z")

</div>

hi @Mounika1 the issue due too CORS request, you need to enable cors while you run your rasa server, you can use the below command:

> rasa run -m models --enable-api --cors “\*” --debug

🙂

---

<div class="post-metadata">

**Author:** ![Mounika1](https://avatars.discourse-cdn.com/v4/letter/m/f1d935/32.png) [@Mounika1](https://forum.rasa.com/u/Mounika1)\
**Post date:** [June 18, 2019, 4:38am UTC](https://forum.rasa.com/t/rasa-bot-is-not-working-in-localhost-url/11610/3 "2019-06-18T04:38:05Z")

</div>

while running above command it is showing “hello from rasa” in localhost url and chat.html is empty. where our bot is running??

---

<div class="post-metadata">

**Author:** ![JiteshGaikwad](https://avatars.discourse-cdn.com/v4/letter/j/77aa72/32.png) [@JiteshGaikwad](https://forum.rasa.com/u/JiteshGaikwad)\
**Post date:** [June 18, 2019, 4:44am UTC](https://forum.rasa.com/t/rasa-bot-is-not-working-in-localhost-url/11610/4 "2019-06-18T04:44:42Z")

</div>

hey @Mounika1 can you tell me which UI you are using to connect your Rasa, I mean that chat.html? Can you please tell what’s in that chat.html? If you want you can try out this too it may help you: [https://github.com/JiteshGaikwad/Rasa\_CustomUI-v\_2.0](https://github.com/JiteshGaikwad/Rasa_CustomUI-v_2.0)

---

<div class="post-metadata">

**Author:** ![Mounika1](https://avatars.discourse-cdn.com/v4/letter/m/f1d935/32.png) [@Mounika1](https://forum.rasa.com/u/Mounika1)\
**Post date:** [June 18, 2019, 4:59am UTC](https://forum.rasa.com/t/rasa-bot-is-not-working-in-localhost-url/11610/5 "2019-06-18T04:59:30Z")

</div>

```
<html>
<body>
<div id="webchat"/>
<div id="webchat"/>
<script src="https://storage.googleapis.com/mrbot-cdn/webchat-0.5.8.js"></script>
<script>
WebChat.default.init({
selector: "#webchat",
initPayload: "/get_started",
interval: 1000, // 1000 ms between each message
customData: {"userId": "123"}, // arbitrary custom data. Stay minimal as this will be added to the socket
socketUrl: "http://localhost:5005",
socketPath: "/socket.io/",
title: "Robosensus",
subtitle: "Bot",
inputTextFieldHint: "Type a message...",
connectingText: "Waiting for server...",
hideWhenNotConnected: true,
fullScreenMode: false,
profileAvatar: "https://cdn.images.express.co.uk/img/dynamic/151/590x/Robot-uprising-wipe-out-humans-sir-martin-rees-787501.jpg",
openLauncherImage: 'myCustomOpenImage.png',
closeLauncherImage: 'myCustomCloseImage.png',
params: {
  images: {
    dims: {
      width: 300,
      height: 200,
    }
  },
  storage: "local"
}
})
</script>

</body>
</html>
```

---

<div class="post-metadata">

**Author:** ![Mounika1](https://avatars.discourse-cdn.com/v4/letter/m/f1d935/32.png) [@Mounika1](https://forum.rasa.com/u/Mounika1)\
**Post date:** [June 18, 2019, 4:59am UTC](https://forum.rasa.com/t/rasa-bot-is-not-working-in-localhost-url/11610/6 "2019-06-18T04:59:54Z")

</div>

the above content I am using in chat.html

---

<div class="post-metadata">

**Author:** ![JiteshGaikwad](https://avatars.discourse-cdn.com/v4/letter/j/77aa72/32.png) [@JiteshGaikwad](https://forum.rasa.com/u/JiteshGaikwad)\
**Post date:** [June 18, 2019, 5:34am UTC](https://forum.rasa.com/t/rasa-bot-is-not-working-in-localhost-url/11610/7 "2019-06-18T05:34:29Z")

</div>

hey @Mounika1 sorry but I haven’t used the rasa-webchat yet 😅

---

<div class="post-metadata">

**Author:** ![Mounika1](https://avatars.discourse-cdn.com/v4/letter/m/f1d935/32.png) [@Mounika1](https://forum.rasa.com/u/Mounika1)\
**Post date:** [June 18, 2019, 5:38am UTC](https://forum.rasa.com/t/rasa-bot-is-not-working-in-localhost-url/11610/8 "2019-06-18T05:38:49Z")

</div>

it’s ok

---

<div class="post-metadata">

**Author:** ![marcdecosta](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/marcdecosta/32/5943_2.png) [@marcdecosta](https://forum.rasa.com/u/marcdecosta)\
**Post date:** [February 10, 2020, 11:18am UTC](https://forum.rasa.com/t/rasa-bot-is-not-working-in-localhost-url/11610/9 "2020-02-10T11:18:06Z")

</div>

Run rasa run -m models --enable-api --cors “\*” --debug

Before opening the html file.

---

<div class="post-metadata">

**Author:** ![rasafan](https://avatars.discourse-cdn.com/v4/letter/r/b2d939/32.png) [@rasafan](https://forum.rasa.com/u/rasafan)\
**Post date:** [March 1, 2020, 4:29pm UTC](https://forum.rasa.com/t/rasa-bot-is-not-working-in-localhost-url/11610/10 "2020-03-01T16:29:46Z")

</div>

I’m running this command on my AWS EC2 instance:

```
docker run --user 1000 -v $(pwd)/models:/app/models rasa/rasa:latest-full run -m models --enable-api --cors “*” --debug

```

and still localhost:5005 is not displaying hello message from rasa.

I’ve followed this for initial setup: [Deploying your Rasa Assistant](https://rasa.com/docs/rasa/user-guide/how-to-deploy/?_ga=2.92865693.1427212933.1580669182-632081686.1580547923#running-the-rasa-server)

---

<div class="post-metadata">

**Author:** ![rasafan](https://avatars.discourse-cdn.com/v4/letter/r/b2d939/32.png) [@rasafan](https://forum.rasa.com/u/rasafan)\
**Post date:** [March 1, 2020, 5:46pm UTC](https://forum.rasa.com/t/rasa-bot-is-not-working-in-localhost-url/11610/11 "2020-03-01T17:46:46Z")

</div>

I’ve tried with docker-compose too but still nothing loads in my localhost:5005 (ERR\_CONNECTION\_REFUSED)

```
version: '3.0'
services:
  rasa:
    image: rasa/rasa:latest-full
    ports:
      - 5005:5005
    volumes:
      - ./:/app
    command:
      - run
      - -m
      - models
      - --enable-api
      - --cors
      - "*"
      - --endpoints
      - endpoints.yml

```

Also my container is allowing traffic on that port:

![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/2/204ef0282696ef07b3a81b8339502dce01c7fd9c.png)

There are my aws ec2 inbound rules:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/8/87ed31f5298e22da64280e4789d938c02f363d9e.png)

I’ve also checked VPC Network ACL which looks OK:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/5/5a44f0594d81777a8b70573bef4a1bae011b8729.png)

I’ve also tried disabling my firewall and it still doesn’t work, here is my console after docker-compose up:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/e/e2058963ded1e4e7803de85511a118016051a8ee.png)

Can you help @JiteshGaikwad?

EDIT: I’ve tried this from aws console and it works:

 ![worksFromAws](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/1/19ce48bc822fe95012db38a4155de99cc30da9a7.jpeg)

but this same command doesn’t work from my local console, why is that?

EDIT2: Solved by accesing through my instance public IP and port 5005

---

<div class="post-metadata">

**Author:** ![venkattejaRaavi](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/venkattejaraavi/32/10119_2.png) [@venkattejaRaavi](https://forum.rasa.com/u/venkattejaRaavi)\
**Post date:** [August 27, 2020, 7:36pm UTC](https://forum.rasa.com/t/rasa-bot-is-not-working-in-localhost-url/11610/12 "2020-08-27T19:36:38Z")

</div>

Replace the url [http://localhost:5005](http://localhost:5005) with \<Ec2 -publicIP\>:5005
