Sharing streamlit app from my computer using Apache server


I want to showcase the app to my colleagues on the other side of the globe. I further want to see how it looks on mobile.

Hence, I wanted to see if I can kickstart a quick-and-dirty web server (say Apache).

In non-streamlit situation, I could have kept the index.html in the www folder and share with the world using http://<public IP>:8501, but, the same might not work here.

I don’t want to take the long route of docker > Kubernets > Cloud for this small test.

How could I do this?

Are you on a VPN @anix_anirban? If so, you could pass them your machine IP and port and that might work, since you’d all be on the same network. That wouldn’t even require using Apache.


No, I am not on VPN.

In fact, I am on the open internet and using my home computer. I have my public IP (v4 and v6) handy from I am on ubuntu 20.04 OS.

I am able to access the app through localhost:8501 as well as If not Apache, who facilitates this localhost? OS itself?

Any instruction will be helpful.

Thanks in advance!

@Marc, I saw you responding to web server-related questions. So, I thought of tagging you in this post. Apologies if it is not courteous.

Hi @anix_anirban,

If you just want a quick one-off solution go for ngrok,
The reason why its not working for your public ip is most probably because you have either not configured port forwarding on your router at all or its misconfigured.
Checkout this link for more info,

For setting it up with ngrok,

Just download it
extract it and from the same directory where its extracted do ngrok http 8501 ( or replace 8501 with the configured port )

You will see something like this,

You can share the http:// link next to Fowarding with your friend.

Hope it helps !

PS. https didnt work for me for some reason as wss connection was breaking from streamlit frontend.