How to deploy Dash app on local network?

My dash app runs great on my local machine.
I am trying to deploy it on a local network with no internet access for a small number of users less than 5.

Not very familiar with flask, but browsing through the flask documentation:

If you have the debugger disabled or trust the users on your network, you can make the server publicly available simply by adding --host=0.0.0.0 to the command line:

flask run --host=0.0.0.0

So my thinking is adding the above flask run option to the run server function of Dash below. Is there a way to do that? Am I on the right track here? or should i go another path like Gunicorn and nginx here

def run_server(self,
port=8050,
debug=True,
threaded=True,
**flask_run_options):
self.server.run(port=port, debug=debug, **flask_run_options)

Yep, you can definitely pass the ‘host’ keyword argument into app.run_server() (where app is a Dash instance) since, as you can see from the snippet you posted, it just passes on any additional keyword arguments to the Flask app’s run method.

2 Likes

Thanks for the input @nedned.
This worked for me.

if name == ‘main’:
app.run_server(debug=‘False’,port=8080,host=‘0.0.0.0’)

5 Likes

I assume then that the other machines accessed you dashboard by going to this address (0.0.0.0:8080)?
Or is there any other way?
Thanks in advance

i think they access going to the address (“yourIP”:8080) ?

2 Likes

0.0.0.0 isn’t an actual ip address, it means all of the ip addresses associated with the local machine. So it will be available through the host’s ip address of the machine on the network.