How to Make Gatsby Cloud’s Work in China?
Tags: gatsby, gatsbycloud, china, webdev
Published: 2021-02-24 23:16:15

---
canonical_url: https://www.21cloudbox.com/solutions/how-to-speed-up-gatsby-cloud-in-china.html
---
# What is Gatsby Cloud?
Gatsby Cloud is a hosted cloud service provided by [Gatsby](https://launch-in-china.21yunbox.com/blog/solutions/deploy-gatsby-in-china.html) for the GatsbyJS project. It supports Git Push automatic deployment.  Frontend developers love GatsbyJS due to the the in depth integration of major Headless CMSs like [Contentful](https://launch-in-china.21yunbox.com/solutions/contentful-alternatives-in-china.html), Cosmic, Dato CMS and extremely fast speed.

## Comparison Chart Before and After Speed Increase

Below is the speed test results of a site deployed with Gatsby Cloud in China.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c2f6gb959ypl6fe2ycx8.png)

Below is the Speed test results of a site deployed with 21YunBox in China.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2dayscvxgjo5bkr3zasa.png)

The color represents the feedback time of the website. Green represents faster, while red means extremely slow or even inaccessible.

As you can tell, the access speed of the website deployed on Gatsby Cloud in China is very unsatisfactory and most areas are very slow (orange).

After speeding up with 21YunBox, the result has reached a usable level.

## Source Code of the Test Project

We chose a [Gatsby Starter](https://gitee.com/eryiyunbox-examples/gatsby) as the test object. The default template was used, and no additional changes were made.


## How to Improve Gatsby Cloud's Access Speed in China?

If you build (package) the Gatsby project locally within China, you can store the packaged static web page domestic native cloud service provider, such as AWS China S3 or Alibaba Cloud’s OSS. This will ensure a good speed for your site.

The disadvantages of deploying on the native cloud are very obvious: there are more initial configurations, if you want to make continuous deployment (Git push automatic packaging and deployment), you need more configuration.

If you want a hassle free and simple solution like Gatsby Cloud in China, you can host your Gatsby project with **21YunBox**.

### Process of Hosting Gatsby Project in 21YunBox

#### 1. Register as a [21YunBox member](https://www.21yunbox.com/u/signup/)

#### 2. Authorize 21YunBox to access the code repository you want to deploy:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h41lpqqfrht42o0ixt4g.png)*Sample Image: Select the code repository to be deployed in 21YunBox*

#### 3. Configure Build (Package) Command and Release Directory
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h41lpqqfrht42o0ixt4g.png) *Sample Image: Configure Gatsby build (package) commands and release directory*

#### 4. Click "Deploy Now"
In seconds, your site is packaged and deployed online.

You can access your project at `app_id.21yunbox.com` (`app_id` is created and defined).

#### For a step by step set-up process, please watch the example video below:

How to deploy Gatsby to a server? [Example video](https://www.bilibili.com/video/BV1SD4y1X7US)

# What else can 21YunBox Deploy?
Like a back-end application framework [Python Django](https://launch-in-china.21yunbox.com/solutions/how-to-deploy-django-project-in-production-server.html) or [PHP Laravel](https://launch-in-china.21yunbox.com/solutions/how-to-deploy-laravel-project-in-production-server.html) This is notoriously complicated to deploy. The 21YunBox also allows you to complete the package and go online to generate a unique second-level domain name in 3 or 4 minutes.

What about deploying a database in China? Yes, we can also simplify this process for you with a one-click to build database solution.  Check out these [PostgreSQL](https://launch-in-china.21yunbox.com/solutions/how-to-create-a-postgresql-database.html) or [MySQL](https://launch-in-china.21yunbox.com/solutions/how-to-create-a-mysql-database.html) examples (with videos). 

What else? Want to know more? You can check [Help Document](https://www.21yunbox.com/docs/#/)

<br>
<br>
## Why Choose 21YunBox?

> 21YunBox is a Cloud Service platform based out of Beijing. Our services [enable your team](https://launch-in-china.21yunbox.com/customers/how-21yunbox-help-ethereum-launch-in-china.html) to be more effective in leveraging the growing opportunity within China by hosting your sites at blazing speeds with an operational and maintenance free solution. 
>
> We offer an easy and budget friendly, end-to-end web platform deployment service for all applications from small teams to large enterprises.
>
> Need assistance it [obtaining your ICP](https://launch-in-china.21yunbox.com/solutions/how-to-get-an-ICP-license-for-china.html)?  Let us know, we are happy to assist you in the process.


To learn about the differences between 21YunBox and these foreign (outside of China) cloud service platforms? You can 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-speed-up-gatsby-cloud-in-china.html)*

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