Gitea Self-Hosted Git
Gitea + Postgres + Gitea Actions runner — self-hosted Git with SSH push, HTTP clone, and CI/CD wired up out of the box.
Gitea Self-Hosted Git
A production-ready self-hosted Git server backed by Postgres, with an Actions runner pre-registered so you can push code and trigger CI workflows immediately. SSH push on port 222, HTTP on port 3000.
What's Included
- Gitea — Latest stable release with Postgres backend, persistent repo storage, and SSH server enabled
- PostgreSQL 16 — Stores all Gitea application data with persistent named volume
- Gitea Actions Runner — Pre-registered act-based runner; push a
.gitea/workflowsfile and CI starts automatically
Access Configuration
- SSH access on port 222 — add your key in Gitea settings and push with
git remote add origin ssh://git@localhost:222/user/repo.git - HTTP access on port 3000 — clone, web UI, and API all on the same port
- Actions runner registers itself on first boot using a bootstrap token — no manual runner registration step
- Persistent volumes for Gitea repositories and Postgres data — safe across restarts and upgrades
- App config pre-tuned: disables registration by default, enables Actions in
app.ini
What You Get
docker-compose.yml— fully configured three-service stackgitea/app.ini— annotated Gitea configuration with database, SSH, and Actions settingsrunner/config.yml— Actions runner config pointing to the local Gitea instanceentrypoint.sh— auto-registers the runner with Gitea on first start.env.examplewith every variable documentedREADME.md— setup guide, SSH key setup, first repo walkthrough, and CI example workflow
Service URLs
| Service | URL / Port |
|---|---|
| Gitea Web & HTTP Git | http://localhost:3000 |
| Gitea SSH | ssh://localhost:222 |
Requirements
Docker Engine with the Compose plugin on a Linux host or VPS. 512 MB RAM minimum; 1 GB recommended with the Actions runner running.