Replace GitHub Team / GitLab SaaS with Self-Hosted Gitea / Forgejo
Painless self-hosted Git service written in Go—includes GitHub Actions-compatible CI/CD & Package Registry Stop paying Enterprise / Ultimate ($21–$29/user/mo + CI runner minutes) ($210/mo for a 10-person team) and run Gitea / Forgejo on a $4.50/mo Linux VPS with full data sovereignty.
1-to-100 Seat Total Cost of Ownership (TCO) Table
Comparing GitHub Team / GitLab SaaS (Enterprise / Ultimate ($21–$29/user/mo + CI runner minutes)) vs Gitea / Forgejo on Hetzner CX22 (4GB RAM / 2 vCPU).
| Team Size | GitHub Team / GitLab SaaS Cost | Gitea / Forgejo VPS | Net Annual Savings |
|---|---|---|---|
| 1 Seat (Solo) | $21.00/mo ($252/yr) | $4.50/mo (CX22) | +$198 / year |
| 5 Seats | $105.00/mo ($1,260/yr) | $4.50/mo (CX22) | +$1,206 / year |
| 10 Seats | $210.00/mo ($2,520/yr) | $4.50/mo (CX22) | +$2,466 / year |
| 25 Seats | $525.00/mo ($6,300/yr) | $4.50/mo (CX22) | +$6,246 / year |
| 50 Seats | $1,050.00/mo ($12,600/yr) | $4.50/mo (CX22) | +$12,546 / year |
| 100 Seats | $2,100.00/mo ($25,200/yr) | $4.50/mo (CX22) | +$25,146 / year |
Production Docker Compose + Caddy Auto-SSL
Copy and run docker compose up -d on any Ubuntu 24.04 server.
# Production Docker Compose: Gitea / Forgejo (Replaces GitHub Team / GitLab SaaS)
services:
caddy:
image: caddy:2-alpine
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
- caddy_data:/data
networks:
- stack_net
gitea:
image: gitea/gitea:latest
container_name: stack-gitea
restart: unless-stopped
environment:
- "USER_UID=1000"
- "USER_GID=1000"
- "GITEA__database__DB_TYPE=postgres"
- "GITEA__database__HOST=postgres:5432"
- "GITEA__database__NAME=gitea"
- "GITEA__database__USER=postgres"
- "GITEA__database__PASSWD=${POSTGRES_PASSWORD:-strongpassword}"
volumes:
- gitea_data:/data
networks:
- stack_net
postgres:
image: pgvector/pgvector:pg16
container_name: stack-postgres
restart: unless-stopped
environment:
- "POSTGRES_USER=postgres"
- "POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-strongpassword}"
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- stack_net
networks:
stack_net:
driver: bridge
volumes:
caddy_data:
gitea_data:
postgres_data:
# Automatic Let's Encrypt HTTPS for Gitea / Forgejo
gitea.{$DOMAIN:yourdomain.com} {
encode zstd gzip
reverse_proxy gitea:3000
}
Why Teams Switch to Gitea / Forgejo
- ✓Runs in ~150MB RAM (vs 4GB+ for GitLab)
- ✓Gitea Actions runs standard `.github/workflows` YAML
- ✓Built-in Docker, npm, PyPI & Cargo registry
gitea/gitea:latest
Deploy Gitea / Forgejo in 60 Seconds
Sized automatically for Gitea / Forgejo (256MB container RAM + OS overhead).
Get All 16 Pre-Built Production Stacks + Encrypted S3 Backups
Includes pre-tuned docker-compose.yml, Caddy Auto-SSL, AES-256 encrypted nightly S3/R2 Postgres backups, and Ubuntu 24.04 UFW/Fail2ban hardening scripts.