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 This Matters More Than “Just Ads”
The Copilot PR ads incident isn’t an isolated event. It’s part of a pattern:
- March 2026: GitHub reversed its AI training policy, opting to train on user code after previously saying it wouldn’t
- March 2026: GitHub removed AI models from the free student plan, pushing students toward paid tiers
- September 2025: Developers complained about forced Copilot features they couldn’t disable
- June 2025: GitHub began enforcing premium request limits, pushing AI users to pricier tiers
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
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:
- Incredibly lightweight — runs on a $5/month VPS easily
- Full GitHub-like experience: issues, PRs, CI/CD (via Forgejo Actions)
- Active community governance (no corporate owner)
- Compatible with GitHub Actions workflows
- Federation support (connect with other instances)
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:
- Single binary — install in under 5 minutes
- Low resource usage (perfect for cheap VPS plans)
- Package registry, CI/CD, project boards
- Massive community and third-party integration support
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:
- Complete DevOps platform in one install
- Built-in CI/CD that rivals GitHub Actions
- Container registry, package registry, security dashboards
- Used by massive organizations self-hosted
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:
- Built-in CI/CD with Docker and Kubernetes support
- Symbol navigation and code search
- Kanban boards and time tracking
- Active development, regular releases
Minimum VPS specs: 2 CPU, 2 GB RAM, 20 GB storage
Quick Comparison
| Feature | Forgejo | Gitea | GitLab CE | OneDev |
|---|---|---|---|---|
| Min RAM | 1 GB | 1 GB | 4 GB | 2 GB |
| CI/CD | ✅ Actions | ✅ Actions | ✅ Built-in | ✅ Built-in |
| Container Registry | ✅ | ✅ | ✅ | ✅ |
| GitHub Migration | ✅ | ✅ | ✅ | ✅ |
| Federation | ✅ | ❌ | ❌ | ❌ |
| License | MIT | MIT | MIT (CE) | MIT |
| Setup Time | 5 min | 5 min | 30 min | 10 min |
| Best For | Most people | Most people | Teams/Enterprise | Small 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
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:
- Click ”+” → “New Migration”
- Select GitHub as source
- Enter your GitHub token and repo URL
- Choose what to import (code, issues, PRs, labels)
- 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:
| Option | Monthly Cost | What You Get |
|---|---|---|
| GitHub Pro | $4/month | 2 GB packages, advanced tools, Copilot putting ads in your PRs |
| GitHub Team | $4/user/month | Same, 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:
- Network effects — GitHub is where open source lives. If you maintain popular projects, you probably need to stay (or mirror there)
- GitHub Actions marketplace — Thousands of pre-built actions. Forgejo Actions are compatible but the ecosystem is smaller
- Copilot integration — If you actually use Copilot (without the ads), it’s tightly integrated with GitHub
- Zero maintenance — Self-hosting means updates, backups, and occasional troubleshooting are on you
- Social proof — Recruiters and hiring managers look at GitHub profiles
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.
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
// related guides
Best VPS for Gitea 2026: Self-Host Your Git Server
Find the best VPS for hosting Gitea. Compare specs, pricing, and performance to run your own lightweight Git server with CI/CD for a fraction of GitHub costs.
reviewBest VPS for GitLab 2026: Self-Host Your DevOps Platform
Find the best VPS for hosting GitLab. Compare providers, optimize performance, and run your own Git platform for a fraction of GitLab SaaS pricing.
blogSoftware Without Human-in-the-Loop: The SaaS Industry's Existential Crisis
I need someone to calm me down. AI agents are about to replace the human buyer (user). The entire SaaS industry is building dashboards, UIs, and workflows for a customer that's going extinct. IMHO Here's what comes next.
blogStart of the Personal Software Era: Why Everyone Is Building Their Own Apps in 2026
AI coding tools are enabling a new era of personal software — custom apps built by individuals for their own needs. Here's what it means for self-hosters, developers, and the future of software.
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.