Dash Deployment in local network

Hi, I’ve read many threads about this topic, but couldn’t find one that address the issue in a simple manner.

I want to deploy a dash application to a windows server in local network. My app connects to an oracle database server in local network, so using Render, Heroku is not an option.

Some threads suggested using docker or waitress, but I couldn’t follow the instructions. Can anyone offer instructions or suggest a book, blog, video?

Hello @pedromsouza,

For deploying on a windows machine:


Flask is Dash’s default backend, to run this, you need to:

  • expose the flask server in the app: server = app.server after app = Dash(__name__)
  • run waitress via waitress-serve --host app:server ← where app is the name of your app.py

With the above settings, you will be catering responses with your ip to your local network on the port 8000 unless you pass something different.

1 Like

Thanks @jinnyzor ! Do I need to put the whole app inside a function (like “create_app()”) and then create another py file to import the app.py and use waitress-server app:server? If yes, how do I set return inside the “create_app()” function?

Nope, it is as simple as the above, plus some of the instructions for downloading waitress and using a venv. :slight_smile:

1 Like