Git and CI, checked 2026-09-07

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
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
v1.27.02026-07-13YesBreaking change to reusable workflow support in Actions, plus a Content-Security-Policy script nonce and various security fixes.source for release v1.27.0
v1.26.42026-06-21NoSecurity fix stopping disabled users being auto-reactivated on OAuth2 callback.source for release v1.26.4

If it is not coming up

Read from the upstream documentation, repository and container registry by Keita Emsden on 2026-09-07. 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