Black Lives Matter. Please consider donating to Black Girls Code today.

Deploy a Dash application


I am about to deploy my application on a server, just wondering how do I configure my app, like ip address, port and something like that.


I’d suggest you start here:

Dash app has a flask app at its core. Go with Heroku or Elastic Beanstalk, follow a tutorial how to install a simple Flask app there, and then try with your dash app.
Or contact Plotly - surely they would be glad to help you, for a fee - this is the commercial reason why they built Dash in the first place (besides desire to improve the whole python data ecosystem).

1 Like

If you are on Digital Ocean or any other server, try this tutorial on how to serve a flask app

1 Like

Also, see the official dash deployment guide:

1 Like

Hello even I’m about to start my first application using Dash… I have read the documentation for running it on local machine…but couldnt get anything.

I have written my code in jupyter notebook. This is my code which is taken from Dash’s github account. I want to test run it…but I’m unsuccessful.

import dash
import dash_core_components as dcc
import dash_html_components as html
import plotly.graph_objs as go
import pandas as pd

df = pd.read_csv(

app = dash.Dash()

app.layout = html.Div([
dcc.Graph(id=‘graph-with-slider’, animate=True),
marks={str(year): str(year) for year in df[‘year’].unique()}

dash.dependencies.Output(‘graph-with-slider’, ‘figure’),
[dash.dependencies.Input(‘year-slider’, ‘value’)])
def update_figure(selected_year):
filtered_df = df[df.year == selected_year]
traces = []
for i in filtered_df.continent.unique():
df_by_continent = filtered_df[filtered_df[‘continent’] == i]
‘size’: 15,
‘line’: {‘width’: 0.5, ‘color’: ‘white’}

return {
    'data': traces,
    'layout': go.Layout(
        xaxis={'type': 'log', 'title': 'GDP Per Capita'},
        yaxis={'title': 'Life Expectancy', 'range': [20, 90]},
        margin={'l': 40, 'b': 40, 't': 10, 'r': 10},
        legend={'x': 0, 'y': 1},

if name == ‘main’:

what changes should I make to this to run it on local server?

@tejas - you can save that file as e.g. and then run the file with python

Could you create a new thread for the issues that you’re having running Dash? Also, please see

I did it Chris…but i couldn’t open it in a browser window. A box appears
asking to open or save file and when I click open, nothing happens

@tejas - Could you please create a new Topic on this forum with this issue and a screenshot of the problem? You can click on the “+ New Topic” button here:

I was using ubuntu on digital ocean and this guide for flask+gunicorn was great!.
The guide from digital ocean is ok, but it’s a little old

1 Like