How To Install Gitlab on Ubuntu 16.04


In this tutorial we will guide you how to install and configure gitlab on ubuntu 16.04 server. GitLab is an online Git repository manager with a wiki, issue tracking, CI and CD. GitLab gives you complete control over your repositories or projects and allows you to decide whether they are public or private for free.  It is a great way to manage git repositories on a centralized server. GitLab is widely used for software development and version control related tasks. It is similar to GitHub, except you can install it in your own server and its free.


This article assumes you have at least basic knowledge of linux, know how to use the shell, root user or non-root user account with sudo privileges set up on your server.

Step 1 – Install gitlab

First we need to update repository database using these command below

Step 2 – Install the necessary dependencies.

Before we going to install Gitlab, we need to install some prerequisites like ssh and mail services

Step 3 – Install gitlab

Use following command to install GitLab packages on server:

The script will set up your server to use the GitLab maintained repositories. This lets you manage GitLab with the same package management tools you use for your other system packages. Once this is complete, you can install the actual GitLab application with apt:

Step 4 – Configure GitLab on Server

You can start the configuration by using the gitlab-ctl command like below :

Step 5 – Test and accessing Gitlab.

If you are using a firewall, please open port 80 to enable access to the control panel. Open your favorite browser and navigate to or http://server-ip and then login with a “root” user and with default password “5iveL!fe”


Congratulations, you have successfully install gitlab on Ubuntu 16.04. Now you have your private git repository server. Thanks for using this tutorial for installing Gitlab on Ubuntu 16.04 LTS  (Xenial Xerus) system.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *