Deploy streamlit app in Ubuntu server with https (ssl) without using any tool like docker, nginx, etc

How to deploy streamlit in Ubuntu server with https (ssl) without using any tool like docker, nginx, etc?

I am new to this and not able to figure how to get the ssl done for the streamlit app as its shows not secure on the address bar. So is there any way to put the ssl cert, ssl key (cert.pem file) with the streamlit app script so that the ssl is achieved?

Hi @Zohaib, welcome to the Streamlit community!

What’s your use case for wanting to avoid using Apache/nginx or other tools? From a basic separation-of-concerns perspective, it doesn’t make a lot of sense for Streamlit to roll our own functionality like this since industry-standard webserver solutions already exist.


1 Like

Yes, agree on the available options but is there still a way to incorporate ssl into streamlit as those tools are restricted for usage?.

And even when the app is run with nohup the process gets automatically killed not sure why. Is there any better way to serve the app on production?


There isn’t as far as I know.

If your app is crashing, then the first thing to do is figure out why. Have you checked your logs to see if they are reporting anything?

How to configure ssl for the streamlit app through nginx?

Is there any sample nginx configuration file I can consume???..


Some users have been having success with the values in this thread:

As I am new to nginx I am not sure how to use it so it would be helpful if you could provide me a consumable ngix config file.


I mean to say a proper listed steps to be followed in order to achieve it.