Gitea — Lightweight Self-Hosted Git Service
Gitea is a painless self-hosted Git service with code hosting, review, CI/CD, package registry, and project management — a lightweight GitHub/GitLab alternative.
What it is
Gitea is a self-hosted Git service written in Go that provides a complete software development platform. It covers code hosting, pull requests with inline review, issue tracking, CI/CD through Gitea Actions (GitHub Actions compatible), a built-in package registry, wikis, and organization management. It ships as a single binary with minimal resource requirements.
Gitea suits teams and individuals who want GitHub-like functionality on their own infrastructure. It runs on modest hardware, making it practical for home servers, air-gapped environments, and organizations that need full control over their source code.
How it saves time or tokens
Gitea replaces multiple tools with a single deployment. Code hosting, CI/CD, package registry, and project management all run from one service. The GitHub Actions compatibility layer means existing workflow YAML files work with minimal changes. Docker deployment takes one command, and the Go binary starts in seconds with no external dependencies beyond a database.
How to use
- Run the Docker container with
docker run -d --name gitea -p 3000:3000 -p 2222:22 -v gitea-data:/data gitea/gitea:latest. - Open
http://localhost:3000and complete the installation wizard to configure the database and admin account. - Create repositories, set up branch protection rules, and configure Gitea Actions for CI/CD pipelines.
Example
# Start Gitea with Docker
docker run -d \
--name gitea \
-p 3000:3000 \
-p 2222:22 \
-v gitea-data:/data \
gitea/gitea:latest
# Clone and push
git clone http://localhost:3000/user/repo.git
cd repo
echo '# My Project' > README.md
git add . && git commit -m 'init'
git push origin main
Related on TokRepo
- Self-Hosted AI Tools — More self-hosted development and AI tools
- DevOps Tools — CI/CD and infrastructure automation
Common pitfalls
- Gitea Actions requires a separate runner binary (act_runner). The Gitea server alone does not execute CI/CD jobs.
- SQLite works for small teams but PostgreSQL or MySQL is recommended for anything beyond a few concurrent users.
- Gitea is not POSIX-compatible with GitHub API endpoints. Some third-party GitHub integrations may need adjustments to work with Gitea API paths.
Frequently Asked Questions
Gitea is much lighter than GitLab. It runs from a single Go binary with minimal RAM usage, while GitLab requires multiple services and significantly more resources. Gitea lacks some enterprise features like built-in container scanning, but covers core Git hosting, CI/CD, and project management.
Yes. Gitea Actions provides compatibility with GitHub Actions YAML syntax. You install the act_runner binary alongside Gitea, register it, and existing workflow files work with minimal changes. Some GitHub-specific actions may need substitution.
Gitea supports SQLite, PostgreSQL, MySQL, and MSSQL. SQLite is the simplest for small deployments. PostgreSQL is recommended for production use with multiple concurrent users.
Yes. Gitea supports repository mirroring from GitHub, GitLab, and other Git hosts. You can set up automatic pull mirroring to keep a local copy synchronized with an upstream repository.
Gitea runs on minimal hardware. A single-core CPU and 512MB RAM is sufficient for small teams. The Go binary is around 100MB. Storage depends on repository sizes and the package registry usage.
Citations (3)
- Gitea GitHub— Gitea provides code hosting, CI/CD, package registry, and project management in …
- Gitea Documentation— Gitea Actions provides GitHub Actions compatible CI/CD
- Gitea Official Site— Self-hosted Git service comparison and architecture patterns
Related on TokRepo
Source & Thanks
- GitHub: go-gitea/gitea — 54.8K+ ⭐ | MIT
- Website: gitea.com
Discussion
Related Assets
NAPI-RS — Build Node.js Native Addons in Rust
Write high-performance Node.js native modules in Rust with automatic TypeScript type generation and cross-platform prebuilt binaries.
Mamba — Fast Cross-Platform Package Manager
A drop-in conda replacement written in C++ that resolves environments in seconds instead of minutes.
Plasmo — The Browser Extension Framework
Build, test, and publish browser extensions for Chrome, Firefox, and Edge using React or Vue with hot-reload and automatic manifest generation.