Production grade deployment on Windows Server

Hello..

I have been looking for a way to deploy Streamlit in production with Windows Server, some of them recommended using NSSM, but the project is no longer maintained.
Is there any resource I could read as to what is the best way to deploy Streamlit app in production with 50-100 user concurrency?
Thank you!

Welcome to the Streamlit community and thanks for your thoughtful question! :blush: Deploying Streamlit on Windows Server is definitely possible, and many users have used NSSM (the Non-Sucking Service Manager) to run Streamlit as a Windows service for production use. While NSSM is no longer maintained, it still works for many, but alternatives like Windows Task Scheduler or other service wrappers can also be used. For 50–100 concurrent users, the main considerations are server resources (CPU/RAM), network/firewall configuration, and ensuring Streamlit is run in headless mode with proper dependency management.

For step-by-step guidance, check out this community deployment guide and the official deployment tutorials. Key tips include: (1) run your app with streamlit run app.py in a virtual environment, (2) use a service manager (NSSM, Task Scheduler, or similar) to keep the app running, (3) open the necessary ports in Windows Firewall, and (4) monitor resource usage to ensure your server can handle the expected load. Streamlit is multi-threaded and can handle many users if the server is sized appropriately, but always test under load to confirm performance. For more on scaling and production best practices, see this discussion.

Sources:

Hi there! Similar requirements, multiple apps (5 and growing) with some 30 users each, and we serve using a combination of Windows Task Scheduler to run the scripts and IIS for the reverse proxy, user management, load balancing (not currently needed), etc. It looks clunky and disconnected, but works and is straightforward to understand and troubleshoot. Regards.

I I have done a very successful deployment to Windows server 2022 using NGINX. You should definitely try it out. It even manages load balancing for you and if required SSL can also be implemented. There is also capabilities for an Access a control list. I highly recommend this solution. Good luck!

Hello..
Thank you for your comment, really appreciated that!

That was I implemented initially.
But, upon googling I just heard the that launching it as a service making it more stable and more robust, so I found WinSW to make the apps as a service + IIS for the reverse proxy. I think it is just enough for internal apps using Task Scheduler but, just in case I updated the method.

I am not sure if there is any better approach, though. Really interested to hearing about it.

Hello..
Really appreciated your comment and thank you for sharing.
Yeah, I need SSL too!
Currently I am using IIS as server proxy, dont know yet if I could implement the SSL with it.

May I ask how you running the apps?
Using Task Scheduler, WinSW to make it as a service, or others?
Thanks!

Using OpenRun https://openrun.dev/ is an option if you are fine with running WSL and Docker. See windows installation docs. OpenRun will handle the TLS certs, zero downtime GitOps based app updates and also add OIDC/SAML based auth for the app if required.

After starting the OpenRun server, run

openrun apply --approve github.com/openrundev/openrun/examples/streamlit.star

to install sample Streamlit apps