Git and CI, checked 2026-09-07

Forgejo: Docker configuration reference

Self-hosted, community-run Git service forked from Gitea, with issues, pull requests and Actions.

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, typically published on host port 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 container runs as; the /data volume must be owned by the matching UID/GID or the container will not start.1000source for USER_UID
USER_GIDNoGID for the container user, alongside USER_UID.1000source for USER_GID
FORGEJO__server__ROOT_URLNoAny FORGEJO__[SECTION]__[KEY] variable is written into app.ini on start. ROOT_URL is the public URL used when the automatically detected one is wrong behind a proxy.https://git.example.com/source for FORGEJO__server__ROOT_URL
FORGEJO__database__DB_TYPENoSelects the database driver (sqlite3, mysql, postgres) for environment-variable based configuration instead of the setup wizard.postgressource for FORGEJO__database__DB_TYPE

Volumes that must persist

Volumes
PathWhat is in itSource
/dataRepositories, app.ini, SSH host keys and the SQLite database if used. Must be owned by USER_UID/USER_GID.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 FORGEJO__database__* variables.source for SQLite (default), MySQL or PostgreSQL

Release timeline

Releases
VersionDateBreakingWhat changedSource
v16.0.32026-08-20NoPoint release on the 16.0 line; see the linked release notes file for the specific fixes.source for release v16.0.3
v16.0.22026-07-30NoPoint release on the 16.0 line.source for release v16.0.2
v16.0.12026-07-21NoPoint release on the 16.0 line.source for release v16.0.1
v16.0.02026-07-16YesNew major line. Upgrading across a major version requires reading the release notes for required manual steps before restarting.source for release v16.0.0
v15.0.52026-07-15NoPoint release on the older 15.0 line, kept in parallel for users who have not moved to 16 yet.source for release v15.0.5

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