Git and CI, checked 2026-10-17

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 should be owned by the matching UID/GID or the container may not start.1000source for USER_UID
USER_GIDNoGID for the container user, alongside USER_UID.1000source for USER_GID
FORGEJO__server__ROOT_URLNoOverwrites the automatically generated public URL, useful when internal and external URLs differ (for example in Docker). Any FORGEJO__[SECTION]__[KEY] variable is written to app.ini.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
v17.0.02026-10-15YesNew major line. Upstream advises against upgrading for now: an issue can block pushes and merges in some cases. Sets duration parsing to strict and renames the default logfile to forgejo.log.source for release v17.0.0
v16.0.62026-10-12NoSecurity fix: dispatches pull_request_review events from the pull request base, so forked pull requests get Actions protections.source for release v16.0.6
v15.0.102026-10-12NoPoint release on the 15.0 line, the current LTS.source for release v15.0.10
v16.0.52026-09-17NoSecurity fix: stops ApplyDiffPatch from mutating bare repository config.source for release v16.0.5
v16.0.42026-09-10NoSecurity fix: prevents template expansion from interfering with git repository initialisation.source for release v16.0.4
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

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