DEV Community

Elder Fernandes
Elder Fernandes

Posted on Originally published at selfhoststack-8z4.pages.dev

Self-Hosted Git & Code Collaboration in 2026: Forgejo vs Gitea vs GitLab CE vs OneDev

Self-Hosted Git & Code Collaboration in 2026: Forgejo vs Gitea vs GitLab CE vs OneDev

As GitHub Actions runner minutes multiply, private repository caps tighten, and proprietary AI scanners ingest your private codebase, many engineering teams and solo founders are reclaiming ownership of their source code.

Self-hosting your Git platform delivers unlimited private repositories, uncapped CI/CD build minutes on your own hardware, strict IP privacy, and complete zero-trust perimeter control.

In this benchmark, we evaluate the 4 leading self-hosted Git collaboration platforms in 2026: Forgejo, Gitea, GitLab Community Edition (CE), and OneDev.


2026 Feature & Resource Matrix

Feature Forgejo (v10+) Gitea (v1.22+) GitLab CE (v17+) OneDev (v11+)
Governance 100% Community-driven (Codeberg e.V.) Open-Core / For-profit Commercial Open-Core Enterprise Independent Open Source
Written In Go + SQLite / PostgreSQL Go + SQLite / PostgreSQL Ruby on Rails + Go + Sidekiq Java (Optimized JVM) + SQLite/PG
CI/CD Engine Built-in Forgejo Actions (act runner) Built-in Gitea Actions (act runner) GitLab CI / Auto DevOps Built-in Visual GUI Pipeline Builder
Min RAM (Idle) ~120 MB ~120 MB ~4,500 MB (4.5 GB) ~600 MB
Recommended VPS 1 vCPU, 1 GB RAM ($4/mo) 1 vCPU, 1 GB RAM ($4/mo) 4 vCPU, 8 GB RAM ($25+/mo) 2 vCPU, 2 GB RAM ($7/mo)
Package Registry Maven, npm, PyPI, OCI Docker, Cargo Maven, npm, PyPI, OCI Docker, Cargo Comprehensive Suite Maven, npm, PyPI, Docker, NuGet
Auth / SSO OIDC, OAuth2, LDAP, Passkeys OIDC, OAuth2, LDAP, Passkeys LDAP, SAML, OIDC LDAP, SAML, OIDC, GitHub

1. Forgejo: The Pure Open-Source Standard

Forked from Gitea by Codeberg and community maintainers in response to commercialization concerns, Forgejo has rapidly established itself as the gold standard for independent, non-profit software hosting.

Why Teams Choose Forgejo in 2026:

  • No Venture Capital or Feature Paywalls: Every feature, including package registries, kanban boards, and enterprise OIDC/SAML, is 100% free software.
  • GitHub Actions Compatibility: Forgejo Actions uses the act runner syntax, allowing you to run existing .github/workflows directly with near-zero migration friction.
  • Featherlight Footprint: Consumes less than 150 MB RAM on an entry-level $4/month Hetzner or DigitalOcean droplet while serving hundreds of repositories smoothly.

Production Docker Compose:

version: '3.8'

services:
  forgejo:
    image: codeberg.org/forgejo/forgejo:10
    container_name: forgejo_server
    restart: unless-stopped
    environment:
      - USER_UID=1000
      - USER_GID=1000
      - FORGEJO__database__DB_TYPE=postgres
      - FORGEJO__database__HOST=forgejo_db:5432
      - FORGEJO__database__NAME=forgejo
      - FORGEJO__database__USER=forgejo_user
      - FORGEJO__database__PASSWD=forgejo_secure_password_here
      - FORGEJO__server__DOMAIN=git.yourdomain.com
      - FORGEJO__server__ROOT_URL=https://git.yourdomain.com
      - FORGEJO__server__SSH_PORT=2222
      - FORGEJO__server__SSH_LISTEN_PORT=2222
      - FORGEJO__actions__ENABLED=true
    volumes:
      - ./data/forgejo:/data
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    ports:
      - "3000:3000"
      - "2222:2222"
    depends_on:
      - forgejo_db
    networks:
      - git_network

  forgejo_db:
    image: postgres:17-alpine
    container_name: forgejo_db
    restart: unless-stopped
    environment:
      - POSTGRES_DB=forgejo
      - POSTGRES_USER=forgejo_user
      - POSTGRES_PASSWORD=forgejo_secure_password_here
    volumes:
      - ./data/postgres:/var/lib/postgresql/data
    networks:
      - git_network

  forgejo_runner:
    image: code.forgejo.org/forgejo/runner:latest
    container_name: forgejo_ci_runner
    restart: unless-stopped
    environment:
      - FORGEJO_INSTANCE=http://forgejo:3000
      - FORGEJO_RUNNER_REGISTRATION_TOKEN=runner_token_from_admin_panel
      - FORGEJO_RUNNER_NAME=vps-worker-01
      - FORGEJO_RUNNER_CAPACITIES=docker:docker://node:22-bullseye,docker:docker://golang:1.24
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    depends_on:
      - forgejo
    networks:
      - git_network

networks:
  git_network:
    driver: bridge
Enter fullscreen mode Exit fullscreen mode

2. OneDev: The Underrated Swiss Army Knife

If your team needs enterprise-grade visual pipelines, integrated Kanban, deep issue tracking, and code search with symbol navigation without paying the 8 GB RAM tax of GitLab, OneDev is an extraordinary contender.

Strengths:

  • Visual CI/CD Builder: Drag-and-drop build pipeline graph editor, plus code-as-configuration (.onedev-buildspec.yml).
  • Symbol & Code Search: Pre-indexes repositories for instant jump-to-definition and syntax-aware semantic search across commits.
  • Service Desk & Issue State Machine: Advanced custom fields, customizable workflow states, and automated issue triage.

3. GitLab CE: The Heavyweight Enterprise Suite

GitLab CE is a complete DevOps platform containing issue boards, merge requests, container registries, and deep security scanning tools.

The Catch:

  • Massive Resource Overhead: Requires a minimum of 4 vCPUs and 8 GB RAM to run stably with Sidekiq, Puma, Redis, Gitaly, and PostgreSQL.
  • Tier Splitting: Several advanced compliance, portfolio management, and multi-project pipeline features are locked behind high-tier GitLab Enterprise licenses ($29–$99/user/month).

Sizing & VPS Recommendations

  • Solo Dev / Small Squad (1–10 devs): Forgejo or Gitea on a Hetzner CX22 (2 vCPU, 4 GB RAM) for ~€3.79/month.
  • Medium Agency / Scaleup (10–50 devs with heavy CI): Forgejo with 2 dedicated CI worker nodes on Hetzner CAX31 (8 Ampere ARM vCPU, 16 GB RAM) for ~€15/month.
  • Full Enterprise Suite: GitLab CE on a dedicated 8-core, 32 GB RAM bare metal or VPS instance.

Looking for Production-Hardened Stacks?

Explore all 80+ open-source categories and benchmark comparisons on SelfHostStack.

If you want ready-to-deploy .env configurations, automated database backup scripts, TLS reverse proxy setups (Traefik/Caddy), and hardened production Docker Compose files:

👉 Download the Self-Hosted Starter Stack Pack ($29) — Save hundreds of engineering hours with curated, battle-tested templates.

Top comments (0)