ScriptsApr 10, 2026·3 min read

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.

TL;DR
Gitea is a lightweight, self-hosted Git service written in Go with code hosting, CI/CD, package registry, and project management in one binary.
§01

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.

§02

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.

§03

How to use

  1. Run the Docker container with docker run -d --name gitea -p 3000:3000 -p 2222:22 -v gitea-data:/data gitea/gitea:latest.
  2. Open http://localhost:3000 and complete the installation wizard to configure the database and admin account.
  3. Create repositories, set up branch protection rules, and configure Gitea Actions for CI/CD pipelines.
§04

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
§05

Related on TokRepo

§06

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

How does Gitea compare to GitLab?+

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.

Does Gitea support GitHub Actions workflows?+

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.

What databases does Gitea support?+

Gitea supports SQLite, PostgreSQL, MySQL, and MSSQL. SQLite is the simplest for small deployments. PostgreSQL is recommended for production use with multiple concurrent users.

Can Gitea mirror repositories from GitHub?+

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.

What are the minimum system requirements for Gitea?+

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
🙏

Source & Thanks

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets