A tutorial series to get you up and running with GitLab in under an hour.

Since its original release in 2012, Raspberry Pi has been a key companion to developers around the world for automating software tasks and building low-cost networking projects. Its capabilities have grown significantly over the years, so much so that I have started to use my Pi to self-host a git server (GitLab) at home.

I am going on a journey to document how to set up a git server with all the tools you need on Raspberry Pi, so you can do the same in…


This is the final post in the series of how to host your own git server on a Raspberry Pi

Throughout this series, you have successfully set up a Raspberry Pi, installed Postfix, GitLab, Nginx, and configured GitLab Runners. Additionally in the previous post, you have added SSL/HTTPs support to these services. Congratulations, these were no easy tasks!

You are nearly done — In this final post, we will go over creating a GitLab project and setting up continuous integration. …


This is the seventh post in the series of how to host your own git server on a Raspberry Pi

You have successfully set a Reverse Proxy in the previous post. We will now take a look into configuring SSL to secure our connections to GitLab through HTTPs.

1. Create Certificate Directory

In order to establish secure connections, the first thing we need is a security certificate. Since we are using our Raspberry Pi on our local network, we are going to create and use our own security certificates.

Create a directory on Raspberry Pi for your certificates:

sudo mkdir /var/cert

Get read/write access…


This is the sixth post in the series of how to host your own git server on a Raspberry Pi

You have successfully configured GitLab and set runners for your projects in the previous post. We will now look into setting up a reverse proxy on our Raspberry Pi. This will allow us to host multiple web pages and services via sub-domains, and access GitLab through git.<HOSTNAME>.<DOMAIN>.

1. Install Nginx

Start by installing Nginx with the following command:

sudo apt install -y nginx

Before starting your Nginx server, stop the running GitLab instance so it does not interfere with the setup:

sudo gitlab-ctl…


This is the fifth post in the series of how to host your own git server on a Raspberry Pi

You have successfully installed GitLab in the previous post. We are going to look into further configuration options and set up runners to enable continuous integration (CI) for our projects.

1. Disable Usage Statistics (Optional)

One of the main benefits of self-hosting your git server is that you have full control over your data. In this direction, you can further limit GitLab to collect information about your usage.

From Admin Area (wrench icon by the menu), go to Settings > Metrics and profiling and disable…


This is the fourth post in the series of how to host your own git server on a Raspberry Pi

You have successfully set your Mail Server in the previous post. We will now look into installing git server on our Raspberry Pi. There are many self-hosted options when it comes to git — Gogs, Gitea, Phabricator — but none of them come close to the ease of use and the number of features offered by GitLab. Hence we will be using the latter for our self-hosted git server.

1. Run GitLab Script

Start by running the GitLab setup script on your Pi. This…


This is the third post in the series of how to host your own git server on a Raspberry Pi

You have successfully configured your Raspberry Pi in the previous post. In this post we will install Postfix, one of the most widely used email servers in the Linux environment. It will be the foundation for any services in our Raspberry Pi to send email notifications, including our git server.

1. Install Postfix

The first step is to install Postfix from Linux software repository:

sudo apt install -y postfix

Upon completion, you will see the Postfix configuration screen:


This is the second post in the series of how to host your own git server on a Raspberry Pi

You have successfully set your Raspberry Pi in the previous post. We will now go over several configurations that can benefit your Pi. Getting these in before setting up any software tools will be key, as some of those systems will depend on these configurations.

Open up a terminal, connect to your Pi, and follow the steps below.

1. Create User Accounts

As in any new system, you will need to create user accounts for yourself and others that will use the Raspberry Pi…


This is the first post in the series of how to host your own git server on a Raspberry Pi

Since its original release in 2012, Raspberry Pi has been a key companion to developers around the world for automating software tasks and building low-cost networking projects. Its capabilities have grown significantly over the years, so much so that I have started to use my Pi to self-host a git server (GitLab) at home.

I am going on a journey to document how to set up a git server with all the tools you need on Raspberry Pi, so you…

Yiğit (Yeet) Uyan

Systems Engineer, specialized in building Internet of Things (IoT) devices and applications. Harvesting crops at Google. 💻

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store