How do I deploy my RASA chat bot to the web using Flask?

I want to deploy my rasa chatbot on web using flask without using any third party as chatfuel or chatterbot?

Kubernetes? Docker?

No I am not using Docker because of some firewall issues

Do you have a VM? You can simply deploy a python server( install python on your server and pip for downloading the package.)

Run your makefile first that installs all dependencies then

write a shell script that execute the python run command of rasa which spins up the flask server. put it in the service registry that spins up on startup. you can run the script silently as well.

Make sure your ports are open(5005) and you can then connect to the API.

1 Like

what you mean by that? Is it possible to use any VM or a azure server to install your bot together with the webchat like on a desktop machine? So installing python and rasa etc.?

yeah. Make sure it has enough memory to run your NLU models. you need to make sure you have some shell scripts that starts the server and ports are opened.

you can deploy rasa on any VM with a public IP

Why do I need that?

Could you write a shell script to start the bot plus the webchat gui together within a single script? That would be nice. until now I use scalableminds gui with yarn serve. So you need two consols for each. Might be difficult for external non expert users.

I am looking for something along the lines of chatterbot.

To run ChatterBot inside of a web application you just need a way for your application to receive incoming data and to return data. You can do this any way you want, HTTP requests, web sockets, etc.

1 Like

@datistiquo yes, you can write a shell script that runs multiple commands.

@ashukrishna100 - you can run the chatbot as an API

there is a rest channel for that. you just need to run this stack with the command to start up the rasa server

Can you please write the steps so that I can run my RASA chatbot on scalablemind GUI. I have standalone chatbot system on localhost:5055. I tried writing hotchannelinput code but it spins the RASA server. For ui components,I need CSS,is and html files. Is there anyway to directly use the UI component?

Hi @souvikg10 , @ashukrishna100, @datistiquo
I am using rasa webchat , not I want to upload a document via the bot and store it in the folder I am not sure how to do that , can u please guide me with some steps or an example

Can anyone share all prerequisites for connecting RASA with the Flask application. Take me as a complete beginner.

1 Like

Hi @Nehasingh1300, why does it need to be Flask?

generally you can run a rasa server which uses Sanic as an application server framework, and exposes REST endpoints.

I have been given some tasks, so that’s why I am considering Flask, It will be great if you can share some documents that can help me for building it with flask to else I will check for Sanic.


typically running it with Flask would mean that you will need to import rasa as a python library and run inference using the python API.

You can see here on how to use rasa as a python library and expose the results as a flask API.

for performance purposes, i would consider asyncio framework, which is used in Sanic, i think maybe also Fast API.

1 Like

Thanks for the update. I will see if it works for me.