How to install GitHub on Ubuntu Server with Nginx [tutorial]


GitLab offers git repository management, code reviews, issue tracking, activity feeds and wiki’s. Enterprises install GitLab on-premise and connect it with LDAP and Active Directory servers for secure authentication and authorization. A single GitLab server can handle more than 25,000 users but it is also possible to create a high availability setup with a warm standby server.

As you can read in description from, GitLab is powerful tool which you can use in small projects, whether big companies which are deploying many of solutions every day.

In this tutorial you’ll teach yourself how to install and configure GitLab on your dedicated server.

Tested on: Ubuntu 13.10 Server, should work on other Debian/Ubuntu distributions.

1. First step is to download .deb package of GitLab prepared for your Linux distribution and system architecture:

cd /tmp

mkdir gitlab


2. Once you downloaded, it’s time to install the package

sudo dpkg -i gitlab_6.7.5-omnibus-1.ubuntu.12.04_amd64.deb

It may take a while, so please write few lines of useful code at the moment, after installation you’ll be able to commit it to your own git repository.

3. Time to decide how you want to show your GitLab to the world. You have few options, i’ll show you how to deploy it on your own server’s subdomain.

First, you should add an A record to your DNS zone (it’s usually file in /etc/bind with name of your domain).

Add this line to your file:

git        IN      A

Don’t forget to replace “″ with your server’s IP address.

Restart bind:

sudo service bind9 restart

Now your DNS server is ready to handle your newly added subdomain.

Then you should configure nginx which binaries are included in GitLab files to serve files on that subdomain.

Open file:

sudo vim /var/opt/gitlab/nginx/etc/gitlab-http.conf

In section server, find line which starts with:


And replace it with:


Naturally you should change to your domain name.

If you’re DNS Records are already propagated, you can now start you GitLab instance:

sudo gitlab-ctl start

Now I recommend to wait 2 minutes and give time ruby’s magic to run your GitLab service. After that, you check:

If everything went well, you’ll see your own GitLab welcome screen.

Here you must do first login using standard credentials:

Login: root

Password: 5iveL!fe

Hope this article was helpful!


Leave a Comment

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>