Simplest way to deploy a streamlit app in Windows server 2012

How can an Streamlit app be deployed in windows server to share it with other users?
Can we deploy Streamlit app using a windows service?

I also want to publish the app to my windows2012 server.
Because our data is internal confidential data of the enterprise, it cannot be published to internet web service providers. But we have our own internal server, what kind of environment the server needs to be configured to run this.

Hi @abhunia and hi @hillstone, thanks for posting. You can definitely host on a Windows machine and it is totally up to you which technology stack you want to use to expose the internal IP to your organization or to the internet. As for running, we recommend this flow.

Matteo

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.

1 Like

hi ethan.qiujian, thanks for the instruction. i followed your steps carefully but it looks like your solution does not work for me. is there something missing?

my application runs with powershell streamlit run app.py --server.port=8501 in the webbrowser. but i am not able to see any streamlit app when i use your Windows Server Manager “handler mapping and add script map method” unfortunately.

do you have any updates or problems you had to deal with?

Hi guys,

I am also curious to find a tutorial which explains how to deploy streamlit apps on IIS. Has anyone had success with this issue?

Thanks.

1 Like