Why Are Developers Leaving GitHub? A Deep Dive into Codeberg and Self-Hosting Alternatives

Why developers are leaving GitHub, and how Codeberg and self-hosted Git alternatives compare.
Driven by data sovereignty concerns, AI training controversies, and platform centralization risks, more developers are moving to Codeberg or self-hosted Git platforms. This article explores the core reasons for leaving GitHub and compares alternatives like Codeberg, Gitea, and Forgejo to help you make an informed choice.
A Quiet Developer Migration Is Underway
Recently, the topic of "leaving GitHub" has been gaining traction across tech communities like Reddit. More and more developers are turning their attention to Codeberg, as well as self-hosted platforms built on open-source solutions like Gitea and Forgejo. This isn't a spur-of-the-moment complaint, but a deeper reflection on code hosting sovereignty, privacy protection, and open-source philosophy.

As the world's largest code hosting platform, GitHub has long been the default choice for developers—a massive community, a mature ecosystem, and convenient collaboration tools make it nearly flawless. However, as Microsoft completed its acquisition, controversies around AI training data continued to simmer, and commercialization strategies steadily advanced, some developers have started to seriously ask: Is it truly wise to entrust your code and digital identity entirely to a commercial giant?
Three Core Reasons Developers Are Leaving GitHub
1. Data Sovereignty and AI Training Controversies
The most direct trigger has been the code copyright and data usage controversy surrounding GitHub Copilot. Released in 2021 and powered by OpenAI's Codex model, Copilot was trained on hundreds of millions of public code repositories hosted on GitHub. This practice sparked ongoing legal and ethical debate—in 2022, the Software Freedom Conservancy (SFC) filed a class-action lawsuit against GitHub. The core allegations included: Copilot-generated code sometimes directly reproduced snippets from original repositories without attaching the original license declarations (such as GPL, MIT, etc.), potentially violating open-source license agreements. What deeply unsettled many developers was that the open-source code they contributed had, without explicit authorization, become training material for a commercial AI product. This event also directly prompted alternative projects like Forgejo to make "code will not be used for AI training" a core commitment. For developers committed to the open-source spirit, this crossed a line they were unwilling to compromise on.
2. Lock-In Risks from Platform Centralization
Since GitHub's acquisition by Microsoft, its commercial nature has become increasingly prominent. Developers worry that over-reliance on a single platform could lead to "vendor lock-in": once the platform changes its policies, suspends services, or restricts access for geopolitical reasons, users become entirely powerless.
In fact, this concern already has concrete historical precedent. In 2019, in compliance with U.S. export control regulations, GitHub restricted developers in regions such as Cuba, Iran, Syria, and Crimea from accessing private repositories and certain features—even open-source project contributors were not spared. The subsequent restrictions imposed by multiple cloud service platforms on accounts from specific regions during the Russia-Ukraine conflict further heightened global developers' vigilance about the "politicization of code infrastructure." It's worth noting that migrating Git repositories themselves is not complicated (the Git protocol is inherently distributed). What truly creates lock-in is the proprietary ecosystem built around GitHub—Actions CI/CD pipelines, Issues data, Projects boards, and so on. The migration cost of this data far exceeds that of the code itself.
3. Commitment to Open-Source Philosophy
For many developers who choose to migrate, the driving force is not technical dissatisfaction but a divergence in values. They believe that infrastructure like code hosting should be controlled independently by the community, rather than being subject to the profit-driven logic of commercial companies. It is precisely this philosophical conviction that drives them to seek alternatives that are truly "open source all the way down."
Codeberg: A Non-Profit-Driven Open-Source Code Hosting Platform
Codeberg is one of the most talked-about destinations in this wave of migration. Operated by the German non-profit organization Codeberg e.V., its key features include:
- Non-profit nature: Not driven by profit, it sustains operations through donations and membership fees, fundamentally avoiding the erosion of user interests by commercialization pressures.
- Fully open source: Built on Forgejo (a community fork of Gitea), its tech stack is entirely transparent and auditable.
- Privacy-friendly: It does not commercialize user data, nor does it use code to train AI models.
- Community governance: The platform's direction is decided jointly by its members.
Understanding Codeberg's underlying technology requires knowing the background of Forgejo's creation. In late 2022, the core development team of Gitea transferred control of the project to a newly established commercial company, Gitea Ltd, sparking strong community concerns about its commercial trajectory. Some core contributors then launched the Forgejo fork and placed it under the oversight of the Software Freedom Conservancy, operating it on a non-profit, community-governed basis. Codeberg subsequently migrated from Gitea to Forgejo as its underlying engine. Intriguingly, this very event confirms the core tension discussed in this article—even open-source tools can face commercialization governance dilemmas similar to GitHub's.
For developers who value transparency and data sovereignty, Codeberg offers a hosting environment "free of commercial calculation." Of course, in terms of platform scale, CI/CD capabilities, and ecosystem maturity, it still lags considerably behind GitHub.
Self-Hosting: The Freedom—and Cost—of Controlling Everything
Beyond migrating to Codeberg, another path is complete self-hosting. Open-source software like Gitea, Forgejo, and GitLab CE allows developers to set up a full code hosting environment on their own servers.
Core Advantages of Self-Hosting
- Absolute data control: Code, issues, and CI pipelines are all stored on infrastructure you control, with no need to trust any third party.
- Highly customizable: It can be deeply configured to meet team needs, without being restricted by platform features or policies.
- Zero external dependencies: No need to worry about policy changes or service interruptions from third-party platforms.
The Real-World Barriers of Self-Hosting
However, self-hosting is by no means without cost:
- Non-negligible operational overhead: You must handle server maintenance, security updates, data backups, and more on your own.
- Availability challenges: The stability and disaster recovery capabilities of a single-point deployment are hard to match against those of large cloud platforms.
- Missing collaboration ecosystem: You lose GitHub's network effect of "the world's developers gathered in one place," which noticeably impacts the visibility of open-source projects and the ability to attract contributors.
A Rational Perspective on This Migration
It should be objectively noted that "escaping GitHub" remains a relatively niche phenomenon, concentrated mainly among developers who strongly identify with open-source philosophy or are extremely privacy-sensitive. For the vast majority of teams and individuals, GitHub's ecosystem depth, collaboration experience, and AI toolchain still hold an appeal that is hard to replace.
The true value of this discussion lies in the reminder it sends to the entire industry: as critical infrastructure of the software world, code hosting carries centralization risks that deserve ongoing attention. The fact that developers have more diverse choices is itself a sign of a healthy ecosystem. The rise of Codeberg and self-hosting solutions may not shake GitHub's dominant position, but they give the community the ability to "vote with their feet," and objectively serve as a check on the behavioral boundaries of platform giants.
How to Choose the Right Code Hosting Solution for You?
For the average developer, there's no one-size-fits-all answer on whether to migrate. The key is to clarify your own core needs:
- Seeking top-tier collaboration and ecosystem integration: GitHub remains the undisputed first choice.
- Prioritizing data sovereignty and open-source purity: Codeberg is worth serious consideration.
- Having operational expertise and desiring complete control: A self-hosted solution based on Gitea or Forgejo offers ultimate freedom.
Perhaps a diverse coexistence is the most ideal future direction for the code hosting ecosystem.
Key Takeaways
Related articles

From Chat to Agent: Automating Your Entire Business Workflow with AI Agents
Veteran AI practitioner Remy breaks down the leap from chat models to AI agents: how agents work, the three pillars of context, tools, and skills, MCP connections, and hands-on architecture to make you a 100x employee.

Understand Anything: The AI Skill That Turns Code into Interactive Knowledge Graphs
Understand Anything is a high-star open-source GitHub skill that runs static analysis on any codebase and generates interactive knowledge graphs. It supports Claude Code, Cursor, Copilot and other agents, letting engineers ask questions in natural language with path references.

Kimi K3 Released: How a 2.8 Trillion Parameter Open Model Reshapes AI Cost-Effectiveness
Moonshot AI unveils Kimi K3: a 2.8 trillion parameter, 1M context, natively multimodal open model. With KDA architecture and ultra-low cost, it rivals GPT-5.6 and Fable 5, redefining AI cost-effectiveness.