There are many different open source git servers available.
I have used many and will try to compare them by experience and features.
For a comparison made by gitea visit https://docs.gitea.com/next/installation/comparison
Source: https://about.gitlab.com/
Gitlab is, to my knowledge, the biggest and best suited git server for large groups or enterprise settings.
It has the most features and even an inbuilt CI/CD pipeline.
I would recommend it for companies or very big groups, but not for small deployments at home or for a small group of friends.
Source: https://about.gitea.com/ / https://forgejo.org/
Gitea is a small git server that has a github-like feeling.
It has many features but uses less resources than gitlab and is suited for smaller deployments, for example a group of friends.
Forgejo is a fork of gitea and is recommended over gitea by security enthusiasts online.
Source: https://gogs.io/
Gogs is the smallest git server which still has a good UI.
It feels similar to gitea but uses even less resources and runs on the smallest of raspberry pi's.
I would recommend Gogs for small homeserver deployments or private git servers in general.
Gogs uses barely any resources and has a good looking UI with many features.
Gitea used (tested in 2022) ~5% cpu when idle on my raspberry pi. Gogs uses 0% cpu when idle.
Gogs is a single executable written in Golang and all it requires is to have git installed.
BUT: The jenkins gogs module has vulnerabilities which haven't been fixed in months, so if you need a good and secure jenkins addon for your git server then choose Gitea or GitLab instead.
Requirements: Have git installed (example: sudo apt-get install git)
Get the latest version of the gogs binary from the release page: https://github.com/gogs/gogs/releases
Unpack the archive, go into the unpacked folder and use "./gogs web" to start the server. The configuration resides at "custom/conf/app.ini".
If you want to start it as a systemd service you can use the service file found here: https://github.com/gogs/gogs/blob/main/scripts/systemd/gogs.service
To setup a reverse proxy with nginx you can use the most simple proxy_pass configuration:
server_name git.example.com; location / { proxy_pass http://localhost:3000; } # or with sub url server_name example.com; location /git/ { proxy_pass http://localhost:3000/; }
[server] EXTERNAL_URL = https://example.com/git/ ROOT_URL = https://example.com/git/