How To Install Gitlab On Ubuntu 16.04

As a website or app developer, you’ll want to use some sort of code repository and versioning system to help keep your life a little more sane while you’re developing. In this video I’ll show you how to install GitLab 11.0.3-ee on a virtualized Ubuntu 16.04 setup. While installing GitLab on Ubuntu isn’t terribly difficult, it IS a bit time and resource consuming.

The whole process will take about 30 minutes, and the resources your Ubuntu system will need are as follows:

– 2 cores is the recommended number of cores and supports up to 500 users
– 8GB RAM is the recommended memory size for all installations and supports up to 100 users

AFTER you get Ubuntu installed, you’ll need to do the following in your terminal:

Get your Ubuntu IP Address:
$ ifconfig

Install SSH for remote administration:
$ sudo apt-get install openssh-server

Add the GitLab package repository and install the package:
$ curl | sudo bash

sudo EXTERNAL_URL=”http://YOUR_UBUNTU_IP_ADDRESS” apt-get install gitlab-ee

Once all that is done, you can go to your browser, type in your Ubuntu’s IP address, and then enter a root password into the site that pops up.

On the next screen, enter your username (root) and the password you JUST entered on the previous screen and you’re all setup.


My Amazon Affiliate Link:


Support me on Patreon:



Remember to leave a like on this video and subscribe if you want to see more!


Follow Me:

24 thoughts on “How To Install Gitlab On Ubuntu 16.04

  1. Thank you for this elaborate video. My pain came when I had apache already installed and running on my server. This works if you're already having conflicts and want to host your domain on your server

    Check to see how the services are running with this command: *sudo gitlab-ctl tail

    1) Open sudo vim /etc/gitlab/gitlab.rb and add external_url '' since apache will point your domain to localhost
    2) Change unicorn['port'] = 8088

    3) By default, gitlab runs with NGINX, where you will need to change the port 80 of NGINX itself: Type the command: sudo vim /etc/nginx/sites-enabled/ to a port above 1024, for my part, I assigned it to 5000
    4) Type sudo gitlab-ctl reconfigure
    5) Change the gitlab nginx port within gitlab-http.conf located at sudo vim /var/opt/gitlab/nginx/conf/gitlab-http.conf to port 6000
    like so: listen: *:6000 and set $http_host_with_default "";

    6) For some reason when you run sudo gitlab-ctl reconfigure, the gitlab nginx port will be reset to default port 80. If it does so, change it back to port 6000 manually
    7) In namecheap or godaddy, u just need to add your domain and thereafter, point your domain to http: configured earlier.

  2. Hey David,
    I have recently recovered from SSH connection loss issue with Ubuntu VM. I have gitlab installed on my Ubuntu 16.04 VM .After recovery, the IP of the VM changed so all the repositories on gitlab are unreachable..I want to change the old IP in the repository link with the new IP. What should I do?
    If I change my external URL from gitlab.rb file and hit gitlabctl reconfigure,will it do the trick or again cause any connection loss?

  3. Thank you very much for your in-depth tutorial. It's a big help for a Linux noob like me. I have almost got it working following your instructions but I'm having a bit of problems getting my FreeDNS to work through it. I can connect to the GitLab in my browser by using the internal ip that ifconfig gives me. But if i use my external ipv4 address, i get sent to my routers page. And if i use my FreeDNS address, i get sent to a page that says "401 Authorization Required" Do you possibly have any suggestions for what I should do? Thanks!

  4. Hello, i need use a ubuntu server with a repository server, because we need save a android project in the server, the app android is developer in phisical computers and we need make "push/pull" to the virtual server ubuntu. i can make this with the GitLab?

Leave a Reply

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