Docs / Self-Hosted Applications / How to Self-Host Forgejo as a GitHub Alternative

How to Self-Host Forgejo as a GitHub Alternative

By Admin · Mar 1, 2026 · Updated Apr 25, 2026 · 31 views · 1 min read

What Is Forgejo?

Forgejo is a community fork of Gitea, providing a lightweight, self-hosted Git forge. It includes repository hosting, issue tracking, pull requests, and CI/CD — all with minimal resource usage.

Requirements

  • A Breeze with at least 512 MB RAM
  • Docker and Docker Compose

Docker Compose Setup

mkdir -p /opt/forgejo && cd /opt/forgejo
cat > docker-compose.yml <<'EOF'
services:
  forgejo:
    image: codeberg.org/forgejo/forgejo:latest
    restart: unless-stopped
    ports:
      - "3000:3000"
      - "2222:22"
    environment:
      - USER_UID=1000
      - USER_GID=1000
    volumes:
      - forgejo-data:/data
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro

volumes:
  forgejo-data:
EOF

docker compose up -d

Initial Setup

Visit http://your-server:3000 and complete the installation wizard. Choose SQLite for small teams or PostgreSQL for larger deployments.

Features

  • Git repository hosting with web interface
  • Issue tracking and project boards
  • Pull requests with code review
  • Built-in CI/CD (Forgejo Actions, compatible with GitHub Actions)
  • Package registry
  • Wiki per repository
  • Organizations and teams
  • Webhook integrations
  • Lightweight and fast

Forgejo vs Gitea

  • Forgejo is community-governed (no corporate influence)
  • Same core features and UI
  • Compatible with Gitea migrations

Was this article helpful?