Run streamlit in https mode

Hi, I wish to start streamlit as https and not the default http. Is there a way to do so passing the cert file path. I guess tornado supports it. If its not possible at all then is there a way that I create streamlit app and start the app via tornado server manually such that I can configure tornado to do so.

2 Likes

Hi @Rakesh_Ranjan, welcome to the Streamlit community!

There isn’t a whole lot of information about deploying Streamlit with https (which we have an open ticket to make some better examples), but this thread seems to have a couple of options how to deploy using https. Let me know if this helps you solve your problem.

Best,
Randy

Hi, I was wondering if you found a solution to running it as https. I’m facing the same issue and was hoping for a quick and easy answer

Mayde it’s possible to overwrite the streamlit.server.server.start_listing function and add ssl_options as explained in this SO thread?

If you serve the streamlit app on your own server, perhaps it’s easier to use a reverse proxy like nginx or traefik. If you use a PaaS like digitalocean app platform https is usually provided for you.

yeah I’m currently just testing out some video streaming on my phone but the server is on my PC. I need a secure connection. Would using a reverse proxy give me https ?

also if I deploy the code would this solution still work?