I am one of the winners of a brand new Raspberry Pi 4B . My project proposal was to try running a Gitlab server on the Pi. Gitlab is much more than just source code management tool (based on Git, of course). It also includes a project management and a ticket system and continuous improvement / continuous delivery (CI/CD) support. There are two options to run this application – hosted or installed on-premise. Both installation variants have currently four versions. The basic is always free, the other versions are paid, but more feature-rich. I know Gitlab as a user from my work, but I haven’t paid attention to the installation details until recently, when I saw that there is a package for the Raspberry Pi. Is it possible to run such a complex tool on the Pi? Let’s find out...


First Impressions

I know there are and will be many reviews, tests and benchmarks of the new Pi 4 on the internet, but I can’t resist writing a few sentences about the Pi itself.


Raspberry Pi 4 B topRaspberry Pi 4 B top otherRaspberry Pi 4 B portsRaspberry Pi 4 B bottom


I receiver just the Pi, so I immediately had to buy the rest of the necessary stuff: power supply, SD card, microHDMI cable, cooling accessories etc.


Raspberry Pi 4 B accessories


Here comes the first difference – new power supply is connected via a USB-C connector and the specification says 3 Amps are needed (old supply used microUSB and supplied 2.5 Amps). I bought the original one and had no doubts it will work. I also tried a non-original microUSB adapter (which could supply up to 3 Amps) and a microUSB<>USB-C adapter. This setup also worked.


I found some older Kinston SDHC 8 GB Class 10 card at home. Later I decided to do some performance comparision. I chose microSD card according to this benchmark:

One of the cheapest, but also most powerful cards was SanDisk Micro SDHC Extreme 32GB 100MB/s A1 UHS-I U3 V30. As it turned out later, there is a huge difference in SD cards performance!


After reading a few reviews, I already knew there is no point in putting the Pi into a solid enclosure (especially the original one), so I currently run a bare board. The idle temperature is about 55 Centigrade and gets to ca. 65 during non-intensive work. I haven’t applied a heat-sink yet, but I have one prepared for future use. And a 4 x 4 cm fan if it won’t be enough.


Basic setup

I don’t want to go into much detail in this part, there is a ton of information about the basic setup.


  1. Prepare SD card with a Raspbian image. I chose Raspbian Buster with desktop (but not all the software)
  2. Boot the Pi, finish the setup process.
  3. Update the Pi (if not performed in the previous step)
  4. Change the default’s user credentials, enable SSH / VNC or other form of a remote access.

If your VNC server doesn’t always start automatically, there is a known issue with a solution:

My plan is running the Pi as a server, without keyboard, mouse, display.


Gitlab setup

Gitlab developers recommend downloading and installing an Omnibus package of Gitlab as the fastest and easiest option. There is also a manual for installing Gitlab on a Raspberry Pi, but at the time of writing this blog post, it worked only for Pi 2/3/4 running Raspbian based on Debian Stretch. However, current version of Raspbian is based on Debian Buster.

Please note that if there is an official updated manual for Buster, do not follow the steps below. Use the official manual. The current (September 2019) official manual is located here:

I tried to contact the Gitlab support, asking for an installation manual update. Even though I don’t have a subscription or a paid licence, I got a polite answer with helpful resources and a promise that as soon as there will be builds for Buster (armhf architecture), the manual will be updated. The main steps are described here:

Step one downloads the package. Be prepared for a 630 MB download!

curl -Lo gitlab-ce_12.2.5-ce.0_armhf.deb


Now install the downloaded package:

sudo apt install ./gitlab-ce_12.2.5-ce.0_armhf.deb 


Note: in the beginning, if you search for a package using a keyword “gitlab” in Raspbian, you get a few community built packages, but not the official “gitlab-ce” package as described above!

Now let’s get back to a gitlab-ce package installation. The installation took almost 2 minutes (10 minutes with an older card!) and as you can see in the previous screenshot, consumed almost 1800 MB.

As suggested at the end of the installation, it is necessary to set an IP of the Pi to the external_url parameter in the configuration file. I put my local IP of the Pi there (don't delete the http:// ).

sudo nano /etc/gitlab/gitlab.rb

I skipped the recommended Pi-specific changes (creating swap, reducing the number of concurrent processes, optionally creating ZRAM swap) and started a recofiguration.

sudo gitlab-ctl reconfigure

The reconfiguration took 7 minutes.

By the way, it took 27 minutes with the old SD card and threw some Grafana error.

Either way, the server seems to be running. When I pointed my computer browser to Pi’s IP, it showed the default password reset dialog. The installation is complete!

After setting a new password, the login / registration page appears. I signed in with the root account and freshly reset password.

Here comes the default page for the administrator:

You might have noticed that I haven’t set up SSL for the access. Gitlab installation offers automatic certificate request for your domain at a certification authority, however, I run this as a test application in my local network. If you want to know more about SSL, see this documentation page:

I will divide this topic into a few shorter blog posts, in order to be easier to read. Next part will be about creating a project a starting a version control of it.