🦊

Gitea

Development Tools & IDEs

Tšebeletso ea Git e bobebe e ikemetseng e nang le sebopeho se kang sa GitHub

Deployment Info

Ho romelloa ha basebetsi: 2-5 min
sehlopha: Development Tools & IDEs
Tšehetso: 24/7

Share this guide

Overview

Gitea is a lightweight, self-hosted Git service written in Go that provides a painless setup and minimal resource requirements. It's the perfect alternative to GitHub, GitLab, or Bitbucket when you want full control over your code repositories without the heavy resource footprint. Gitea can run on a Raspberry Pi and uses minimal RAM (less than 100MB), making it ideal for small teams, personal projects, or environments with limited resources. Despite its lightweight nature, Gitea packs powerful features including repositories, pull requests, code review, issue tracking, wikis, organizations, webhooks, and built-in CI/CD with Gitea Actions (GitHub Actions compatible). The single binary deployment means no complex dependencies - just download, configure, and run.

Key Features

Lightweight & Fast

Single binary, minimal RAM (<100MB), runs on Raspberry Pi

GitHub-like Interface

Familiar UI with repos, pull requests, issues, wikis, and code review

Gitea Actions

Built-in CI/CD compatible with GitHub Actions workflows

Easy Migration

Import from GitHub, GitLab, Bitbucket with built-in migration tools

Multi-Database Support

SQLite, PostgreSQL, MySQL, MSSQL, TiDB support

Docker & Kubernetes Ready

Official images and Helm charts for container deployments

Mehlala ea ho sebelisa

• Personal Git hosting on home servers or VPS
• Small team code repositories with minimal infrastructure
• Internal company Git service with full control
• Educational environments teaching Git workflows
• Migration from GitHub/GitLab to self-hosted solution
• CI/CD with Gitea Actions for automated testing/deployment

Installation Guide

**Quick Install (Binary):**
```bash
# Download latest binary
wget -O gitea https://dl.gitea.com/gitea/1.21/gitea-1.21-linux-amd64
chmod +x gitea

# Run
./gitea web
# Access at http://localhost:3000
```

**Docker Installation:**
```bash
docker run -d --name=gitea -p 3000:3000 -p 222:22 \
-v /var/lib/gitea:/data gitea/gitea:latest
```

**Production with PostgreSQL:**
```bash
# Install PostgreSQL
sudo apt install postgresql

# Create DB & user
sudo -u postgres psql
CREATE DATABASE gitea;
CREATE USER gitea WITH PASSWORD 'password';
GRANT ALL PRIVILEGES ON DATABASE gitea TO gitea;

# Create gitea user
sudo adduser --system --group --disabled-password --shell /bin/bash --home /home/git git

# Download & install
sudo wget -O /usr/local/bin/gitea https://dl.gitea.com/gitea/1.21/gitea-1.21-linux-amd64
sudo chmod +x /usr/local/bin/gitea

# Create directories
sudo mkdir -p /var/lib/gitea/{custom,data,log}
sudo chown -R git:git /var/lib/gitea
sudo chmod -R 750 /var/lib/gitea

# Systemd service
sudo nano /etc/systemd/system/gitea.service
# [Service]
# User=git
# WorkingDirectory=/var/lib/gitea
# ExecStart=/usr/local/bin/gitea web --config /etc/gitea/app.ini
# Restart=always

sudo systemctl enable --now gitea
```

Configuration Tips

**app.ini Configuration:**
```ini
[server]
DOMAIN = git.yourdomain.com
HTTP_PORT = 3000
ROOT_URL = https://git.yourdomain.com/

[database]
DB_TYPE = postgres
HOST = localhost:5432
NAME = gitea
USER = gitea
PASSWD = password

[security]
INSTALL_LOCK = true
SECRET_KEY = generate_with_gitea_generate_secret

[service]
DISABLE_REGISTRATION = true
REQUIRE_SIGNIN_VIEW = false
```

**Gitea Actions (.gitea/workflows/build.yml):**
```yaml
name: Build
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
- run: npm install && npm test
```

Lekanya Sengoloa sena

-
Loading...

Na o se o loketse ho kenya kopo ya hao? ?

Get started in minutes with our simple VPS deployment process

Ha ho hlokahale karete ea mokitlane bakeng sa ho ingolisa • Kenya ka metsotso e 2-5