Why the combination of Forgejo + EmpireGit's AI review engine is the best self-hosted Git stack in 2026 — and how to deploy it in under an hour.
Three years ago, self-hosting Git was mostly about cost. Today there are three distinct reasons teams choose self-hosted:
| Platform | Forgejo + EmpireGit | Gitea | GitLab CE | Gogs | GitHub Enterprise Server |
|---|---|---|---|---|---|
| License | MIT (Forgejo) + MIT | MIT | MIT (CE) / commercial (EE) | MIT | Commercial ($$$) |
| AI Code Review bundled | YES — webhook-native | No — you build it | No — CE has no Duo | No | GHES + Copilot ($$$) |
| BYO-LLM per-repo key | YES — AES-encrypted | No | No | No | No |
| RAM requirements | 256 MB (Forgejo) + 512 MB (review) | 256 MB | 4–8 GB | 128 MB | 32+ GB |
| CI/CD built-in | YES — Forgejo Actions | YES — Gitea Actions | YES — GitLab CI | No (external CI) | YES — GitHub Actions |
| GitHub Actions compatible | YES (Forgejo Actions) | YES (Gitea Actions) | Partial (different syntax) | No | YES |
| SAML / SCIM SSO | YES — via Authentik | Plugin required | YES (CE has basic) | No | YES |
| Immutable audit log | YES — Redis Stream | Basic admin log | YES (CE has basic) | No | YES |
| Docker Compose setup time | ~20 min | ~10 min | ~60 min | ~10 min | Days (VMware appliance) |
| Community / backing | EU gov-backed (2026-04), OSS | Large community, Gitea Ltd commercial | Large enterprise community | Small, slower updates | Microsoft |
Forgejo is a hard fork of Gitea created in December 2022 when the Gitea governance moved to a commercial entity (Gitea Ltd). Forgejo is governed by the Codeberg community non-profit. The Dutch government's decision in April 2026 to back Forgejo specifically was driven by its community governance — no single commercial entity controls the roadmap. Technically they are nearly identical; Forgejo is the sovereignty-safe choice.
GitLab CE is powerful but heavy — minimum 4 GB RAM in practice, often 8+ GB for a team. Forgejo runs on 256 MB. GitLab CE also lacks GitLab Duo (the AI features) — those are Enterprise only. For a team that wants self-hosted git + CI + AI review without the GitLab EE price tag, Forgejo + EmpireGit AI review is dramatically lighter and cheaper.
GHES requires VMware infrastructure, 32+ GB RAM, a license (~$21/user/mo minimum), and a separate Copilot license for AI features. Total cost easily exceeds $50/user/mo. Forgejo + EmpireGit AI review on a $50/mo VPS handles 50 developers. The 100x cost ratio is not an exaggeration.
Every self-hosted Git platform has the same gap: no built-in AI code review. Some teams solve this by:
EmpireGit AI Review fills this gap as a lightweight sidecar: a webhook-native Flask service (~500 LOC) that registers a Forgejo PR webhook, runs Semgrep OSS on changed files, routes findings through a multi-model LLM cascade (Groq → Cerebras → Gemini → Claude), and posts inline review comments back via the Forgejo API as a bot user.
If you are in healthcare, finance, government, or defense, you cannot send source code to a third-party LLM API. EmpireGit AI Review solves this with BYO-LLM: you provide your own Anthropic, OpenAI, or Groq API key per repository. The key is stored AES-encrypted (HKDF-derived per-repo key from a master key you control). The LLM review pass uses your key — your API account, your billing, your zero-training commitment. EmpireGit never sees code in plaintext if you use your own key.
The EU digital sovereignty story is becoming concrete, not theoretical:
Self-hosted Forgejo + EmpireGit, deployed in an EU datacenter (Hetzner Frankfurt, OVH Germany, Scaleway, etc.) with your own LLM key to a EU-region API endpoint, is fully air-gapped from US jurisdiction for code-at-rest and code-in-transit purposes. EmpireGit Enterprise adds SAML/SCIM via Authentik, immutable audit logs via Redis Stream (append-only), and SOC2-equivalent controls.
Deploy Forgejo + EmpireGit AI Review sidecar on any Linux server (minimum: 1 vCPU, 1 GB RAM, 20 GB storage). Oracle Cloud Always Free tier works.
Use the official Forgejo Docker image. Minimal compose config:
After first run, create an admin account via the web UI. Then create a bot user (e.g., ai-review-bot) and generate a token with write:repository and write:issue scopes.
Add the EmpireGit AI Review sidecar to your compose file. Set your Forgejo API token and a webhook secret:
In Forgejo repo settings → Webhooks → Add webhook. URL: https://yourdomain.com:5001/webhooks/forgejo/pr. Secret: your webhook secret. Events: Pull Request (opened, synchronized).
Open a PR with an obvious bug (e.g., eval(user_input) in Python). Within 15–30 seconds, the AI review bot should post an inline comment identifying the security issue.
If you don't want to manage the infrastructure yourself, EmpireGit SaaS provides everything above as a managed service:
For EU-sovereign managed hosting, the Enterprise tier deploys on EU-only infrastructure with no data processed in US regions. Contact us to discuss BAA and data processing agreements.