Introduction
Forgejo is a community-governed fork of Gitea that provides a lightweight, self-hosted alternative to GitHub and GitLab. Written in Go, it compiles to a single binary with minimal resource requirements, making it suitable for everything from personal projects to organizational code hosting.
What Forgejo Does
- Hosts Git repositories with web-based browsing, blame, diff, and commit history views
- Provides pull request workflows with code review, inline comments, and merge strategies
- Includes an issue tracker with labels, milestones, projects, and Kanban boards
- Offers built-in CI/CD through Forgejo Actions, compatible with GitHub Actions workflow syntax
- Supports package registries for npm, Maven, PyPI, Docker, and other formats
Architecture Overview
Forgejo is a monolithic Go application that embeds its own web server, Git operations handler, and task runner. It stores data in SQLite, PostgreSQL, or MySQL, and repositories on the local filesystem or S3-compatible object storage. The web UI is server-rendered with progressive enhancement via JavaScript. Forgejo Actions runs workflows using a distributed runner architecture where runners register with the server and execute jobs in containers.
Self-Hosting & Configuration
- Run as a single binary, Docker container, or via distribution packages for Linux
- Configure via app.ini covering database, mail, repository storage, and security settings
- Enable Forgejo Actions by deploying one or more runners and registering them with your instance
- Set up external authentication via LDAP, OAuth2, or SMTP for enterprise directory integration
- Configure webhook integrations with Slack, Discord, Matrix, or custom HTTP endpoints
Key Features
- Single binary deployment with SQLite support for zero-dependency installations
- GitHub Actions-compatible CI/CD workflows via Forgejo Actions and distributed runners
- Federation support through ActivityPub for cross-instance repository discovery
- Built-in package registry supporting Docker, npm, PyPI, Cargo, Maven, and more
- Comprehensive API compatible with Gitea and partially with GitHub, enabling migration tools
Comparison with Similar Tools
- Gitea — upstream project, commercially governed; Forgejo prioritizes community control
- GitLab — full DevOps platform with heavier resource requirements and more features
- Gogs — original lightweight Go forge, less actively developed than Forgejo
- GitHub — cloud-hosted, not self-hostable, proprietary
- OneDev — Java-based self-hosted forge with built-in CI, smaller community
FAQ
Q: How does Forgejo differ from Gitea? A: Forgejo is a hard fork governed by a non-profit community, not a single company. It focuses on software freedom, federation, and preventing vendor lock-in while maintaining compatibility with Gitea's API and data formats.
Q: Can I migrate from GitHub or GitLab to Forgejo? A: Yes. Forgejo includes built-in migration tools that import repositories, issues, pull requests, labels, milestones, and releases from GitHub, GitLab, Gitea, and other platforms.
Q: What are the resource requirements? A: Forgejo runs comfortably on 512 MB RAM with SQLite for small installations. For teams of 50+, 1-2 GB RAM with PostgreSQL is recommended.
Q: Does Forgejo support federation? A: Federation through ActivityPub is under active development. Initial support allows cross-instance starring and repository discovery, with more features planned.