Forgejo Introduction - Forgejo as a GitHub Alternative

Status: Active
Last Updated: 2026-08-14
Category: CI/CD - Phase 2: Forgejo (Self-Hosted Git)
Prerequisites: Git basics, self-hosted-vs-cloud
Time: 1 hour
Tags: forgejo, gitea, self-hosted-git, git-forge, overview

Summary

Forgejo is a community-governed, lightweight, self-hosted Git forge β€” the "GitHub experience" running on hardware you control in roughly 500MB of RAM. This article explains what Forgejo is, where it came from (the Gitea fork), why it beats Gitea and GitLab for many self-hosters, and which use cases it fits best.

🎯 What You'll Learn

By the end of this article, you'll be able to:


What Is Forgejo?

Forgejo (pronounced /forˈdΝ‘Κ’e.jo/, "forge" in Esperanto) is a self-hosted software forge: Git repository hosting plus issues, pull requests, wiki, releases, organizations, and webhooks β€” everything you use GitHub for, served from your own machine.

The technical profile:

Language:        Go (single static binary)
License:         MIT + GPL v3 components β€” fully open source
Resources:       ~512MB RAM minimum, comfortable at 1GB
Storage:         Plain Git repositories on disk (nothing exotic)
Database:        SQLite (default), PostgreSQL, or MySQL/MariaDB
Integrations:    Webhooks, OAuth2 provider + consumer, container registry,
                 Actions-compatible CI runner, ActivityPub (federation)

What Happens under the hood: every repo is an ordinary bare Git directory on disk. You can git clone over HTTP or SSH; backups are literally file copies plus the database. There is no proprietary data format holding your history hostage.

The Backstory: The Gitea Fork

Understanding Forgejo requires one paragraph of history:

2014  Gogs β€” lightweight self-hosted Git service appears
2016  Gitea β€” community hard-fork of Gogs after stalled maintenance
2022  Gitea Ltd. (the company) is formed; trademark moves to a for-profit
      entity; cloud offering planned. Community worries about repeat of
      earlier open-core drift patterns seen elsewhere.
Oct 2022  Codeberg e.V. (the nonprofit behind codeberg.org) launches
      FORGEJO as a community fork of Gitea β€” governance placed under
      nonprofit democratic control from day one.
2023+  Forgejo gains its own runner (Actions-compatible), federation
      work, and ships independently while remaining largely compatible
      with Gitea's API and data model.

The fork wasn't about code quality β€” Gitea was fine. It was about who controls the project. Forgejo's answer: a nonprofit (Codeberg e.V.) with a general assembly, so no single company can relicense or de-open features.

Why Forgejo Over the Alternatives

vs Gitea

Dimension Forgejo Gitea
Governance Nonprofit (Codeberg e.V.), open decision process Gitea Ltd. (company-controlled trademark)
License risk Hard commitment to free licensing Same MIT today; governance is the differentiator
Built-in Actions runner Ships its own (forgejo-runner) Relies on external act_runner
Federation (ActivityPub) Active development priority Not prioritized
Compatibility API/data compatible with Gitea today β€”

Practically: they're near-twins today. Choose Forgejo if governance and long-term openness matter to you (they compound over years); choose Gitea if you have an existing investment there β€” migration between them is nearly trivial.

vs GitLab

Dimension Forgejo GitLab CE
RAM footprint 0.5–1GB 8GB+ recommended
Install complexity Single container Omnibus bundle: nginx, redis, postgres, sidekiq, gunicorn…
Upgrade path Bump image tag Follow versioned upgrade rails, sometimes stepwise
Features Focused core done well Huge suite (CI built-in, pages, registry, scanning, epics…)
Open-core boundary None β€” all MIT/GPL Proprietary tiers above CE; features move up over time

Rule of thumb: if you need GitLab's enterprise suite, run GitLab (or SaaS). If you need "GitHub but mine," Forgejo gives you that at 10% of the operational cost.

vs GitHub SaaS

Covered fully in self-hosted-vs-cloud: privacy, jurisdiction, fixed costs, learning value vs. marketplace breadth and zero ops.

Feature Tour: GitHub Concepts β†’ Forgejo Equivalents

You know it as (GitHub) Forgejo calls it Notes
Repository Repository Identical Git semantics; issues/PRs/wiki included
Organization Organization (+ nested teams) Team-based permission tiers
Pull Request Pull Request Also supports AGit workflow via git push options
Issue Issue Labels, milestones, assignments, dependencies
GitHub Actions workflows Forgejo Actions (.forgejo/workflows/ YAML) Compatible subset; runs via forgejo-runner. This course pairs it with Woodpecker instead
Container registry (ghcr.io) Built-in package/container registry Per-repo, OCI-compliant
Releases Releases Attach binaries, auto-generated notes from tags
Pages (via reverse proxy or Woodpecker artifact publishing) No first-class Pages yet β€” plan accordingly
Social following Limited user profiles Federation aims to change this

Use Cases

Where Forgejo shines βœ…

  1. Homelab / personal infrastructure repos β€” your dotfiles, compose stacks, IaC, and KB live together on your LAN.
  2. Small teams (2–50) wanting private hosting β€” orgs, teams, branch protection, and review workflows cover professional needs.
  3. Client/NDA work β€” code never leaves your jurisdiction or hardware.
  4. CI/CD learning labs β€” pairing Forgejo + Woodpecker (this course) teaches you how forges and runners actually talk.
  5. Mirror/aggregation point β€” native mirroring pulls from GitHub/GitLab on schedule.

Where it's the wrong tool ❌

Architecture Preview

Where Forgejo sits in the stack you'll build across this course:

                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
   git push ───────►│  Forgejo     :3000/:22      β”‚
                    β”‚  - repos on disk            β”‚
                    β”‚  - users/orgs/webhooks ─────┼──► webhook event ─┐
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                   β”‚
                                                                      β–Ό
                                       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                                       β”‚  Woodpecker server  :8000          β”‚
                                       β”‚  - reads .woodpecker.yml           β”‚
                                       β”‚  - queues pipeline runs            β”‚
                                       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                                       β–Ό
                                       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                                       β”‚  Woodpecker agent(s)               β”‚
                                       β”‚  - spawns build containers         β”‚
                                       β”‚  - pushes images to Harbor         β”‚
                                       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Forgejo is the source of truth and the webhook emitter; Woodpecker is the muscle. Installation begins in the next article.

πŸ› οΈ Troubleshooting & Common Issues

Pre-install questions that cause post-install regret:

Question gone wrong Consequence Get it right
Choosing MySQL "because familiar" Extra service to maintain for zero benefit at this scale SQLite until you truly need Postgres (multi-instance/high load)
Skipping domain/reverse-proxy planning Retrofitting HTTPS + SSH routing later means breaking remote URLs Decide DNS + TLS strategy before install (next article)
Assuming Actions workflows port 1:1 Marketplace actions don't exist; pipelines fail Prefer Woodpecker-native steps (this course's path)
Treating Forgejo like GitHub outage-wise Surprise when your ISP/router reboots = "GitHub down" Plan backups + monitoring like any infra (see monitoring-pipelines.md)

πŸ”— Related

Change Log

Next Steps / Ops Actions

Choose Theme

Your selection is saved locally.

Neural Cacophony
Aperture v2
Flux v1
Mosaic Chaos
Nexus v1
Nexus Zest
Prism v2
Synapse