This guide will walk you through the process of deploying a new web application to your server using our automated Git Provider OAuth workflow, which is designed to make your development lifecycle significantly smoother and more efficient.

Prerequisites

Before creating a Git-backed web application, ensure that:

  1. You have a connected server running in your RunCloud dashboard (e.g., NGINX, OpenLiteSpeed, or a Containerized Setup).
  2. You have connected your Git provider account (GitHub, GitLab, or Bitbucket).

Step 1: Navigate to Web Application Creation

To start the deployment, log in to your RunCloud dashboard, navigate to the Servers section, and click on the server where you want to deploy your application. Once you are in your server dashboard, look for the Web Applications tab in the sidebar and click it; this will take you to your applications list, where you can click the blue Deploy New Web App button in the top right corner to start the setup.

Deploy web application on RunCloud

Step 2: Select Your Git Provider & Repository

On the next page, select the Git Repository tab to view options for your Git provider. Click on your selected Git provider, such as GitHub, GitLab, or Bitbucket, and you will then be prompted to select your Git account, repository, and the specific branch you wish to deploy.

Deploy a web application via Git on RunCloud

We highly recommend checking the “Automatically deploy when changes are pushed to this branch” box, as this will allow RunCloud to automatically trigger a new deployment every time you push updates to your code, keeping your live site perfectly synchronized with your repository.

Step 3: Configure Web Application Details

Scroll down to the configuration section to configure your application’s environment. You should start by entering a descriptive name for your application and selecting an appropriate system user to manage it. 

After that, you can enter your domain or subdomain details. If you are using Cloudflare as your DNS provider, RunCloud can automatically detect your domain and create the necessary A records, saving you the trouble of manually configuring DNS settings later.

If you don’t have a domain name, you can use RunCloud’s test domain for this step and configure your actual domain name later. 

Configure application name in RunCloud

Finally, select your preferred SSL method to secure your site, and choose the correct PHP version and public path for your project to ensure everything runs in the right environment.

Step 4: Deploy the Web Application

Once you have reviewed your settings, click the blue Deploy button located in the bottom-right corner. When you do this, RunCloud will automatically pull the latest version of your application from the git repository, provision your web application directory, set up your virtual host, generate a secure SSH key pair, and register a webhook on your repository, so you never have to manually copy and paste during setup.

Configure application stack in RunCloud

Verifying Deployment on Git Provider

If you want to confirm that everything is connected properly, you can visit your repository settings on your Git provider (GitHub, GitLab, or Bitbucket) and navigate to the Deploy Keys or Webhooks section. There, you will see that RunCloud has automatically added a read-only deployment key and registered a webhook URL.

View Deployment keys in GitHub dashboard

If you have any other questions or need help, please feel free to get in touch with our 24/7 support team. We’re here to help!