TL;DR: Codeberg is a free, non-profit alternative to GitHub that doesn't train AI on your code, doesn't track you, and is governed by its community. Developers are migrating there in growing numbers — Codeberg now hosts 465,000+ repositories from nearly 300,000 users. You can migrate your entire GitHub repo (code, issues, wiki, releases) in under 5 minutes using Codeberg's built-in tool. Your AI coding tools (Claude Code, Cursor, Windsurf) all work with Codeberg since it uses standard Git. The main things you lose are GitHub Actions and GitHub Copilot integration.

Why AI Coders Need to Know About This

Here's a question that's probably never crossed your mind: who owns the platform where all your code lives?

If you're building with AI tools — Cursor, Claude Code, Windsurf — your code almost certainly lives on GitHub. That's because when you ask AI to set up a project, the first thing it does is git init followed by instructions to push to GitHub. It's the default. It's baked into every tutorial, every template, every AI suggestion.

But GitHub is owned by Microsoft. And in recent years, a growing number of developers have started questioning what that means — especially after GitHub used public repositories to train Copilot without explicit permission from code authors. That controversy hasn't gone away. It's gotten louder.

Right now, a post about migrating from GitHub to Codeberg is trending on Hacker News with 275+ points. This isn't a fringe opinion anymore. It's a movement with real momentum, and understanding it matters even if you decide to stay on GitHub.

As a vibe coder, you need to understand your options. Your Git repositories are portable — that's the entire point of distributed version control. You're not locked in. Knowing that changes how you think about where your code lives.

What Is Codeberg?

Codeberg is a free Git hosting platform run by a non-profit organization called Codeberg e.V., registered in Berlin, Germany. Think of it as "GitHub, but run by a community instead of a corporation."

Here's what makes it different:

🏛️ Non-Profit Governance

Codeberg e.V. is a registered non-profit with 1,300+ voting members. Decisions are made by the community, not a board optimizing for shareholder returns. No investors, no IPO pressure, no pivot-to-monetization risk.

🔒 No Tracking, No AI Training

No third-party cookies. No analytics tracking. No using your code to train AI models. Your code stays your code. Period. This is the single biggest reason developers are moving.

🌍 European Hosting

Servers are in the EU, subject to GDPR and European data protection laws. For developers who care about data sovereignty — or whose clients require it — this matters enormously.

⚙️ Powered by Forgejo

Codeberg runs on Forgejo, a community fork of Gitea. It's open-source Git hosting software, which means the platform itself is transparent and auditable. You can inspect the code that runs Codeberg.

465K+
repositories hosted on Codeberg across nearly 300,000 users — and growing rapidly as developers seek GitHub alternatives.
— Codeberg.org, March 2026

The interface will feel familiar if you've used GitHub. You get repositories, issues, pull requests (called "pull requests" on Codeberg too), a wiki, releases, and organizations. It's not identical — some features are simpler, some are missing — but the core workflow is the same: push code, track issues, collaborate.

Why Developers Are Leaving GitHub

This isn't about GitHub being bad. GitHub is an incredible platform that fundamentally changed how software is built. But several compounding factors have pushed developers toward alternatives:

1. The Copilot Training Controversy

In 2021, GitHub launched Copilot — an AI coding assistant trained on public GitHub repositories. The problem: many developers felt their open-source code was used without meaningful consent. Codeberg explicitly does not use your code for AI training. For developers who've spent years contributing to open source, this distinction is personal.

2. Microsoft Ownership Concerns

Microsoft acquired GitHub in 2018 for $7.5 billion. While GitHub has continued to operate semi-independently, the reality is that a trillion-dollar corporation owns the platform where most of the world's open-source code lives. Some developers see this as an unacceptable concentration of power, regardless of how benevolent the current stewardship may be.

3. Terms of Service Changes

GitHub's terms of service grant broad rights to hosted content for the purpose of operating the service. While this is standard for hosted platforms, Codeberg's non-profit structure and explicit privacy commitments offer a fundamentally different legal relationship with your code.

4. Philosophical Alignment

For many open-source developers, hosting free software on a proprietary platform owned by a mega-corporation feels contradictory. Codeberg, built on open-source Forgejo software and governed by a non-profit, aligns more closely with open-source values.

5. Centralization Risk

When one platform hosts the vast majority of the world's code, it becomes a single point of failure — technically, politically, and legally. Diversifying where code lives makes the ecosystem more resilient. This argument resonates especially with infrastructure-minded developers.

💡 The Nuanced Take

Most developers migrating to Codeberg aren't "anti-GitHub." They're pro-choice. They want their code on a platform whose incentives align with their values. You can use both — many developers mirror repos across GitHub and Codeberg. This isn't all-or-nothing.

Real Scenario: Your First Migration

Let's say you've been building a side project with Claude Code. It's a simple web app — maybe 15 files, a handful of issues you've been tracking on GitHub, and a wiki page with setup instructions. You want to move it to Codeberg without losing anything.

Here's exactly what happens:

🔄 Migration Scenario

What you have: A GitHub repo at github.com/yourname/my-web-app with code, 12 issues, 2 milestones, a wiki, and 3 releases.

What you want: The same repo on Codeberg at codeberg.org/yourname/my-web-app with everything preserved.

Time required: About 5 minutes for a typical project.


Step 1: Create a Codeberg account at codeberg.org

Step 2: Generate a GitHub personal access token (Settings → Developer Settings → Personal access tokens → Fine-grained tokens) with repo read access

Step 3: On Codeberg, click the + icon → New Migration

Step 4: Select GitHub as the source, paste your repo URL and access token

Step 5: Check the boxes for what you want to migrate: Issues ✓, Labels ✓, Milestones ✓, Releases ✓, Wiki ✓

Step 6: Click Migrate Repository and wait

Result: Your full repo — code, commit history, issues, wiki, releases — is now on Codeberg. All issue numbers are preserved. Wiki pages are intact.

That's it. No command-line gymnastics. No exporting and importing JSON files. Codeberg's migration tool handles it because it has native GitHub integration built in. It communicates directly with GitHub's API to pull everything over.

What AI Gets Wrong About Git Hosting

When you ask AI tools about Git hosting, they overwhelmingly default to GitHub. This isn't malice — it's training data bias. Here's what AI commonly gets wrong or omits:

"Just push to GitHub"

When you ask Claude or ChatGPT to help you set up a Git repository, the instructions will almost always end with "push to GitHub." AI tools rarely mention Codeberg, Gitea, Forgejo, SourceHut, or any alternative. This is because the vast majority of tutorials, documentation, and Stack Overflow answers in their training data reference GitHub.

What to do: When you get instructions that reference GitHub, mentally replace "GitHub" with "your Git host." The Git commands themselves — git add, git commit, git push — work identically regardless of where your remote repository lives.

"Use GitHub Actions for CI/CD"

AI will frequently suggest GitHub Actions for automated testing and deployment. GitHub Actions is GitHub-specific — it won't work on Codeberg. Codeberg supports Woodpecker CI and can integrate with other CI/CD platforms.

What to do: If your AI suggests a GitHub Actions workflow, ask it to adapt the same pipeline for Woodpecker CI or a generic CI system instead.

"Store your API keys in GitHub Secrets"

AI tools often recommend GitHub Secrets for storing API keys and sensitive configuration. This is GitHub-specific. On Codeberg, you'd use Woodpecker CI secrets or environment variables in your deployment pipeline.

What to do: The principle of never committing secrets to your repository is universal. Read our guide on API key management — the concepts apply regardless of your hosting platform.

Step-by-Step: Full Migration Guide

Here's the complete process for moving a repository from GitHub to Codeberg, including updating your local development environment.

Step 1: Create Your Codeberg Account

Go to codeberg.org and register. Use the same username as your GitHub account if it's available — this makes the transition smoother for anyone who follows your work.

Step 2: Generate a GitHub Access Token

You need this so Codeberg can read your GitHub repos during migration.

# Go to: github.com/settings/tokens
# Click "Generate new token" → "Fine-grained token"
# Set these permissions:
#   - Repository access: Select the repos you want to migrate
#   - Permissions → Repository:
#     - Contents: Read-only
#     - Issues: Read-only
#     - Metadata: Read-only
# Copy the token — you'll only see it once
🔑 Security Tip

Use a fine-grained token with the minimum permissions needed, scoped only to the repos you're migrating. Delete the token immediately after migration is complete. Never give a migration tool full account access. See our full guide on API key management.

Step 3: Run the Migration on Codeberg

On Codeberg, click the + button in the top-right corner, then select New Migration. Select GitHub as your source platform.

Fill in:

  • Clone URL: The full URL of your GitHub repo (e.g., https://github.com/yourname/my-project)
  • Access Token: Paste the token you generated in Step 2
  • Repository Name: Keep it the same as on GitHub for consistency
  • Visibility: Public or Private — your choice
  • Migration Items: Check everything you want to bring over — issues, labels, milestones, releases, wiki

Click Migrate Repository. For a typical project, this takes 30 seconds to a few minutes depending on size.

Step 4: Update Your Local Git Remote

After migration, your local copy still points to GitHub. You need to update it to point to Codeberg:

# See your current remote (it will say github.com)
git remote -v

# Option A: Replace GitHub with Codeberg entirely
git remote set-url origin https://codeberg.org/yourname/my-project.git

# Option B: Keep both (push to Codeberg, keep GitHub as a mirror)
git remote set-url origin https://codeberg.org/yourname/my-project.git
git remote set-url --push --add origin https://github.com/yourname/my-project.git
git remote set-url --push --add origin https://codeberg.org/yourname/my-project.git

# Verify the change
git remote -v
# origin  https://codeberg.org/yourname/my-project.git (fetch)
# origin  https://codeberg.org/yourname/my-project.git (push)

Step 5: Set Up SSH Keys for Codeberg

If you use SSH for Git (and you should), you'll need to add your SSH key to Codeberg:

# Check if you already have an SSH key
ls ~/.ssh/id_ed25519.pub

# If not, generate one
ssh-keygen -t ed25519 -C "your-email@example.com"

# Copy your public key
cat ~/.ssh/id_ed25519.pub
# Copy the output

Go to Codeberg → Settings → SSH/GPG Keys → Add Key. Paste your public key. Now you can use SSH URLs:

# Switch your remote to SSH
git remote set-url origin git@codeberg.org:yourname/my-project.git

# Test the connection
ssh -T git@codeberg.org
# Hi yourname! You've successfully authenticated.

Step 6: Archive Your GitHub Repo (Optional)

If you want to signal that development has moved to Codeberg:

  • Go to your GitHub repo → Settings → scroll to "Danger Zone"
  • Click "Archive this repository"
  • Update the repo description to: "⚠️ Moved to codeberg.org/yourname/my-project"
  • Add a note to the README pointing to the new location

What Changes for Your AI Workflow

This is the section that matters most for vibe coders. When you move from GitHub to Codeberg, what actually changes in your day-to-day AI-assisted development?

✅ What Stays the Same

  • All Git commands: git add, git commit, git push, git pull, git branch — everything works identically. Git is Git, regardless of the remote host.
  • Claude Code / Cursor / Windsurf: These tools work with local Git repos. They don't care where the remote is. Your AI coding experience is unchanged.
  • VS Code integration: The built-in Git support in VS Code works with any Git remote. Codeberg repos work out of the box.
  • Terminal workflows: If you work in the terminal, absolutely nothing changes in how you interact with your code.
  • Branching, merging, PRs: Codeberg supports pull requests with the same review workflow as GitHub.

⚠️ What Changes

  • GitHub Actions → Woodpecker CI: This is the biggest change. GitHub Actions workflows don't transfer. You'll need to set up CI/CD using Woodpecker CI or an external service. The concepts are the same, but the configuration format is different.
  • GitHub Copilot: If you use Copilot, it's GitHub-specific. On Codeberg, you'd use alternatives like Claude Code, Cursor, or Windsurf — which work with any Git host and are likely what you're already using as a vibe coder.
  • GitHub Pages: For static site hosting, Codeberg offers Codeberg Pages — push to a pages branch and your site is live at yourname.codeberg.page.
  • AI default suggestions: When you ask AI to set up deployment or CI, it will default to GitHub. You'll need to specify: "I use Codeberg, not GitHub. Suggest Codeberg-compatible alternatives."
  • Package registries: GitHub Packages (npm, Docker, etc.) won't be available. Codeberg has a built-in package registry for common formats, or you use external registries.
  • Community size: GitHub has 100M+ users. Codeberg has ~300K. Your open-source project may get less visibility on Codeberg — though many developers maintain a GitHub mirror for discoverability.
💬 Prompt for Your AI Tool

When working with Claude Code or Cursor on a Codeberg-hosted project, add this to your system context or project instructions:

My code is hosted on Codeberg (codeberg.org), not GitHub.
When suggesting CI/CD, use Woodpecker CI instead of GitHub Actions.
When suggesting hosting, use Codeberg Pages instead of GitHub Pages.
When suggesting remote URLs, use codeberg.org instead of github.com.
Do not suggest GitHub-specific features like GitHub Copilot or GitHub Secrets.

This eliminates the constant "just use GitHub Actions" suggestions and keeps your AI's output relevant to your actual setup.

Mirroring: The Best of Both Worlds

You don't have to choose one platform exclusively. Many developers use Codeberg as their primary host while maintaining a read-only mirror on GitHub for visibility. Here's how to set that up:

# Set up dual push (pushes to both on every git push)
git remote set-url --push --add origin git@codeberg.org:yourname/my-project.git
git remote set-url --push --add origin git@github.com:yourname/my-project.git

# Now when you push:
git push origin main
# → Pushes to codeberg.org AND github.com simultaneously

# Verify your setup
git remote -v
# origin  git@codeberg.org:yourname/my-project.git (fetch)
# origin  git@codeberg.org:yourname/my-project.git (push)
# origin  git@github.com:yourname/my-project.git (push)

This way, your Codeberg repo is the source of truth, but anyone searching GitHub can still find your project and get directed to where active development happens.

When to Stay on GitHub

Honest assessment: migrating isn't right for everyone. Here are legitimate reasons to stay on GitHub:

  • Your team uses GitHub extensively: If you collaborate with people deeply invested in the GitHub ecosystem (Actions, Projects, Discussions), switching has a real coordination cost.
  • You depend on GitHub-specific integrations: Vercel, Netlify, Railway, and many deployment platforms have first-class GitHub integration. Codeberg support varies.
  • Open-source discoverability matters: If you're trying to grow an open-source project, GitHub's 100M+ user base provides significantly more exposure than Codeberg's 300K.
  • You use GitHub Copilot heavily: Copilot is tied to GitHub. If it's central to your workflow, migrating means replacing it — though tools like OpenRouter give you access to multiple AI models that serve similar purposes.

There's no shame in staying on GitHub while acknowledging the tradeoffs. The point is to make an informed choice rather than accepting the default because it's what AI always suggests.

What to Learn Next

Frequently Asked Questions

Is Codeberg free?

Yes. Codeberg is 100% free for public and private repositories. It's run by Codeberg e.V., a registered non-profit based in Berlin, Germany. There are no paid tiers, no premium features locked behind a paywall, and no ads. It's funded entirely by donations and membership dues from its community. You can become a member to support the project, but it's completely optional.

Will my AI coding tools work with Codeberg?

Yes, with minor adjustments. Codeberg uses standard Git, so any tool that works with Git repositories works with Codeberg. Claude Code, Cursor, and Windsurf all function normally because they interact with your local Git repo, not directly with the hosting platform. The main difference is that GitHub-specific features — GitHub Actions, GitHub Copilot, GitHub Secrets — won't carry over. You'll need Codeberg-compatible alternatives like Woodpecker CI for automation.

Can I migrate my issues, pull requests, and wiki from GitHub?

Yes. Codeberg's built-in migration tool can import your repository code, issues, labels, milestones, releases, and wiki directly from GitHub. Pull requests are migrated as issues with their full discussion history preserved. You'll need a GitHub personal access token with repo read access to migrate private repos or metadata. The process takes a few minutes for most projects.

Do I have to delete my GitHub repos after migrating?

No. Many developers keep their GitHub repos as read-only mirrors while doing primary development on Codeberg. You can archive your GitHub repos (making them read-only), add a notice in the description pointing to the new Codeberg location, or maintain both as active mirrors using a dual-push Git remote configuration. There's no requirement to burn bridges.

Is Codeberg reliable enough for production projects?

Codeberg hosts over 465,000 repositories for nearly 300,000 users as of early 2026. It runs on Forgejo, a well-maintained community fork of Gitea. While it doesn't have the same scale or uptime SLAs as GitHub, it's stable and actively maintained by a dedicated team. For mission-critical production deployments, many developers use Codeberg as their primary host with a GitHub or self-hosted Git mirror as a backup — the beauty of distributed version control.