A Beginner’s Guide to Setting Up Your Self-Managed GitLab Server
It’s been a while since I’ve put any of my learnings online — and I’ve realised I should do it more often. Starting now, I’m committing to writing two articles per week to stay consistent with blogging. Most of my writing will revolve around the OG DevOps platform, GitLab — with the occasional detour into Carl Jung’s theory of the unconscious. Don’t worry, I’m just capping. For any existential spirals, follow @vechasays. In this first article, we’ll walk through how to set up a GitLab CE self-managed server on your VM. For a solid DevOps foundation, I recommend setting up your GitLab environment with the following components: Server Runner Registry In this guide, we’ll set up the main server — I’ll cover the runner and registry in the next ones. Server Setup There’s only one prerequisite: access to a VM. Want to make it instantly usable for your team? Set it up on the cloud. Since this is a beginner-friendly guide, I’ll skip the advanced requirements and keep things as minimal as possible. I’ll be using RHEL8 for the rest of this guide, but feel free to use any Linux distribution you prefer. Step 1 : Opening up the firewall firewall-cmd --permanent --add-service=http firewall-cmd --permanent --add-service=https systemctl reload firewalld Step 2 : Set Environment Variables echo "LC_ALL=en_US.UTF-8" > /etc/environment echo "LANG=en_US.UTF-8" >> /etc/environment echo LC_CTYPE="en_US.UTF-8" >> /etc/environment source /etc/environment Step 3 : Setup Gitlab-CE Server Repository curl -L https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh > /tmp/script.rpm.sh bash -x /tmp/script.rpm.sh Step 4 : Install Gitlab-CE yum -y --disablerepo='*' --enablerepo='gitlab_gitlab-ce' install gitlab-ce-17.10.4-ce.0.el8.x86_64 Step 5 : Edit config file /etc/gitlab/gitlab.rb Make sure that the external_url is set to your Load Balancer IP Address. #Make a Copy cp /etc/gitlab/gitlab.rb /etc/gitlab/gitlab.rb.template #Edit external_url vi /etc/gitlab/gitlab.rb . . external_url 'http://:80' . . Step 6 : Hit Reconfigure This will take some time as it brings the install to life by creating directories and starting up services. gitlab-ctl reconfigure Go to http://:80/ on your browser and login with the admin credentials. Username : root /etc/gitlab/initial_root_password has your password Congratulations! You've successfully setup your own DevOps Platform! In case you got stuck somewhere, feel free to drop a comment — I’ll try to answer as best as I can. You can also checkout gitlab forum for any additional help or queries.

It’s been a while since I’ve put any of my learnings online — and I’ve realised I should do it more often. Starting now, I’m committing to writing two articles per week to stay consistent with blogging.
Most of my writing will revolve around the OG DevOps platform, GitLab — with the occasional detour into Carl Jung’s theory of the unconscious. Don’t worry, I’m just capping. For any existential spirals, follow @vechasays.
In this first article, we’ll walk through how to set up a GitLab CE self-managed server on your VM.
For a solid DevOps foundation, I recommend setting up your GitLab environment with the following components:
- Server
- Runner
- Registry
In this guide, we’ll set up the main server — I’ll cover the runner and registry in the next ones.
Server Setup
There’s only one prerequisite: access to a VM.
Want to make it instantly usable for your team? Set it up on the cloud.
Since this is a beginner-friendly guide, I’ll skip the advanced requirements and keep things as minimal as possible.
I’ll be using RHEL8 for the rest of this guide, but feel free to use any Linux distribution you prefer.
Step 1 : Opening up the firewall
firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-service=https
systemctl reload firewalld
Step 2 : Set Environment Variables
echo "LC_ALL=en_US.UTF-8" > /etc/environment
echo "LANG=en_US.UTF-8" >> /etc/environment
echo LC_CTYPE="en_US.UTF-8" >> /etc/environment
source /etc/environment
Step 3 : Setup Gitlab-CE Server Repository
curl -L https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh > /tmp/script.rpm.sh
bash -x /tmp/script.rpm.sh
Step 4 : Install Gitlab-CE
yum -y --disablerepo='*' --enablerepo='gitlab_gitlab-ce' install gitlab-ce-17.10.4-ce.0.el8.x86_64
Step 5 : Edit config file /etc/gitlab/gitlab.rb
Make sure that the external_url is set to your Load Balancer IP Address.
#Make a Copy
cp /etc/gitlab/gitlab.rb /etc/gitlab/gitlab.rb.template
#Edit external_url
vi /etc/gitlab/gitlab.rb
.
.
external_url 'http://:80'
.
.
Step 6 : Hit Reconfigure
This will take some time as it brings the install to life by creating directories and starting up services.
gitlab-ctl reconfigure
Go to http://
on your browser and login with the admin credentials.
Username : root
/etc/gitlab/initial_root_password
has your password
Congratulations! You've successfully setup your own DevOps Platform!
In case you got stuck somewhere, feel free to drop a comment — I’ll try to answer as best as I can.
You can also checkout gitlab forum for any additional help or queries.