Simplest way to deploy a streamlit app in Windows server 2012

Here is the way I deploy the website in the company network using the windows server 2012. It spends me a few days to figure out how to use that. It is quite easy to use the Windows IIS server to deploy the website. However, it is really hard to find a step by step way online for the windows server deployment. Hope it helpful for the people who also want to use the windows server 2012 to deploy the streamlit.

  1. First of all, create a virtual env and make sure your stream app can be run in the virtual env without issue.
  2. Second, open the Server Manager in the window server 2012, under the manage, click the Add Roles and Features
  3. Third, Make sure that you click Web Server (IIS), under the Application Development, make sure you click the CGI
  4. Next, Open Internet Information Server and create a new site. You need to include root app files into the new site. For my case, I call it testops
  5. Finally, click the Add Script Map… and fille the request path as *.py so that it will recognize your stream app script and select where your install the stream virtual. For the name, you can type whatever you like to call it.

Open a web browser and use the IP address that streamlit provides for the network URL use.

2 Likes