How to Choose Self-hosted Git Source Control for your Organization in 2022
by The Inedo Team, on Sep 7, 2022 1:14:15 AM
When you evaluate self-hosted alternatives to “the public cloud” for your source code, you'll run into a huge list of tools.
After a bit of research, you'll discover that, outside of the on-premises versions of "major cloud" vendors (Azure DevOps, GitLab, etc.), there's a bunch of tools that seem like they're built for hobbyists. There's got to be something else, right?
It’s no secret. Finding, evaluating, and migrating to a new source control platform is not easy - but it can pay off in the end, in terms of licensing costs and stability. We curated a list of different self-hosted source control options to save you some legwork and help get you started.
In this article, we cover
- 5 Criteria to consider for Self-hosted Source Control
- 5 Types of Self-hosted Source Control Servers
- Our review/overview of each tool
5 Criteria for Self-Hosted Git Server
1. Critical Core Features
Git's distributed nature means that most of Git's functionality is handled by the client itself - i.e., the tool that all developers will have installed on their workstation.
This means that the server really only needs three key features:
- Protected Branches; because Git allows code change history to be rewritten, it's crucial to "protect" branches like "master" and "main" so that you have a clear audit trail of changes made over time
- Pull/Merge Requests; these are the at the heart of Git-based source control for teams, and they allow developers to simplify code review and enable processes like Gitflow
- Authentication/Authorization; give different users access to different repositories
2. Simple to Upgrade and Maintain
The advantage of self-hosted tools are that you're in full-control over upgrades, and won't get "surprised" by unwanted features and bugs. The downside is that you're responsible for upgrades and maintenance to your software.
Unless you have a full-time team responsible for upgrading and maintaining development tools, ease of upgrade/maintenance is important. You don't your users to wait for hours - or days - while you try to figure out how to fix a bad update or broken server.
3. Established as a Project/Company
Your source code is at the heart of your development, and should be stored in a tool that's backed by a well-established company or project with relevant experience.
- Project/team has a long track record of building tools (10 years)
- Actively being developed with regular new releases
- Responsive support and help
4. Easy to Get Started
Your source control server should be easy to install and use; you'll likely need to set it up a few times through your evaluation - plus having the flexibility to create new source control servers to test upgrades, new versions, and provide new instances is convenient.
5. Licensing Costs
Budget is always a consideration - and source control isn't the only tool that you'll need when self-hosting development tools. Since you'll be responsible for maintaining the server and hosting the software, the licensing costs should be less than a "cloud-hosted" version.
Spoiler: Gitea wins
The simplest choice is, spoiler alert, to go with Gitea!
GitLabCE (free edition) is also a great choice, but it's a whole lot more than source control. If you don't want to use their other features, it's going to feel confusing and bloated. On top of that, it is significantly more complex and challenging to maintain.
We'll talk about that, and some other options later. But first, let's review the five types of self-hosted Git servers.
Type 1: Technically Not Git
For better or worse, Git has become the de-facto standard for source control, and virtually all other source control tools, from SVN to Mercurial, are considered dying, dead, or niche.
Some non-Git source control systems like Perforce (Helix) and Plastic SCM have evolved to have a "git interface" that allows them to work with Git client tools. However, we don't consider those Git servers - and since this article is about how to choose a self-hosted Git solution, we didn't evaluate those systems.
Type 2: Dedicated Git Self-hosted Servers
Although Git has been a mainstream solution for source control for nearly a decade, there aren't very many dedicated Git servers that are suitable for organizational use.
There are a lot of "monolith" solutions (which we'll talk about later), but as of this writing, there are only three (or maybe four) actively products that are worth evaluating:
Among these four, there's hardly a competition: Gitea is significantly more popular than GitBucket and Gogs, and has a large open-source community behind it.
Assembla's SecureGit is a commercial product, and it's difficult to evaluate popularity; however, it's not easy to get started nor seems simple to maintain.
Overview of Gitea
Gitea is a free, open-source project that bills itself as “a painless self-hosted Git service” - and from our evaluation, that’s very accurate. For example, Gitea is just a single executable file, and uses just a single data directory to back up.
Installation and Maintenance
Installing Gitea takes 4 steps.
- Install git
- Download Gitea binary executable
- Register the Gitea executable as a service/daemon
- Run initial configuration
Compared to all other self-hosted options, the ease of maintenance is by far the best.
Gitea is the most active project
Gitea is by far the most active project for self-hosted source control. They have 1,071 contributors. There are 300+ releases, and many include a combination of new features and bug fixes.
Their GitHub Pulse shows the activeness of the project, too.
Overview of GitBucket
Not to be confused with BitBucket, GitBucket got its start years before BitBucket (at the time, "Stash") was acquired by Atlassian.
GitBucket is also an open-source project, but it's far behind Gitea in terms of community activity. From a features standpoint, it has the essential features, but is otherwise behind Gitea. The development hasn't stopped yet, but the release velocity is much slower.
There was only one release in 2022 and it was just a fix of a reported security issue
Installation and Maintenance
GitBucket is also very easy to install, but not as easy as Gitea.
It's "just a single .war file", but Java 8 is a prerequisite. You'll also need to configure Tomcat if you want to run it on a Windows server.
Overview of Assembla
Assembla started off by providing a cloud-hosting service for Subversion, and eventually offered hosting for Perforce's source control system and Git. They also offer additional task and code management tools for software developers. Recently, they also started offering a self-hosted version of their products.
- $192/user/year (minimum 5 users)
Installation and Maintenance:
Compared with Gitea and GitBucket, the installation process is much more complex. Per their documentation, you'll need "on-hand experience working with Ubuntu, Red Hat or CentOS 7, systemd, and Kubernetes."
- Processor: 3.70 GHz Intel® Xeon® Processor E3-1290 v2
- Memory: 8 GB RAM (DDR3 1333MHz ECC FBDIMMs)
- Networking: 1Gbps interface with Jumbo Frames capability
- 100 GB HDD-backed primary (OS) physical storage
- 100 GB HDD-backed secondary (Repository/Application) virtual storage
Note: the specific processor likely isn't required, but is just part of their documentation
We were really on the fence about including Gogs as a suitable Git source control server. That's not to say it's a bad product, but it's essentially the predecessor to Gitea.
In 2016, core members of the Gogs community forked from Gogs 2016, and most of the Gogs community have since abandoned the project. The primary reason for forking was project governance: Gogs follows a "single maintainer" model, which effectively means its fully-controlled the founder, Joe Chen.
In the years since the fork, Joe has continued to make bug fixes and accept pull-requests, but it's still years behind Gitea in terms of features and capabilities. However, in the past two years, the release velocity of Gogs has increased; now Gogs releases more frequently than GitBucket.
Type 3: Git as a Feature (Monoliths)
A "monolith" is a tools designed to facilitate the entire software development process, from idea to automated deployment. All of the "major cloud" vendors -- GitHub, GitLab, Azure DevOps, and BitBucket have evolved into monoliths, and recently JetBrains joined the party with Spaces.
Development monoliths are an all-in-one, jack-of-all-trades solution that include Git repositories as one of the many features. If you only need source control, using a monolith may seem like buying a car for a nice radio and a place to listen to it.
Downsides of using a monolith as a Git solution include:
- Expensive; the licensing price assumes you'll be using all the features
- Unstable; with a complex product and tight competition, features and pricing models are rapidly changing - and new versions tend to be very different
- Quality; it might not be as good as a dedicated tool, especially outside of Git
- Complexity; given all the features, it's more complex to configure and use than a dedicated tool
- Opinionated; each monolith is strongly-opinionated and pushes its own way of developing software
- Cloud-focused; monolith vendors are focused on cloud offerings, and aren't generally focusing on their on-premise use cases
Let's take a look at each of these monoliths, along with their pros and cons.
Note: pricing estimates are annual, based on 50 users
GitHub Enterprise Server
Overview of GitHub
GitHub now presents itself as "the complete developer platform to build, scale, and deliver secure software," which is why it earned a place as a monolith.
In addition to project management features, GitHub also includes GitHub Actions that help automate software development workflows, write tasks, and combine them to build, test, and deploy any code project on GitHub.
GitHub Enterprise is similar to GitHub’s public service but adapted its design for use by large-scale enterprises and small/medium software teams who wish to host their repositories behind a corporate firewall (on-premises).
Microsoft acquired GitHub for $7.5 billion in stock in 2018, but their product roadmap isn't very clear. Many see signs that GitHub will eventually replace Microsoft's other Azure DevOps solution, which we'll talk about later.
GitHub's self-managed Enterprise Server pricing isn't public, but is believed to be the same as their cloud-hosted GitHub Enterprise services:
- GitHub Enterprise: $231/user/year
While github.com has a free- and lower-cost team, they aren't available self-hosted.
- GitHub supports the following virtualization hypervisors for on-premises deployment.
- Microsoft Hyper-V
- OpenStack KVM
- VMware ESXi
- Hardware requirements:
- Storage: 300 GB
- vCPU: 8
- Memory: 48GB
Minimum requirements seem to be increasing; for example, v2.1 only required 2 vCPU and 16 GB.
- Enterprise · A smarter way to work together · GitHub
- Setting up a trial of GitHub Enterprise Server
- Installing GitHub Enterprise - GitHub Enterprise Server 3.4 Docs
- Installing GitHub Enterprise Server on VMware - GitHub Enterprise Server 3.3 Docs
GitHub Enterprise Onboarding Guide | GitHub Resources
GitLab Enterprise Edition
Overview of GitLab
GitLab describes itself as The One DevOps Platform, and was originally built as an alternative/competitor to GitHub. The language and features are very similar, but GitLab quickly expanded its features to go far beyond Git.
Here's the 50+ features that GitLab offers across 10 Stages. Git is in there, somewhere:
GitLab currently offers two paid editions:
- Premium: $228/user/year
- Enterprise: $1,188/user/year
There is also a free edition called GitLabCE, and all three editions include Source Code Management with built-in CI/CD features.
- Supports only Linux, and no plans to support Windows in the future.
- Software requirements: Redis version 5.0 or higher.
- Database: PostgreSQL ver 11 or higher with at least 5-10 GB of storage available
- Hardware requirements:
- Storage: 2.5 GB
- CPU: 4 cores
- Memory: 4GB RAM
- GitLab minimum requirements
- GitLab Installation Guide
- How to Install GitLab with the Omnibus packages
- Steps after installing GitLab
Azure DevOps Server (Azure Repos)
Overview of Azure DevOps Server (Azure Repos)
Azure DevOps Server is Microsoft's on-premise monolithic offering. It's gone through several renames, from Team Foundation Server to Visual Studio Team System, and just as many feature iterations.
Although Azure DevOps rapidly evolves, with many users complaining that "everything is a preview feature", the on-premises edition is updated much less frequently.
There are a lot of features in Azure DevOps, but the key advertised features include:
Microsoft's Azure DevOps Server pricing is a bit complex. You can buy a "traditional license" or an Azure license, and the pricing seems to depend on the number of Visual Studio licenses you have. The price is about the same, and varies based on reseller:
- Traditional license: $599/server + $649/user
Of course, Azure DevOps Server also requires a Windows license and requires SQL Server.
- Windows Server Operating System
- SQL Server
- CPU: Dual-core processor
- Memory: 4 GB
BitBucket in Atlassian Data Center
Overview of BitBucket
Bitbucket currently describes itself as "Code & CI/CD, optimized for teams using Jira."
Originally, BitBucket was a light-weight, self-managed source control server called Stash, but it's creeped into the monolith category after Atlassian's acquisition. After 2024, they will discontinue the stand-alone server product completely in favor of "Atlassian Data Center".
This seems to mostly be a licensing change, as the installation process hasn't changed. BitBucket itself is fairly simple to install... but now it requires purchasing licenses for all of Atlassian's products. Here's what's included in Atlassian Data Center:
Atlassian Data Center is priced based on banded users, and it isn't cheap.
- $42,000/year (up to 500 users)
- Hardware requirement:
- CPU: 2
- RAM: 3 GB
- Java 11 (supported from 11.0.8+) or Java 8 (supported from 1.8u65+)
- Supported platforms | Bitbucket Data Center and Server 8.3 | Atlassian Documentation
JetBrains Space On-Premises
Overview of JetBrains Space
JetBrains Space On-Premises is the newest of all monoliths, and was released in July 2022. as of this writing, the self-managed version is still in beta.
Space is a complete platform for software development, and includes even more features than the other monoliths, such as Chat and Video Calls. It's also the most complicated to manage and install, as it can only be installed on a Kubernetes cluster.
JetBrains Space On-premises has two paid tiers, but the higher (Enterprise) includes licenses to other JetBrains products (IDEs, etc).
- JetBrains Space (Organization): $300/user/year
- JetBrains Space (Enterprise): $1,500/user/year
There is also free tier available for up to 10 applications and 10 users.
- Kubernetes version 1.21+
- Hardware requirement information is not available yet.
Type 4: Inactive, Dead, and Everything Else
Here is the list of tools that you don’t have to evaluate. They may have been an option years ago, but as of this writing, they're no longer active or lacks critical features.
Mostly Inactive Projects
- RhodeCode is a commercial product, but we judged this as inactive based on a lack of activity in product changes, repositories, forums, etc. In addition, the company behind it does not seem active on any public channels (Twitter, LinkedIn, etc.)
- Gitblit has only had a few critical security fix releases in the past few years. There is some commit activity, but it appears to be largely bug fixes from existing users.
- Kallithea had only one release in 2021, compared with previous years that saw many more releases. There have been a few code changes this year.
Lacking Core Features
- GitStack lacks a merge/pull request feature. It's also inactive, and development appears to have stopped around 2017.
Dead / Archived
- Deveo is gone. Perforce Software has acquired Deveo. Now it’s a commercial product, Helix TeamHub. Helix TeamHub is also available on-premises (quote required).
- gitorious is archived.
- Meat is archived.
Not Really Git Source Control Servers
- GNU Savannah is intended for open-source project hosting and lacks core features.
- Gerrit is more of a code-review tool that Google used, and has been adapted to work with Git. It's unclear if it's suitable as a Git source control server on its own, as it's design is centered around Gerrit-style code reviews.
Conclusion & Next Steps
While it may seem like there are a lot of options for self-hosted Git Source Control, there's really just a few suitable choices.
Before picking a source control server, you'll first need to decide if you want to use a "monolithic development platform" that has Git repositories as a feature. These all-in-one solutions may feel bloated if you don't use the other features, and they will be more complex to maintain.
If you want to use a monolith, then go with GitLab CE.
however, if you'd like to have a self-hosted Git server as part of your software toolchain, then go with Gitea.
Gitea is great option for self-managed Git source control because it’s focused on just that: a single, easy-to-manage Git source control server. It’s rapidly growing in popularity as a result of this, and will continue to improve as the community grows.