GitHub Is Putting Ads in Your Code — Here's How to Self-Host Your Own Git Server
BLOG 9 min read fordnox

GitHub Is Putting Ads in Your Code — Here's How to Self-Host Your Own Git Server

GitHub Copilot injected ads into pull requests. If that's your line in the sand, here's how to move to a self-hosted Git platform on your own VPS — and why it's easier than you think.


Last week, GitHub crossed a line that many developers didn’t know existed.

GitHub Copilot started injecting advertisements directly into pull requests. Not in a sidebar. Not in a banner. Inside your actual code review workflow — edited into PR descriptions as if you wrote them.

Australian developer Zach Manson discovered it first. A coworker asked Copilot to fix a typo in a PR, and Copilot helpfully added a Raycast advertisement alongside the fix. Over 11,400 pull requests were found with the same injected “tip” across GitHub.

GitHub eventually backed down after massive backlash, calling it a “programming logic issue.” But the damage was done. The trust is broken.

If you’re reconsidering where your code lives, you’re not alone. Here’s why self-hosting your Git server makes more sense than ever — and how to do it on a VPS for less than your GitHub subscription costs.

Why Developers Are Leaving GitHub

Why Developers Are Leaving GitHub

Why This Matters More Than “Just Ads”

The Copilot PR ads incident isn’t an isolated event. It’s part of a pattern:

The direction is clear: your code is Microsoft’s product now. Every commit, every PR, every issue — it all feeds the machine. And now that machine is literally putting words in your mouth.

The Self-Hosted Git Alternatives

You don’t need GitHub. In fact, the self-hosted Git ecosystem has matured significantly. Here are the best options you can run on your own VPS:

Self-Hosted Git Platforms Compared

Self-Hosted Git Platforms Compared

1. Forgejo — The Community-First Choice

Forgejo is a community-driven fork of Gitea that prioritizes user freedom. It’s lightweight, fast, and runs beautifully on minimal hardware.

Why Forgejo:

Minimum VPS specs: 1 CPU, 1 GB RAM, 20 GB storage

2. Gitea — The Proven Lightweight Option

Gitea is the original lightweight Git platform. If you want something battle-tested with a massive plugin ecosystem, Gitea delivers.

Why Gitea:

Minimum VPS specs: 1 CPU, 1 GB RAM, 20 GB storage

3. GitLab CE — The Enterprise-Grade Option

GitLab Community Edition is the heavyweight. If you need built-in CI/CD, container registry, security scanning, and more — GitLab CE gives you everything GitHub offers and then some.

Why GitLab CE:

Minimum VPS specs: 4 CPU, 4 GB RAM, 40 GB storage (GitLab is hungry)

4. OneDev — The Underdog

OneDev is less known but surprisingly capable. It ships with built-in CI/CD, code search, and a clean interface.

Why OneDev:

Minimum VPS specs: 2 CPU, 2 GB RAM, 20 GB storage

Quick Comparison

FeatureForgejoGiteaGitLab CEOneDev
Min RAM1 GB1 GB4 GB2 GB
CI/CD✅ Actions✅ Actions✅ Built-in✅ Built-in
Container Registry
GitHub Migration
Federation
LicenseMITMITMIT (CE)MIT
Setup Time5 min5 min30 min10 min
Best ForMost peopleMost peopleTeams/EnterpriseSmall teams

Best VPS Providers for Self-Hosted Git

You don’t need an expensive server. A basic VPS handles Git hosting for most individuals and small teams perfectly.

Setting Up Your Own Git Server

Setting Up Your Own Git Server

For Forgejo/Gitea (Lightweight)

These platforms run great on the cheapest VPS plans:

Hostinger — Starting at $4.99/month for 1 vCPU, 4 GB RAM. Best bang for buck, and way more power than Forgejo needs. Their VPS plans include free backups and a clean control panel.

Hetzner — CX22 at €4.35/month gives you 2 vCPU, 4 GB RAM. Hard to beat on price/performance in Europe.

Vultr — $6/month for 1 vCPU, 1 GB RAM. 32 global locations. Great if you want a server close to your team.

For GitLab CE (Heavier)

GitLab needs more muscle:

Hostinger — KVM 4 plan at $12.99/month for 4 vCPU, 8 GB RAM. Plenty of headroom for GitLab plus CI runners.

Hetzner — CX32 at €7.59/month for 4 vCPU, 8 GB RAM. Best value for GitLab in Europe.

Contabo — Known for aggressive specs at low prices, though performance can vary.

How to Migrate from GitHub

All four platforms support direct GitHub migration. Here’s the general flow:

1. Set Up Your VPS

Spin up a VPS with Hostinger or your preferred provider. Install your chosen platform — for Forgejo, it’s literally:

# Using Docker (easiest)
docker run -d --name forgejo \
  -p 3000:3000 -p 222:22 \
  -v /data/forgejo:/data \
  codeberg.org/forgejo/forgejo:latest

2. Import Your Repositories

Every platform has a “Migrate Repository” feature. Point it at your GitHub repos and it pulls everything — code, issues, PRs, labels, milestones, and wiki.

In Forgejo/Gitea:

  1. Click ”+”“New Migration”
  2. Select GitHub as source
  3. Enter your GitHub token and repo URL
  4. Choose what to import (code, issues, PRs, labels)
  5. Click Migrate

3. Update Your Remotes

On your local machine:

# Add new remote
git remote add self-hosted ssh://git@your-server.com:222/username/repo.git

# Push everything
git push self-hosted --all
git push self-hosted --tags

# Optional: replace origin entirely
git remote set-url origin ssh://git@your-server.com:222/username/repo.git

4. Set Up CI/CD

Both Forgejo and Gitea support GitHub Actions-compatible workflows. Your existing .github/workflows/ files will mostly work as-is. Just move them to .forgejo/workflows/ (or keep them in .github/workflows/ — both paths work).

5. Set Up Backups

This is the part people forget. Your code is now your responsibility:

# Simple cron backup
0 3 * * * tar czf /backups/forgejo-$(date +\%Y\%m\%d).tar.gz /data/forgejo/

Or use your VPS provider’s snapshot feature. Hostinger includes automatic weekly backups on all VPS plans.

The Cost Comparison

Let’s do the math:

OptionMonthly CostWhat You Get
GitHub Pro$4/month2 GB packages, advanced tools, Copilot putting ads in your PRs
GitHub Team$4/user/monthSame, but more of it
Self-hosted Forgejo~$5/month (VPS)Unlimited repos, unlimited users, total control, zero ads
Self-hosted GitLab CE~$8-13/month (VPS)Full DevOps platform, CI/CD, unlimited everything

For a solo developer or small team, self-hosting is the same price as GitHub — except you own everything and nobody injects ads into your workflow.

What You Lose (Being Honest)

Self-hosting isn’t all upside. Here’s what you give up:

The pragmatic approach: Mirror your public/open source repos on GitHub for visibility. Keep private repos on your self-hosted instance where you control the data.

Final Thought

GitHub putting advertisements in pull requests isn’t just annoying — it signals what your code means to Microsoft. It’s inventory. It’s engagement. It’s training data.

You don’t have to accept that. A $5 VPS, 10 minutes of setup, and you own your entire development workflow. No ads. No surprise policy changes. No AI training on your private code without consent.

Your code, your server, your rules.


Ready to self-host? Start with Hostinger VPS — best value for Git hosting with free backups included. Have your Forgejo instance running in under 10 minutes.

~/why-leave-github-self-hosted-git/get-started

Ready to get started?

Get the best VPS hosting deal today. Hostinger offers 4GB RAM VPS starting at just $4.99/mo.

Get Hostinger VPS — $4.99/mo

// up to 75% off + free domain included

// related topics

self-hosted git github alternative gitea vps forgejo self-hosted gitlab self-hosted leave github github copilot ads self-hosted git server github alternative self-hosted

// related guides

Andrius Putna

Andrius Putna

I am Andrius Putna. Geek. Since early 2000 in love tinkering with web technologies. Now AI. Bridging business and technology to drive meaningful impact. Combining expertise in customer experience, technology, and business strategy to deliver valuable insights. Father, open-source contributor, investor, 2xIronman, MBA graduate.

// last updated: March 31, 2026. Disclosure: This article may contain affiliate links.