DEV Community

Alex Spinov
Alex Spinov

Posted on

Gitea Has a Free Self-Hosted Git Service

Gitea is a free, open-source Git hosting solution that you can run on your own server. Think of it as a self-hosted GitHub/GitLab — lightweight and fast.

What Is Gitea?

Gitea is a painless, self-hosted Git service written in Go. It's one of the lightest-weight Git platforms available, running on minimal hardware.

Key features:

  • Repository hosting with web UI
  • Pull requests and code review
  • Issue tracking and project boards
  • CI/CD with Gitea Actions (GitHub Actions compatible!)
  • Package registry (npm, PyPI, Docker, Maven, etc.)
  • Wiki per repository
  • Organization and team management
  • OAuth2 and LDAP authentication
  • Mirrors from/to GitHub, GitLab
  • Webhooks
  • Runs on a Raspberry Pi

Quick Start

Docker

docker run -d \
  --name gitea \
  -p 3000:3000 \
  -p 222:22 \
  -v gitea-data:/data \
  gitea/gitea:latest
Enter fullscreen mode Exit fullscreen mode

Open http://localhost:3000. Complete setup wizard. Done.

Binary (any platform)

# Download
wget https://dl.gitea.com/gitea/1.22/gitea-1.22-linux-amd64
chmod +x gitea-1.22-linux-amd64

# Run
./gitea-1.22-linux-amd64 web
Enter fullscreen mode Exit fullscreen mode

Single binary. No dependencies. Works on Linux, macOS, Windows, ARM.

Gitea Actions (CI/CD)

Gitea Actions is compatible with GitHub Actions syntax:

# .gitea/workflows/ci.yaml
name: CI
on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
      - run: npm install
      - run: npm test
Enter fullscreen mode Exit fullscreen mode

Migrate your GitHub Actions workflows with minimal changes.

Package Registry

Gitea includes a built-in package registry:

# npm
npm publish --registry https://gitea.example.com/api/packages/org/npm/

# Docker
docker push gitea.example.com/org/myimage:latest

# PyPI
twine upload --repository-url https://gitea.example.com/api/packages/org/pypi -u user -p token dist/*
Enter fullscreen mode Exit fullscreen mode

Supports: npm, PyPI, Docker, Maven, NuGet, Cargo, Composer, Helm, and more.

Resource Usage

Platform RAM (idle) Disk Language
GitLab 4-8GB 2GB+ Ruby
Gogs 50-100MB 30MB Go
Gitea 100-200MB 50MB Go
GitHub N/A (SaaS) N/A N/A

Gitea runs comfortably on a $5/month VPS or even a Raspberry Pi.

Migration from GitHub/GitLab

Gitea can mirror or import repositories:

  1. Go to New Migration
  2. Enter GitHub/GitLab repo URL
  3. Select what to import: issues, labels, milestones, pull requests
  4. Click Migrate

All history, issues, and PRs preserved.

Gitea vs Alternatives

Feature GitHub Free GitLab CE Gitea
Self-host No Yes Yes
RAM usage N/A 4-8GB 100MB
CI/CD Yes Yes Yes
Package registry Yes Yes Yes
Private repos Unlimited Unlimited Unlimited
Actions compat N/A No Yes
Setup time 0 30+ min 2 min

Who Uses Gitea?

With 46K+ GitHub stars:

  • Teams wanting data sovereignty
  • Companies with air-gapped networks
  • Homelab enthusiasts
  • Organizations needing lightweight Git hosting
  • Schools and universities

Get Started

  1. Run Docker container or download binary
  2. Complete setup wizard
  3. Create your first repository
  4. Push code and set up CI/CD

Full GitHub-like experience on your own hardware.


Need to automate data collection for your repos? Check out my web scraping tools on Apify — scrape any website and store data automatically. Custom solutions: spinov001@gmail.com

Top comments (0)