DEV Community

Cover image for Where do you host your code? Cloud vs on-premise git services
Galuh Utama
Galuh Utama

Posted on

Where do you host your code? Cloud vs on-premise git services

We all know GitHub, GitLab, BitBucket, Azure DevOps, and the good old SourceForge. These are some of cloud Git hosting service providers that offer an array of features for private coders and teams, even on their free tiers.

The less obvious choice nowadays is to host your repositories on-premise, which usually involves setting up a server, either physical or renting one on the cloud. Of course, you can also host the repositories on your machine.

Considerations

Now there are several arguments for hosting your code on the cloud and on-premise. I would like to list some of the considerations for private and company projects.

Costs

For a lone coder, hosting your code on the cloud for free is probably the most obvious choice. You can start within minutes. I have seen start-ups and established companies with small to medium-sized development teams host their repositories on the cloud, due to cost considerations.

Cloud Git repositories start mostly free but there are some storage and access limitations (I remember when GitHub private repositories were a paid feature). These limitations should not be a problem for private coders and small teams. However, for larger teams, monthly price per account can incur higher expenses.

Security

I have not read any hacking incidents on cloud-based repository services, maybe I missed some of the news though. For sure, it is their core business to protect vital data of their customers. Nevertheless, to what extent do you trust your service providers? How transparent are they regarding this issue?

In some EU countries, hacking incidents on online services, by law, must be reported to authorities and disclosed to their customers. This sets the lowest standard of transparency regarding this matter.

On-premise repositories can be secured as simple or as complicated as possible. Not exposing repositories to the public internet would be the easiest one.

Reliability

I have experienced some downtime with GitHub services. The reliability of on-premise repositories depends on how well you manage it.

Privacy

Hosting your code (or generally, any data) on a foreign server or data center may not adhere to local regulations such as GDPR. I have seen IT departments (in EU-based companies) strongly reject the ideas of storing data in a non GDPR compliant data center.

Maintenance

Hosting a Git service on-premise causes maintenance costs, be it for setting up basic security, regular updates, regular backups and restore, etc. If hosting on company infrastructure, there are also fix costs for electricity, hardware, personal, etc.

There is a negligible amount of maintenance when hosting a git repository on the cloud, for example, maintaining access to team repositories.

Integration with other services

The most cloud-based repository hosting services offer integration with third-party services, such as Slack, Jira, some CI/CD services, and so on. These features are also often offered as parts of the service as well.

Integrating other services with on-premise Git repository service can be straightforward or complicated. I have seen companies integrating their LDAP and ActiveDirectory authentication with their Git repositories.

Community collaboration

It's probably best to host open-source projects on a public repository services such as GitHub. That way you can get more traction and publicity.

How I do it

I have some really old public repositories on GitHub that I haven't used for years. I am planning to use it more in the future for my open source projects.

I host other important private projects and personal business prototypes on my home server. Although setting up a plain Git server is simple enough, I use Gogs as a frontend, which is pretty much similar to GitHub UI. Although the repositories are not accessible from the public internet, I can access my home server anytime through a VPN.

The company I am working for hosts some of the repositories on a popular cloud-based Git service, which - last time we checked - is GDPR compliant. Some of the repositories are still hosted on-premise due to several reasons.

How do you do it?

Where are your Git repositories? What are your considerations for private and business use-cases?

Top comments (0)