How to Deploy Gatsby.js in China
Tags: gatsby, china, webdev, staticsite
Published: 2021-02-08 03:44:34

---
canonical_url: https://www.21cloudbox.com/solutions/how-to-deploy-gatsby-project-in-production-server.html
---
# How to Deploy Gatsby in China

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/spbxj8o6ch4duox7jcmn.png)

In this articles we discuss the options, best methods, and steps of deploying Gatsby in China while maintaining its world-class performance.

## Why Gatsby?

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/9tu2ixww84ad3hlpu83t.png)

Gatsby builds the fastest websites in the world.  Their modern website framework implements  performance and blazing fast speeds into your websites. 

## How to Improve Gatsby's Performance in China


![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/hhh4hn7bjb84ddt4omnf.png)
 
Deploying your Gatsby code in China without the proper hosting service is like driving your Tesla Model X on muddy roads, doable but about [5-8x times slower](https://launch-in-china.21yunbox.com/solutions/how-to-speed-up-gatsby-cloud-in-china.html).  The slow performance is a result of foreign hosting services having to deal with the Great Firewall and foreign DNS.

There are a few static website hosting options within China, such as AWS S3 China Region or Ali Cloud OSS.  In addition to the infamous slow customer service by these larger companies, they also do not offer the same level of “build and deploy” services such as [Netlify](https://launch-in-china.21yunbox.com/blog/solutions/alternatives-to-netlify-in-china.html) or [Heroku](https://launch-in-china.21yunbox.com/solutions/how-to-speed-up-heroku-in-china.html).

21YunBox was design to provide your DevOps teams solution to get the maximum performance out of your Gatsby framework.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/xnypyhha6lifoujjns4n.png)

## 21YunBox's Simple Steps to Deploy Gatsby in China

1.	[Sign Up](https://www.21yunbox.com/u/signup/) with 21Yunbox
2.	Fork Gatsby [Example](https://gitee.com/eryiyunbox-examples/gatsby)
3.	Use the following to configure.

Surroundings	Static Pages
Build command	yarn && yarn build
Publish catalog	./public


|   Surroundings  |     Static Page    |
|:----------------|:------------------:|
| Build Command   | yarn && yarn build |
| Publish catalog | ./public           |

Below is a video if you would like to watch along with a deployment example.

<https://www.youtube.com/embed/GDsnAdAMrzg>

## Why Choose 21YunBox

Described as the [Netlify of China](https://launch-in-china.21yunbox.com/blog/solutions/alternatives-to-netlify-in-china.html), 21YunBox is based out of Beijing.  Our solutions enable your team to be more effective in reaching the 1.3 billion people within The Great Chinese Firewall by hosting your sites at blazing speeds without having to deal with servers.  

Not fluent in Chinese?  No worries, 21Yunbox’s support team is hand chosen to offer you a top-notch [English support](https://launch-in-china.21yunbox.com/) experience.

If you still need your [ICP license](https://en.wikipedia.org/wiki/ICP_license) and don't want your site shut down? 21YunBox can help you out with full support in getting your required ICP license to run your site legally in China. 


## How to get started with 21YunBox

21YunBox is offering a [7-day Free Trial](https://www.21yunbox.com/u/signup) to let you test and deploy Gatsby in China.

<br>
*This content originated [here](https://launch-in-china.21yunbox.com/blog/solutions/deploy-gatsby-in-china.html).*

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