Installing Gitlab on Ubuntu 18.04
As part of my path of trying to self host everything I can, I figured the first thing I should do is get a solid Gitlab server setup to hold my website source code. My website source code will remain public, so you all can continue to see the fact that I don’t track you.
For this server, I decided that I would put it up on Digital Ocean for now. This is partially because I’m lazy and wanted it to be easy to get going but also because my
Hacktanix cluster that I’m building is very angry with me right now.
So, let’s get started. I grabbed a 4GB Memory Droplet on DO, running Ubuntu 18.04.
Do your generic Ubuntu setup, make sure you have a user that is not root, but has sudoer access.
At this point we want to make sure
fail2ban is going to be watching SSH. Insert the following block of text into
Now let’s get Gitlab’s repository setup.
Note: If piping directly into bash isn’t your thing, head over to their website and download the
.deb file directly.
Now we’re going to install Gitlab-CE.
You’ll want to add your FQDN for the server in
/etc/gitlab/gitlab.rb. This is also a good time to make sure that you have DNS setup for your server, otherwise the automated Letsencrypt setup will fail.
This will run for a few minutes and then you’re ready to go! Log into https://yourserver.example.com and set the root password.
If you run into an error where it says you can’t set the password because of 7 or 8 reasons, here’s what I did to solve the issue.
I hope this helps! In the future, we’ll look at how to deploy a highly available instance of Gitlab.