Here are the step by step instructions to set up Git deployment with GitLab using RunCloud:

  1. Create a project on GitLab. Give your project a name, choose the visibility level, and decide if you want to create a README file or not.
  1. After you have created the project, clone it to your local machine. You can use the command git clone followed by the URL of your project. You can find the clone URL in GitLab dashboard.
  1. You can clone your application using either HTTPS or SSH – just paste the appropriate URL in the command above.


    For example, git clone https://gitlab.com/tatticoder/my-runcloud-site.git.
  1. Open this cloned application in your favourite IDE such as VS Code or Jetbrains and make the required changes to your project files. For example, you can create an index file with some HTML code.

  2. Save and commit your changes using git add . and git commit -m "message". Then push your changes to GitLab using git push origin main.

  3. After this, we will create a new web application on RunCloud. Go to the Web Application tab and click on Create Web Application. Choose Git Repository as the source and select GitLab as the provider.

  4. Give your web application a name and select a user account on your server. You can also create a new user account for each web application for better security.
  1. Specify the domain name and SSL settings for your web application. You can use either a custom domain name or a subdomain provided by RunCloud. You can also enable SSL using Let’s Encrypt or a custom certificate.

  2. In the Git section, provide the GitLab username and repository name for your project. In the given example, the repository name is tatticoder/my-runcloud-site. You can also specify the branch name, which is main by default.
  1. Next, create a deployment key for your web application. If this is your first time using GitLab with RunCloud, you’ll need to generate a deployment key. Click on the Generate button next to it and wait a few seconds.
  1. Now go to your GitLab dashboard and navigate to Settings > Repository > Deploy Keys for your project. Click on Add Key, paste the key, and give it a title. This will allow RunCloud to access your GitLab repository.
  1. Go back to the RunCloud dashboard and click on Deploy Web Application. This will pull the latest changes from your GitLab repository and deploy them to your server.

  2. You can check the status of the deployment in the Deployment tab. Once the deployment is successful, you can access your web application from the URL that you specified earlier.

  3. After setting up the Git application, you’ll need to set up a web hooks URL to make sure that RunCloud is notified when you create a new version of your web application.

  4. Go to the Git tab of your web application in the RunCloud dashboard and copy the provided URL.
  1. Next, go to your GitLabs dashboard and navigate to Settings > Webhooks. On this page, create a new webhook and paste the provided URL. Make sure to select the “Push events” trigger so that RunCloud is notified about push events.
  1. Finally, go back to your IDE and make a small change to your website. Commit your changes, and push them. This will trigger a new Deployment in the RunCloud dashboard and you will be able to see your changes on the live site within a couple of minutes.