- Fixed 4 broken markdown links (bad relative paths in See Also sections) - Corrected n8n port binding to 127.0.0.1:5678 (matches actual deployment) - Updated SnapRAID article with actual majorhome paths (/majorRAID, disk1-3) - Converted 67 Obsidian wikilinks to relative markdown links or plain text - Added YAML frontmatter to 35 articles missing it entirely - Completed frontmatter on 8 articles with missing fields Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2.9 KiB
title, domain, category, tags, status, created, updated
| title | domain | category | tags | status | created | updated | |||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Gitea — Self-Hosted Git | opensource | alternatives |
|
published | 2026-04-02 | 2026-04-02 |
Gitea — Self-Hosted Git
Problem
GitHub is the default home for code, but it's a Microsoft-owned centralized service. Your repositories, commit history, issues, and CI/CD pipelines are all under someone else's control. For personal projects and private infrastructure, there's no reason to depend on it.
Solution
Gitea is a lightweight, self-hosted Git service. It provides the full GitHub-style workflow — repositories, branches, pull requests, webhooks, and a web UI — in a single binary or Docker container that runs comfortably on low-spec hardware.
Deployment (Docker)
services:
gitea:
image: docker.gitea.com/gitea:latest
container_name: gitea
restart: unless-stopped
ports:
- "3002:3000"
- "222:22" # SSH git access
volumes:
- ./gitea:/data
environment:
- USER_UID=1000
- USER_GID=1000
- GITEA__database__DB_TYPE=sqlite3
SQLite is fine for personal use. For team use, swap in PostgreSQL or MySQL.
Caddy reverse proxy
git.yourdomain.com {
reverse_proxy localhost:3002
}
Initial Setup
- Browse to your Gitea URL — the first-run wizard handles configuration
- Set the server URL to your public domain
- Create an admin account
- Configure SSH access if you want
git@git.yourdomain.comcloning
Webhooks
Gitea's webhook system is how automated pipelines get triggered on push. Example use case — auto-deploy a MkDocs wiki on every push:
- Go to repo → Settings → Webhooks → Add Webhook
- Set the payload URL to your webhook endpoint (e.g.
https://notes.yourdomain.com/webhook) - Set content type to
application/json - Select Push events
The webhook fires on every git push, allowing the receiving server to pull and rebuild automatically. See MajorWiki Setup & Pipeline for a complete example.
Migrating from GitHub
Gitea can mirror GitHub repos and import them directly:
# Clone from GitHub, push to Gitea
git clone --mirror https://github.com/user/repo.git
cd repo.git
git remote set-url origin https://git.yourdomain.com/user/repo.git
git push --mirror
Or use the Gitea web UI: + → New Migration → GitHub
Why Not Just Use GitHub?
For public open source — GitHub is fine, the network effects are real. For private infrastructure code, personal projects, and anything you'd rather not hand to Microsoft:
- Full control over your data and access
- No rate limits, no storage quotas on your own hardware
- Webhooks and integrations without paying for GitHub Actions minutes
- Works entirely over Tailscale — no public exposure required