Skip to main content

Self-Hosting GitLab

In this guide, we’ll go through a single-node setup of GiLab on AWS.

AWS Services Needed​

  • Virtual Private Cloud (VPC)
  • Elastic Cloud Compute (EC2)
  • Simple Storage Service (S3)
  • Redis Cache
  • Relational Database Service (RDS)
  • Elastic Load Balancer (ELB)
  • Route 53
  • Certificate Manager

‼️ make sure you have admin privileges for these services ‼️

Let's get started​

Follow this 👉 Guide and refer this doc for minor changes that have been used for out particular deployment.

Changes​

Bastion Host​

We do not need to create two bastion hosts for our purpose. Only one will suffice.

Install GitLab​

  1. During the EC2 instance creation, allocate 100 GB storage.
  2. Create a new security group gitlab-instance. Allow HTTP, HTTPS and SSH from the load balancer. Also allow SSH from the bastion host.

RDS Security Group​

Allow connections from gitlab-instance security group only.

Redis Security Group​

Allow connections from gitlab-instance security group only.

Gitaly Setup​

❌ Skip this step

Auto Scaling Setup​

❌ Skip this step

Gitlab Runner​

Deploy gitlab runner within the GitLab EC2 instance only.