Streamlit authentication

I am experimenting with the GUI and enjoying customizing it. However, I don’t want the streamlit server to be exposed over the local network so anyone with my IP and port can get into the Mosaiq DB. Is there somewhere we I can insert authentication into streamlit? I’m sorry I am pretty new to using it.

Hi @chackoms,

Welcome to the PyMedPhys community :slight_smile:. Streamlit has a global config you can utilise to make is so that the server is only hosted on localhost, and therefore not broadcast on your LAN:

The config you need to add is:

address = localhost

If instead you want authentication, streamlit can be combined with something like oauth2-proxy and nginx to enforce google account login, or similar. However, I suspect the above option will be far simpler.