Gitea cheatsheet
Service and access
| Check | Description |
|---|---|
systemctl status gitea | Service status (package/systemd) |
ss -tlnp | grep 3000 | Default HTTP listen port |
/etc/gitea/app.ini | Main configuration |
APP_DATA_PATH | Repos, LFS, Actions data |
Git clone URLs
git clone https://gitea.example.com/org/repo.git
git clone git@gitea.example.com:org/repo.git
# HTTPS with token: username + PAT as password
git ls-remote https://gitea.example.com/org/repo.git
Admin CLI (gitea)
gitea --help
gitea admin user list
gitea admin user create --admin --username alice --password '...' --email a@example.com
gitea dump -c /etc/gitea/app.ini
gitea doctor check --config /etc/gitea/app.ini
Actions workflow sketch
# .gitea/workflows/ci.yml
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: make build test
act_runner
# Register (token from Gitea UI)
./act_runner register --instance https://gitea.example.com --token TOKEN
./act_runner daemon
# Labels must match runs-on: in workflows
systemctl status act_runner
journalctl -u act_runner -f
Useful app.ini knobs
| Setting | Notes |
|---|---|
ROOT_URL | Public URL including trailing slash path if any |
[database] | SQLite vs Postgres/MySQL |
[actions] ENABLED | Turn on Gitea Actions |
[server] SSH_DOMAIN / SSH_PORT | Clone SSH endpoint |
APP_DATA_PATH | Persistent data root |
API quick checks
curl -sS https://gitea.example.com/api/v1/version
curl -sS -H "Authorization: token $TOKEN" \
https://gitea.example.com/api/v1/user/repos
Logs and disk
| Path / command | Description |
|---|---|
journalctl -u gitea -f | systemd journal |
| UI → Actions → run log | Per-job CI output |
du -sh $APP_DATA_PATH/* | Data directory usage |
| Repo → Settings → Webhooks | Delivery history |
Pro tips
- Set
ROOT_URLcorrectly before blaming the reverse proxy - Prefer Postgres (or MySQL) over SQLite once you have concurrent users or Actions
- Match runner labels exactly to
runs-on:— silent queue otherwise - Use PATs for HTTPS Git and API; disable password auth over HTTP if exposed
- Back up both the database and
APP_DATA_PATHtogether
Practice scenarios
Hands-on Gitea scenarios on live Linux VMs: gitea