Using Git repositories vs CLI deployment in Strapi Cloud

Last updated: November 13, 2026

Important

The Strapi Cloud CLI is recommended for testing purposes only. For production environments, deploy your project from a Git repository (GitHub or GitLab).

While the Strapi Cloud CLI is an excellent tool for quickly launching and testing projects without a Git repository, it's not suitable for long-term use. Production-grade projects should connect to a Git repository to ensure robust source control and collaboration.

Deploying from a Git repository provides these advantages:

  • Maintains proper source control for managing project changes

  • Enables adding collaborators to your repository

  • Supports automated deployments triggered by commits to your selected branch

How to connect your project to a Git repository

Caution

Only the project owner can connect a Git repository. If someone else should own the project, the owner can first transfer ownership to an existing maintainer. See 📄 Can I transfer my Strapi Cloud project to another user?.

Follow these steps to connect your CLI-deployed project to a Git repository:

  1. Upload your project code to a GitHub or GitLab repository

  2. Log in to the Strapi Cloud dashboard

    • Note: The project owner must perform this step

  3. Navigate to project settings

    1. Select the Settings section

    2. Find "Connected git repository" under the General category

  1. Connect your repository

    1. Click Connect a repository

    2. Choose your Git provider (GitHub or GitLab)

    3. Authenticate if prompted

  2. Configure deployment settings

    1. Select your repository and branch

    2. Specify any additional options, such as project subdirectory location

After connecting your repository, Strapi Cloud will use it as the project's source of truth. New deployments will trigger automatically when you commit to the configured branch.