Fixing Port number


I’m trying to fix the port number for my streamlit app, so I can share it with my team once instead of having to resend a new link every time I rerun the app.
I fixed the port number with streamlit run --server.port=80 when running the file.

However, when I try to rerun streamlit run --server.port=80 I get “port is reserved”. Running streamlit run only assigns a new port number to the app.

Is there a way to rerun the app (so the data is up to date) to the same port number (80)?

Many thanks!

You may have something else running on that port, or the Streamlit process hadn’t shut down correctly prior to the rerun. You can fix the port number in the app’s ./streamlit/config.toml file.


If your objective is to ensure the app’s data is up-to-date, then you can simply re-fetch the data whenever you’re using it - if the data set size is small - or use the ttl parameter of st.cache on your data getter function.

1 Like