GitLab is an amazing piece of software. I want it to run on a locale server for private projects. This is why I tested it on an Raspberry Pi 3 I had around as my NAS doesn’t support half of the components.

GitLab already provides an easy step by step installer on their website.

With the latest Raspian Image (11/2018) I ran into some problems anyways.

The installation of the different packages ran without further problems. But during the final reconfigure phase the process stops with this error message:

initdb: invalid locale settings; check LANG and LC_* environment variables

This is due to an wrong locale setting. Therefore run the following command. Select „en_GB UTF-8“ for example in the appearing dialog.

sudo dpkg-reconfigure locales

If you still get error messages after running this you can set the locales manually by editing the following file:

sudo nano /etc/default/locale

Safe the following data into this file:


After saving the file changes reboot your Raspberry Pi. Now you can try to re-run the reconfiguration of the GitLab installation.

sudo gitlab-ctl reconfigure

This may take a while. But this is a good sign as this should now run through. Your GitLab is now installed on your Raspberry Pi.

With older packages you could now run GitLab from your Raspberry Pi. Just open the address you installed GitLab with – in my case the locale IP address

With the latest packages you overcome the ressource limits of an this little platine. In my case GitLab would not start but give an 502 error window and did not respond.

To make GitLab run we need to adapt some configurations. First we need to change the swap file settings. The Rapsberry Pi does not come with enough RAM at the moment. Run the following command:

sudo nano /etc/dphys-swapfile

If you already have requested the GitLab page this command may take a while, as there are a lot of processes running in the background and your Pi maybe already be working hard.

Please change the following line:


And comment this line out. So that you have the following line:


Reboot your Raspberry Pi. Now be a little patient with your little machine. As soon as you Pi is back it will still take some time. The startup of GitLab will take some time.

But now ( after a while ) you should already be able to run GitLab and log in. Congratulations! To speed up the system a little we could do some more configuration. Please open the GitLab config file:

sudo /etc/gitlab/gitlab.rb

Please uncomment or change the following entries:

unicorn['worker_processes'] = 3 
sidekiq['concurrency'] = 10
prometheus_monitoring['enable'] = false

If you are done with this and saved the file you have to start the GitLab reconfiguration again:

sudo gitlab-ctl reconfigure

This may take some time again. You could now finally reboot your Pi once more. Than enjoy your GitLab running on a Raspberry Pi.


Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert