Setup own local GitLab server on linux

GitLab installation and configuration steps

About GitLab Server :

Gitlab is a software which work same like github.
Gitlab is little different than Github, you can install your own git server using gitlab application but github would not providing such option.
On github you need to pay for private repositories so with help of gitlab you can create your own private repository without paying single penny. Only thing you need to do is install and configure it on your own server.
Once you install gitlab you will be able to create private repository and you can make gitlab more secure by allowing panel access in your internal network only.
Now we will be explaining you each step about installation and configuration and you can easily setup your own gitlab server.
Before starting installation process make sure our server is compatible with application. So find the below details of Server specifications and Gitlab dependency packages.
Server Specifications :
  OS   : Linux Debian 8 jessie
  CPU : 2 Core
  RAM : 1GB
  Storage : 20GB
Gitlab dependency Packages :
– curl, ca-certificates 
– postfix
– gitlab-ce

gitlab-ce is basically gitlab community edition which provide us to make max 10 private repository.

If you want a more repository then you need to buy enterprise version which provides you more repository’s as well as support. Follow below link for enterprise edition.


Now we have understood the requirements for gitlab installation.

Let’s start the local Gitlab server installation and configuration.

Setup Own Local Gitlab

First, we are going to install gitlab dependency packages with the help of apt-get command before installing any package on debian update your repository,
$ apt-get update

$ apt-get install curl ca-certificates
Above are the basic dependency package of gitlab server.
Now we are installing postfix mail server which we are using to send emails from server. so follow below steps to install postfix. you can also use default sendmail server for mailing.
$ apt-get install mailutils postfix
Postfix installtion is done.
Before start installing gitlab-ce, we need to add gitlab-ce repository under apt-get source list. Run below command directly on terminal which will help you to add gitlab repo and after adding repo install gitlab-ce with apt-get.
 $ curl -sS | bash

$ apt-get install gitlab-ce
To configure and start GitLab, RUN THE FOLLOWING COMMAND:
$ gitlab-ctl reconfigure
Above command will take some time to configure but help to automatically configure everything for you like nginx, postfix etc.
Now go to your browser and hit the server ip,
Above link will open the gitlab page and it will prompt you to set your password for login.
After setting password create new account for accessing gitlab.
Now login with the new username and password and it will provide you panel to create priviate projects. you are able to create only 10 Priviate projects in Community edition.
That’s it our gitlab installation and configuration steps are completed. 
I hope you like the post if you have any kind of queries regarding gitlab installation post. Please comment your queries and suggestion under the comment box.
Thank You 🙂

Latest Comments
  1. shivangpatel December 16, 2016

Leave a Reply

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