Git and CI, checked 2026-10-17

Gitea: Docker configuration reference

Self-hosted Git service with issues, pull requests, packages and Actions, built for a single small server.

At a glance

Ports

Ports
PortWhat listensSource
3000HTTP listener for the web UI, API and git-over-HTTP. Point the reverse proxy here.source for port 3000
22Built-in OpenSSH daemon for git-over-SSH. Usually published on a different host port such as 222, since a reverse proxy cannot forward raw SSH the way it forwards HTTP.source for port 22

Environment variables

Environment variables
VariableRequiredWhat it doesExampleSource
USER_UIDNoUID the git user inside the container runs as; should match the owner of the mounted data volume.1000source for USER_UID
USER_GIDNoGID for the git user, alongside USER_UID.1000source for USER_GID
GITEA__server__ROOT_URLNoAny GITEA__section__KEY variable is written into app.ini on container start. ROOT_URL sets the externally visible URL, needed when it does not match what Gitea would otherwise detect behind a proxy.https://git.example.com/source for GITEA__server__ROOT_URL
GITEA__database__DB_TYPENoSelects the database driver (sqlite3, mysql, postgres) when configuring via environment variables instead of the setup wizard.postgressource for GITEA__database__DB_TYPE

Volumes that must persist

Volumes
PathWhat is in itSource
/dataRepositories, the SQLite database if used, app.ini, SSH host keys and avatars. The volume owner must match USER_UID/USER_GID or the container fails to start.source for /data

Behind a reverse proxy

What it needs alongside it

Dependencies
DependencyWhySource
SQLite (default), MySQL or PostgreSQLSQLite needs no extra container; MySQL/PostgreSQL are configured via GITEA__database__* variables or the setup wizard.source for SQLite (default), MySQL or PostgreSQL

Release timeline

Releases
VersionDateBreakingWhat changedSource
v28.1.02026-10-06NoImproves npm client compatibility and fixes several API and web handler checks, MathML markup handling and OAuth2 scope approval.source for release v28.1.0
v28.0.02026-09-29YesGit network operations now route through an internal proxy with new egress settings, and RUN_RETENTION_DAYS deletes old Actions runs. Also adds security fixes.source for release v28.0.0
v1.27.32026-08-29NoSecurity release restricting package token-scope access, attachment path enforcement and actions artifact verification.source for release v1.27.3
v1.27.22026-08-13NoSecurity fix for collaborator access mode and httpsign, plus render and actions fixes.source for release v1.27.2
v1.27.12026-07-27NoSecurity fixes for orgmode render include path and git patch apply.source for release v1.27.1

If it is not coming up

Read from the upstream documentation, repository and container registry by Keita Emsden on 2026-10-17. Every row links the page it came from. Upstream changes without telling anyone, so check the source link before you rely on a value.

Other app references

All app references