By default, Dash apps run on
localhost - you can only access them on your
own machine. To share a Dash app, you need to “deploy” your Dash app to a
server and open up the server’s firewall to the public or to a restricted
set of IP addresses.
Dash uses Flask under the hood. This makes deployment easy: you can deploy
a Dash app just like you would deploy a Flask app.
Almost every cloud server provider has a guide for deploying
Flask apps. For more, see the official Flask Guide to Deployment
or view the tutorial on deploying to Heroku below.
is Plotly’s commercial product for deploying
Dash Apps on your company’s servers or on AWS, Google Cloud, or Azure.
It offers an enterprise-wide Dash App Portal,
easy git-based deployment, automatic URL namespacing,
built-in SSL support, LDAP authentication, and more.
Learn more about Dash Enterprise or
get in touch to start a trial.
For existing customers, see the Dash Enterprise Documentation.
Dash apps are web applications. Dash uses Flask as the web framework.
The underlying Flask app is available at
app.server, that is:
You can also pass your own flask app instance into Dash:
By exposing this
server variable, you can deploy Dash apps like you would
any Flask app. For more, see the official Flask Guide to Deployment.
While lightweight and easy to use, Flask’s built-in server is not suitable
for production as it doesn’t scale well and by default serves only one
request at a time
Heroku is one of the easiest platforms for deploying and managing public Flask
Here is a simple example. This example requires a Heroku account,
Step 1. Create a new folder for your project:
Step 2. Initialize the folder with
git and a
virtualenv creates a fresh Python instance. You will need to reinstall your
app’s dependencies with this virtualenv:
You will also need a new dependency,
gunicorn, for deploying the app:
Step 3. Initialize the folder with a sample app (
requirements.txt, and a
Procfile for deployment
Create the following files in your project folder:
app refers to the filename
server refers to the variable
server inside that file).
requirements.txt describes your Python dependencies.
You can fill this file in automatically with:
4. Initialize Heroku, add files to Git, and deploy
You should be able to view your app at
my-dash-app to the name of your app).
5. Update the code and redeploy
When you modify
app.py with your own code, you will need to add the changes
to git and push those changes to heroku.