Jan-Lukas Else

Thoughts of an IT expert

Install Gitea as Your Self-Hosted Alternative to Github or GitLab

Published on in 👨‍💻 Dev
Updated on
Short link: https://b.jlel.se/s/129
⚠️ This entry is already over one year old. It may no longer be up to date. Opinions may have changed.

There are different reasons for why you may want to install your own git server, like downtimes or new telemetry at GitLab. In this article I want to show you the self-hosted alternative Gitea, which you can easily install on a Virtual Private Server (VPS) with Ubuntu or one of many other Linux distributions (maybe at DigitalOcean or Hetzner) or even a small Raspberry Pi.

The installation is actually quite simple…

Gitea can be downloaded directly as an executable file for Linux:

wget -O gitea https://dl.gitea.io/gitea/1.9.3/gitea-1.9.3-linux-amd64
chmod +x gitea

Because you need git on the server, check if it’s installed (or install it if it’s not):

git --version

To test it now simply run (and type CTRL+C to kill it again):

./gitea web

If something showed up in your browser at you can continue creating a new user for Gitea and a Linux service as well as configuring it. If you are a Docker user, you can also install it with Docker.

In addition to that I also recommend using a reverse proxy in front of Gitea, like Caddy, which also offers easy support for encrypted connections using HTTPS. It’s just as easy to install.

Running your own git server makes you more independent from commercial services and their incentives to earn a lot of money. If you don’t want to install Gitea yourself, you can also take a look at the offer from the non-profit Codeberg.

Tags: , , , , ,

Jan-Lukas Else
Interactions & Comments