Install GitLab on Ubuntu 16.04 / 17.10 / 18.04 LTS

GitLab (Git-repository manager), an open source version control platform similar to Gitbub, is robuts, scalable and a great alternative to Github… GitLab has rich features like issues and time tracking, repository branching, file locking and tagging, merging  and many others features that you will find in a typical source control platform..

GitLab streamlines your collaborative workflows. Visualize, prioritize, coordinate, and track your progress your way with GitLab’s flexible project management tools.

This brief tutorial is going to show students and new users how to easily install GitLab on Ubuntu 16.04 / 17.10 and 18.04…

To install GitLab on Ubuntu, follow the steps below

Step 1: Install Required Packages

Before installing GitLab, you must make sure Ubuntu is ready… that means, installing necessary packages in order for GitLab to function… To do that, run the commands below..

sudo apt update
sudo apt install curl openssh-server ca-certificates

Next, run the commands below to install Postfix MTA for notifications…

sudo apt install postfix

During the installation, you’ll be prompted to select the type of mail configuration… make sure to choose  Internet Site [ Mail is sent and received directly using SMTP] as shown below… then press Enter to continue..

GitLab Ubuntu Install

Next, provide a mail server name… then can be the server Postfix is installed on…

GitLab Ubuntu install

Step 2: Install GitLab Packages

Now that your server is ready, run the commands below to download and install GitLab packages… the EXTERNAL_URL value should be the URL for the GitLab site… If you’re testing in a development environment, you may have to enter that in the server host file….. and this is the URL that you’ll need to access the GitLab site…

curl | sudo bash
EXTERNAL_URL="" sudo apt install gitlab-ce

After the commands above you should see a completion message…

Thank you for installing GitLab!
GitLab was unable to detect a valid hostname for your instance.
Please configure a URL for your GitLab instance by setting `external_url`
configuration in /etc/gitlab/gitlab.rb file.
Then, you can start your GitLab instance by running the following command:
  sudo gitlab-ctl reconfigure

Run the commands below to start GitLab instance…

sudo gitlab-ctl reconfigure

By default, Ubuntu firewall is disabled… if you enabled, it then run the commands below to allow HTTP and HTTPS traffic…

sudo ufw allow 80/tcp
sudo ufw allow 443/tcp

After that, open your browser and browse to the URL for your GitLab instance… You should see GitLab setup page as shown below… Change the admin account immediately…. and yoiu should be redirected to the logon screen…

GitLab ubuntu

That’s it! This is how to get GitLab installed on Ubuntu systems… more advanced settings can come after, but this is the bare minimal to get GitLab started..

Default username is root

GitLab Ubuntu install

You may also like the post below:

Install Akeneo PIM on Ubuntu 16.04 / 17.10 / 18.04 with Apache2, MariaDB and PHP 7.1 Support