Deploying to Alibaba Cloud

Alternative Deployment for Chinese Users

TinaCMS primarily implements automatic content repository updates through GitHub and static hosting platform integration, but static hosting platforms like Vercel, Netlify, and GitHub Pages are not accessible in mainland China and lack direct Chinese alternatives.

Chinese users can choose to deploy their projects to Alibaba Cloud servers combined with GitHub Actions as an alternative solution.

Here is the accessibility status of TinaCMS-related services in mainland China without VPN:

  • npx create-tina-app@latest command: ✅ Works
  • TinaCloud: ✅ Accessible
  • Tina.io: ✅ Accessible
  • GitHub: ⚠️ Accessible but slow
  • Vercel: ❌ Not accessible
The above test results are current as of July 10, 2025, and accessibility status may change over time

Given these limitations, this guide will walk you through deploying your TinaCMS project to Alibaba Cloud. As the leading cloud service provider in China, Alibaba Cloud offers reliable performance for Chinese users. While no Chinese cloud service currently provides the same seamless GitHub integration as Vercel, Alibaba Cloud remains the go-to option for developers who want to deploy their websites within mainland China.

Alibaba Cloud Configuration

Alibaba Cloud offers a wide range of server options. We generally recommend using Elastic Compute Service (ECS) for TinaCMS project deployment. For detailed instructions on creating and configuring your server, please refer to the Official Alibaba Cloud Documentation.

Server Setup

After creating your ECS instance, you'll need to set up the necessary software for manage your TinaCMS project.

Install PM2 for Process Management

PM2 is a process manager for Node.js applications that helps keep your application running in production.

Install and Configure Nginx

Nginx will serve as a reverse proxy for your TinaCMS application.

Next, start Nginx and enable it to run on system boot:

Configure Nginx as a Reverse Proxy

Create a configuration file for your TinaCMS site:

Add the following configuration:

Test your Nginx configuration for syntax errors:

Reload Nginx to apply the new configuration:

Preparing for GitHub Actions Deployment

Create Deployment Directory

First, create a directory on your server where your TinaCMS project will be deployed:

Create a TinaCMS Project

Use the template to create a basic TinaCMS project.

Generate SSH Keys for GitHub Actions

Generate an SSH key pair on your Alibaba Cloud server:

Add Public Key to Authorized Keys

Add the generated public key to the authorized_keys file to allow GitHub Actions to authenticate:

Configuring GitHub Secrets

After generating your SSH key, you'll need to add several secrets to your GitHub repository to enable secure deployment.

  1. GitHub repository → Settings
  2. Secrets and variables → Actions
  3. Click "New repository secret"

Required GitHub Secrets

You'll need to configure the following secrets:

  1. SSH_PRIVATE_KEY : The private key generated on your server
    • View it using: cat ~/.ssh/id_ed25519
    • Make sure to include the entire key, including the -----BEGIN OPENSSH PRIVATE KEY---- and -----END OPENSSH PRIVATE KEY-----
  2. SERVER_HOST: Your Alibaba Cloud server's IP address
    • This is the public IP address of your ECS instance
  3. SERVER_USERNAME: The username for connecting to your server
    • Typically root or the user account you created on your ECS instance
  4. NEXT_PUBLIC_TINA_BRANCH: The branch that TinaCMS should use for content
    • Usually your main branch (e.g., main or master)
  5. NEXT_PUBLIC_TINA_CLIENT_ID: Your TinaCloud client ID
    • Find this in your TinaCloud dashboard under project settings
  6. TINA_TOKEN: Your TinaCloud token for authentication
    • Generate this from your TinaCloud dashboard under API Access

Creating GitHub Actions Workflow

Create a new file in your repository at .github/workflows/deploy.yml with the following content:

Configuring a Custom Domain

To use a custom domain with your TinaCMS project in China:

Domain Setup

  1. Purchase a domain from a Chinese provider (e.g. Alibaba Cloud, Tencent Cloud)
  2. Add an A record pointing to your Alibaba Cloud server's IP address
  3. Update your Nginx configuration:

ICP Filing

Remember that websites hosted in mainland China require ICP filing. Start this process through your domain provider or Alibaba Cloud.

Conclusion

With the Alibaba Cloud and GitHub Actions configuration above, Chinese users can now use all TinaCMS features normally from mainland China. This setup maintains the same automatic content synchronization as Vercel, with no functional differences.

Last Edited: July 11, 2025