Streamlit application external url is not accessible.

Sumeet Patel 0 Reputation points

Hello support team,

I have followed this page.

I have created Azure machine learning model and dumped data to neo4j database.
however when I run the below command from the location ~/cloudfiles/code/Users/sumeet/neo4j-generative-ai-azure/ui/streamlit

streamlit run

It showed me this output

Collecting usage statistics. To deactivate, set browser.gatherUsageStats to False.

  You can now view your Streamlit app in your browser.

  Network URL:
  External URL:

But when I open [] in my browser is not working.

Does anybody have any idea?


Not Monitored
Not Monitored
Tag not monitored by Microsoft.
30,326 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Amira Bedhiafi 4,476 Reputation points

    Step 1 : Azure VMs have Network Security Group rules which determine which traffic can reach the VM. By default, only a few ports like 22 (for SSH) are open.

    • You need to create an inbound rule to allow traffic on port 8501.
    • Go to Azure Portal → Your VM → Networking → Add inbound port rule.
    • Source: Any, Source port ranges: *, Destination: Any, Destination port ranges: 8501, Protocol: Any, Action: Allow, Priority: <Choose a unique number between 100 and 4096>, Name: Streamlit8501

    Step 2 :

    • If you are using an Ubuntu machine for example, you can check using ufw:
     sudo ufw status
    • If 8501 isn't in the list of allowed ports, you can allow it using:
     sudo ufw allow 8501

    Step 3 : By default, Streamlit only listens on the local network interface (localhost). If you want it to be accessible from the internet, you may need to bind it to which means it will listen on all network interfaces. Start your Streamlit app like this:

       streamlit run --server.address

    Exposing your app to the public internet by binding to is risky if you don't have proper security measures in place.

    Step 4 : Ensure there aren't any errors in your script that might be causing the app to fail. Check the terminal where you ran the streamlit run command for any errors.

    Ensure that all the necessary dependencies and packages are installed and accessible.

    Step 5 : Perhaps port 8501 is being used by another service. Try running Streamlit on a different port:

    (If it works, don't forget to update the NSG rule in Azure to allow traffic on the new port.)

    streamlit run --server.port 8502
    0 comments No comments