Skip to main content
πŸŽ“ Claude Code Masterclass Learn AI-assisted development on Udemy β€” plus the companion book on Leanpub & Amazon. Start Learning
Gitea: Lightweight Self-Hosted Git Server on Kubernetes
Open Source

Gitea: Lightweight Self-Hosted Git Server on Kubernetes

Deploy Gitea as a GitHub alternative β€” lightweight Go binary, CI/CD with Gitea Actions, package registry, and Kubernetes Helm deployment.

LB
Luca Berton
Β· 1 min read

Why Gitea?

Gitea is a painless, self-hosted Git service. A single Go binary that provides GitHub-like functionality at a fraction of the resource cost. 47K+ stars.

FeatureGiteaGitLab CEGitHub
Memory (idle)50MB4GB+N/A (SaaS)
Setup time5 minutes30+ minutesInstant
CI/CDβœ… Gitea Actions (GitHub-compatible)βœ… Built-inβœ… Actions
Package registryβœ… (Container, npm, Maven, PyPI)βœ…βœ…
Self-hostedβœ…βœ…βŒ (Enterprise only)
LicenseMITMIT (CE)Proprietary

Kubernetes Deployment

helm repo add gitea-charts https://dl.gitea.com/charts/
helm install gitea gitea-charts/gitea \
  --namespace gitea --create-namespace \
  --set gitea.admin.username=admin \
  --set gitea.admin.password=changeme \
  --set persistence.size=50Gi \
  --set postgresql-ha.enabled=true \
  --set redis-cluster.enabled=true \
  --set ingress.enabled=true \
  --set ingress.hosts[0].host=git.yourdomain.com

Gitea Actions (GitHub-Compatible)

# .gitea/workflows/ci.yml β€” same syntax as GitHub Actions!
name: CI
on: [push, pull_request]
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-go@v5
        with:
          go-version: '1.23'
      - run: go test ./...
      - run: go build -o app .

Gitea Actions runners are compatible with GitHub Actions workflows β€” most workflows work without modification.

Migration from GitHub/GitLab

# Gitea can mirror repos automatically
# Admin β†’ Site Administration β†’ Migrations
# Supports: GitHub, GitLab, Bitbucket, Gitea, Gogs

# Or via API:
curl -X POST "https://git.yourdomain.com/api/v1/repos/migrate" \
  -H "Authorization: token YOUR_TOKEN" \
  -d '{
    "clone_addr": "https://github.com/org/repo.git",
    "mirror": true,
    "repo_name": "repo",
    "service": "github"
  }'

Resource Comparison (Real Numbers)

SetupGiteaGitLab
Pods1 (+ DB + Redis)15+ microservices
Memory total200MB8GB minimum
CPU idle0.05 cores2+ cores
Storage1GB + repos10GB + repos
Monthly cost (cloud)~$15~$100+

For teams under 100 developers, Gitea provides 95% of what you need at 15% of the infrastructure cost.

Free 30-min AI & Cloud consultation

Book Now