How to Deploy Streamlit to a Server?
Tags: streamlit, machinelearning, ai, webdev
Published: 2021-03-11 23:59:23

---
canonical_url: https://www.21cloudbox.com/solutions/how-to-deploy-streamlit-project-in-production-server.html
---
# What is Streamlit?

Streamlit is the first development framework that was specifically designed for the application for machine learning and data science teams. It is the fastest way to develop custom machine learning tools. You can think that its goal is to replace Flask in machine learning projects. Streamlit can also help machine learning engineers quickly develop user interaction tools.

21YunBox provides a very simple Streamlit deployment method. You can quickly and easily deploy with 21YunBox in the **Python** environment.


# How to Deploy Streamlit in China?
1. Register as a [21YunBox member](https://www.21yunbox.com/u/signup/)
2. Fork [Streamlit](https://gitee.com/eryiyunbox-examples/hello-streamlit-sample2)
3. Create a **Cloud Service** on the 21YunBox and allow the 21YunBox to access your code base
4. Configure the following settings


**Environment**
```bash
PYTHON 3.7
```

**Build command**
```bash
pip3 install -r requirements.txt
```

**Start command**
```bash
sh setup.sh && streamlit run app.py
```

Note the configuration in [`setup.sh`](https://gitee.com/eryiyunbox-examples/hello-streamlit-sample2/blob/main/setup.sh) in the example,
Streamlit startup parameters.  If you have special needs, you can refer to the parameters provided in [Streamlit official documentation](https://docs.streamlit.io/en/stable/streamlit_configuration.html#set-configuration-options) to configure .

5\. Click "Create Now"

If the description of the above text is not clear, you can refer this step by step example video:
[How to deploy Streamlit to the server?](https://www.bilibili.com/video/BV1SK4y1j7V2)

# Why Choose 21YunBox?

> 21YunBox is a Cloud Service Platform based out of Beijing, China. Our services provides you with an easy and budget friendly, end-to-end web platform deployment service for all applications and stacks. No matter your need, we have a flexible solution to assist.
>
> If needed, we also offer [full support in obtaining your ICP license](https://launch-in-china.21yunbox.com/solutions/how-to-get-an-ICP-license-for-china.html) which allows you to legally host online content within Mainland China.


To learn about the differences between 21YunBox and these foreign (outside of China) cloud service platforms, please refer to:

* [21YunBox vs Heroku](https://launch-in-china.21yunbox.com/solutions/how-to-speed-up-heroku-in-china.html)
* [21YunBox vs Netlify](https://launch-in-china.21yunbox.com/blog/solutions/alternatives-to-netlify-in-china.html)
* [21YunBox vs Vercel](https://launch-in-china.21yunbox.com/solutions/how-to-speed-up-vercel-in-china.html)
* [21YunBox vs Gatsby Cloud](https://launch-in-china.21yunbox.com/solutions/how-to-speed-up-gatsby-cloud-in-china.html)
* [21YunBox vs Github Pages](https://launch-in-china.21yunbox.com/solutions/how-to-speed-up-github-pages-in-china.html)
* [21YunBox vs Surge.sh](https://launch-in-china.21yunbox.com/solutions/how-to-speed-up-surgesh-in-china.html)
* [Compare in terms of function and price: 21YunBox vs Heroku, Netlify, Vercel](https://www.21yunbox.com/compare-others/)


<br>
*This article's content originated [here](https://launch-in-china.21yunbox.com/solutions/how-to-deploy-streamlit-project-in-production-server.html)*

*For additional detail and future modifications, refer the original post.*