# Start Rasa Server in a flask API

**URL:** <https://forum.rasa.com/t/start-rasa-server-in-a-flask-api/14129>\
**Category:** Rasa Open Source\
**Created:** [August 9, 2019, 9:18am UTC](https://forum.rasa.com/t/start-rasa-server-in-a-flask-api/14129 "2019-08-09T09:18:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lindamthomas07](https://avatars.discourse-cdn.com/v4/letter/l/7feea3/32.png) [@lindamthomas07](https://forum.rasa.com/u/lindamthomas07)\
**Post date:** [August 9, 2019, 9:18am UTC](https://forum.rasa.com/t/start-rasa-server-in-a-flask-api/14129/1 "2019-08-09T09:18:56Z")

</div>

**rasa.run()** starts the sanic server and exposes multiple APIs to be accessed. For example: webhook/rest/webhook for Chat API.

I read in Rasa documentation that

> We recommend to not expose the Rasa Server to the outside world, but rather connect to it from your backend over a private connection (e.g. between docker containers).

Is it possible to wrap the Sanic server API within another API without starting multiple servers? Since its a chat conversation, having multiple API calls can delay the response time.

Appreciate any thoughts on this!!

---

<div class="post-metadata">

**Author:** ![MetcalfeTom](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/metcalfetom/32/1422_2.png) [@MetcalfeTom](https://forum.rasa.com/u/MetcalfeTom)\
**Post date:** [August 9, 2019, 9:44pm UTC](https://forum.rasa.com/t/start-rasa-server-in-a-flask-api/14129/2 "2019-08-09T21:44:14Z")

</div>

Hi @lindamthomas07,

What do you want to do with this wrapper? `rasa run` only exposes the [channels you specify with `--credentials`](https://rasa.com/docs/rasa/user-guide/messaging-and-voice-channels/) (or the rest api without this flag)

---

<div class="post-metadata">

**Author:** ![lindamthomas07](https://avatars.discourse-cdn.com/v4/letter/l/7feea3/32.png) [@lindamthomas07](https://forum.rasa.com/u/lindamthomas07)\
**Post date:** [August 16, 2019, 6:49am UTC](https://forum.rasa.com/t/start-rasa-server-in-a-flask-api/14129/3 "2019-08-16T06:49:16Z")

</div>

yes! it starts the server in a default url [http://localhost:5005/webhook/rest/webhook](http://localhost:5005/webhook/rest/webhook). Same is being used by chat server. Is there any way we could wrap in a different url to prevent the default url getting exposed in chat server.
