Skip to content

Self-host Gitea

updated Jul 2026prices checked · Jul 2026Install verified on Ubuntu 26.04 · Sep 2026 · how we test
We earn commissions when you shop through the links below. Full disclosure →

A lightweight, self-hosted Git service with pull requests, issues, and a CI runner — a fast GitHub alternative that runs comfortably on a small box.

Key facts

CategoryCode hosting
LicenseMIT
StackGo
Min RAM512 MB
Official imageyes
Measured idle RAM79 MB
Difficulty
Our recommendation

Pick Gitea when you want repositories, pull requests, issues, a wiki, kanban, a package registry and GitHub-Actions-compatible CI from one MIT-licensed Go binary: the docs call Gitea Actions "stable enough for production usage" and use it for every repository in the gitea organisation on gitea.com. The simplest install is our SQLite single container; MySQL and PostgreSQL are a compose change. Its one strategic question is governance — the community fork Forgejo exists because, in its account, Gitea's domains and trademark were transferred to a for-profit company in 2022, and the two are not interchangeable once you have data.

Follow the Gitea deploy guide →

What you need

  • Any VPS with at least 512 MB of RAM
  • A domain you control — most self-hosted setups need HTTPS in front of them
  • Under an hour if you've used Docker before
Where to host itaffiliate disclosure
Hetzner Cloudrun it on
From $23.59/mo · 2 vCPU / 4 GB / 80 GB · EU + US
Get Hetzner Cloud (opens in new tab)
Kamaterafree trial
From $4/mo · 1 vCPU / 1 GB / 20 GB · US + EU + Asia
Start free on Kamatera → (opens in new tab)
DigitalOceanalso works on
From $6/mo · 1 vCPU / 1 GB / 25 GB · US + EU + Asia
Deploy on DigitalOcean → (opens in new tab)

Paid link — we earn a commission if you shop through it.

Install with Docker Compose

Save this as compose.yml and run docker compose up -d:

# Gitea (SQLite — simplest single-container setup)
services:
  gitea:
    image: gitea/gitea:1
    ports: ["3000:3000", "222:22"]
    volumes: ["./data:/data"]
# docker compose up -d  →  http://SERVER_IP:3000

What you take on

Gitea is one of the easiest forges to run; the things that bite are upgrades and the runner:

non-negotiableMinor upgrades are one-way: patch versions (a.b.x → a.b.y) share a database structure, but a.b → a.c "will upgrade the old database" and the result "can not be used for an old Gitea, use a backup to downgrade". Read the changelog for breaking changes, and clear the deprecated-setting warnings in Site Administration — unresolved, "Gitea may refuse to start in the following version".
non-negotiableBackups are cold backups. gitea dump zips repositories, data/ (including the SQLite file), config and an SQL dump, but "it must be shutdown during backup" for consistency, and the XORM-generated SQL dump has "open issues" — for MySQL or PostgreSQL use mysqldump / pg_dump instead.
non-negotiableActions needs a separate runner (Gitea Runner, formerly act_runner, built in part on a hard fork of nektos/act) and the docs are blunt about trust: "Don't use a runner you don't trust" and "Don't provide a runner to a repository, organization or instance you don't trust." Budget a second container and decide who may run jobs.
non-negotiableThe rootful and rootless images "are not compatible with the other" — pick one and never switch by editing the image name. Our snippet maps SSH to host port 222, so clone URLs carry :222 unless you remap. If you may later want Forgejo, its upgrade guide only accepts Gitea v1.22 and earlier.
non-negotiableThe 512 MB floor is our estimate; the docs publish no RAM figure (the comparison table only ticks a low RAM/CPU usage row). Current release: 1.27.3 (as of September 2026).

An alternative to

Head-to-head

More in Code hosting

We use analytics cookies (Google Analytics, PostHog) to see which guides are useful. No ad networks, no cross-site tracking. See our privacy policy.