If you’re a developer, you should be intimately familiar with Git. It’s the essential tool for software engineers, but is also hugely useful for just about anyone. Git is a version-controlling system for software and other text-based documents and files, which allows you to modify and make changes with a full history and branching system, among plenty of other great features (which are all explained elsewhere, far better than I ever could). If you’re a homelabber, Git can be great for managing your configurations.
But raw Git is only one part of the equation – you also need a Git server. This is where your code lives remotely, and it enables sharing changes between multiple developers and devices. Many people choose to use free online Git instances like GitHub, and there are plenty of advantages to this, but also some downsides.
Hosting your own Git server with something like Gitea can be a great learning experience, and can have a few practical benefits as well. Here are some of the reasons why hosting your own Gitea server would be a great idea.
Related
6 reasons why you might want to pick SBCs and mini-PCs over server-grade hardware
Hardcore server rigs may appeal more to home lab lovers, but there are just as many perks with consumer-rated systems
5
Don’t risk exposing your data
Keeping your private data off the internet adds another layer to your security
Source: Wikimedia Commons
One good reason to host your own Gitea (or other similar) instance in your home lab is to add an extra layer of protection for your security. How big of a concern this is for you may vary depending on what you’re using Git for. If you’re working on open-source projects, without complex CICD pipelines hooking into other services or sensitive information, then you’re probably fine making use of the already excellent tooling provided by the likes of GitHub. But, if you’re working with more sensitive data, especially if they’re hooking into other services like AWS, GCP or Azure where one miscommitted API key could run up a huge bill quickly, you might not want to take the risk.
Personally, I find there’s a benefit (and little downside) to having both remain internal. It’s nice to have services and code constrained to my network so that I don’t need to worry as much about my own little bad practices which may potentially expose something unintended when I’m tinkering.
There are other considerations here too. Some degree of data mining will likely go on with most of the big cloud Git providers; besides, we know these code-generating AIs are being trained somewhere.
4
Customizability
Tweak your instance to your heart’s content
Another excellent reason to run your own Gitea or similar server at home is the customization it offers. Gitea has an almost limitless bed of customization, including configuration options designed to be tweaked, with complete documentation on rewriting pages, serving custom files, and tweaking layouts. Most of Gitea relies on templates, which can be easily modified to change the presentation of a page without getting into the weeds by modifying the data returned or required by a page.
This is a bit of a rabbit-hole, but if you’re a power user who likes things to be ‘just so’ or you’re just interested in adding your own personal branding to your instance, then this is a huge benefit.
If you’re interested in exploring what Gitea’s customization can offer, we’d recommend you skim their documentation on customizing your self-hosted instance.
Related
4 reasons you should run your own DNS server with Unbound
Upgrading your network with a self-hosted DNS server is one of the best improvements you can make
3
Offline access
No need for devices accessing your builds to have an internet connection
Another great reason to host your own Gitea instance is that it’s available offline. There are two sides to this. Firstly, if you live in an area with intermittent or unstable internet connectivity, or just have a dodgy ISP router, having a local copy of your work is essential. If you’re a contractor or full-time developer, sometimes having a local copy of some core repos might allow you to keep working where you otherwise might be forced to stop. The other side to this is that you’re not beholden to the uptime of the likes of GitHub or GitLab cloud, both of which have not-so-perfect reputations for uptime over the last few years.
It’s awesome to be able to keep working when your cloud service of choice (or entire internet) is down, and it can be relatively simple to set up. You can always configure aliases to push to both repositories at the same time, or configure a CICD action or similar to keep your repositories in sync between cloud and local instances.
2
No platform lock in
Don’t risk your favorite feature being rug-pulled
This one applies to just about all free software online. There’s always the risk of a rug pull. It’s a pattern that’s all too common with tech companies nowadays. They entice users with a great ‘free’ offering, which seems almost too good to turn down (but is often too good to be true, at least for the long-term). Once a user base has been established, they begin locking new features behind paywalls, or removing existing ones, all the while making it difficult to migrate away to competing services.
Migrating between Git instances isn’t difficult. It’s actually rather wonderfully easy. However, migrating things like CICD pipelines or other platform-specific integrations can be a complete nightmare. So your mileage may vary here — if you’re just using pure Git, then the lock-in isn’t likely to be too bad. But if you’re using CICD runners, configuration, secrets injection, or anything else that comes as more of a ‘platform,’ then consider how you or your small business might handle things if suddenly there was a significant bill to pay to continue using those features.
1
Cost savings
Especially pertinent if you’re using advanced features or lots of CICD runners
Our final point is really more small-business focused, but there is a serious reason why these self-hosted instances exist. Often, with paid packages for the likes of GitHub Enterprise or GitLab, you’re paying for a certain number of minutes of cloud-compute for CICD runners. These runners are effectively computed in the same way as a VM from Azure or AWS is, and are made available to run your CICD pipelines. This can be expensive, and is something all platforms aggressively bundle into their pricing to bump up their margins (especially those with access to cheap computing).
However, whether you’re making use of your compute minutes or not, you may find significant cost savings hosting your own runners elsewhere. You don’t necessarily need to self-host your whole instance to do this, but it’s often not a bad idea to take on both at the same time.
Running your own Git instance isn’t for everyone
For a lot of people, running your own Git instance would be overkill. You might not benefit from hosting your own runners, or splitting the storage of your code between the cloud and your local instance. But for others, especially if you’re a full-time developer working from home, some of these benefits can be crucial. Having your own, private, infinitely scalable and customizable instance to work from can be a lifesaver, especially if the likes of GitHub would suddenly go down for a few hours.
#reasons #host #Git #server #home #Gitea
source: https://www.xda-developers.com/5-reasons-you-should-host-your-own-git-server-at-home-using-gitea/

