Debug School

Cover image for Install GitLab on-premise
Suyash Sambhare
Suyash Sambhare

Posted on

Install GitLab on-premise

Install via Omnibus package that bundles all the different services and tools required to run GitLab.

4 GB of RAM
100 GB of Disk space
2vCPU of Processor

Install dependencies

sudo apt-get update
sudo apt-get install -y curl openssh-server ca-certificates tzdata perl

Install PostFix

This is used to send notification emails. You can skip this step and configure an outside SMTP server after GitLab has been installed

sudo apt-get install -y postfix

During Postfix setup a configuration screen will display. Select 'Internet Site' and press enter. Use your server's external DNS for 'mail name' and press enter.

Add the GitLab repository

curl | sudo bash


Install GitLab

For https:// URLs, GitLab will automatically demand a certificate with Let's Encrypt, which expects inbound HTTP access and a valid hostname.

sudo EXTERNAL_URL="" apt-get install gitlab-ee
# List available versions: apt-cache madison gitlab-ee
# Specifiy version: sudo EXTERNAL_URL="" apt-get install gitlab-ee=16.2.3-ee.0
# Pin the version to limit auto-updates: sudo apt-mark hold gitlab-ee
# Show what packages are held back: sudo apt-mark showhold

Enter fullscreen mode Exit fullscreen mode

Login to GitLab

Unless you provided a custom password during installation, a password will be randomly generated and stored for 24 hours in /etc/gitlab/initial_root_password. Use this password with username root to log in.

Congratulations! 👍🎉
You have successfully installed GitLab!


Top comments (0)