Dash on EC2(Ubuntu 18.04 Server)

Hi All,

I am unable to open the Dash on Chrome Browser. I have Dash installed on EC2 instance and set up port 80 to accept inbound requests. Did anyone face this issue before? Appreciate your help in resolving this.

Here is my code:

import dash

import dash_html_components as html
import dash_core_components as dcc
import pandas as pd
import numpy as np

from dash.dependencies import Input, Output
from plotly import graph_objs as go
from plotly.graph_objs import *
from datetime import datetime as dt



#create a dataframe for csv file

df1 = pd.read_csv(’/tmp/plot_tree.csv’)

#layout of the app


if name==“main”:
app.run_server(debug=True, port = 8050, host=“”)

When I execute this code, the server is running.

[5 rows x 7 columns]

Running on

Debugger PIN: 125-894-661

But, Browser is like this:

This site can’t be reached refused to connect.


ERR_CONNECTION_REFUSED is only if Dash is running on your local computer. If everything is installed correctly, you’ll need to use the IP address of the EC2 server. For example:

1 Like

Hi There…I am hosting on EC2 Ubuntu server. Of course the local host IP will not work, so I have replaced it wit the public IP of the EC2 instance. Yet when I put that in the browser address, I do not see the Dash page.

My security group is open to allow all traffic.

Does any other setting need to be changed for this to work?

Thanks in advance,

Hmmm, that should work then. Not that I’m aware of.

I’m noting that you mentioned opening port 80 on the EC2 but the example Dash app is running on port 8050. Is this a typo? Have you tried changing the app to use port=80or also unblocking port 8050?

Did you check whether the app is running on localhost before you deploy it on EC2 instance?