Skip to content

/compat/nginx/nginx-stable-vs-mainline

nginx stable vs mainline: version numbers and which branch to run

The commands on this page have not been executed by our verification runner yet.updated 2026-10-20
tool
nginx
versions
nginx 1.x
os
any

nginx has two release branches. Mainline has an odd minor version (1.29, 1.31) and gets new features and every bug fix. Stable has an even minor version (1.28, 1.30) and gets only critical fixes, including security fixes. About once a year the current mainline is branched into a new stable version, and the previous stable branch stops receiving updates.

Reading a version number

VersionBranchMeaning
1.31.xmainlineodd minor: features land here first
1.30.xstableeven minor: frozen features, critical fixes only
1.28.xlegacyprevious stable, no longer updated by nginx.org once 1.30 is out

nginx -v prints the version; distribution packages may be older but carry backported security patches, so compare against the distribution's advisories rather than nginx.org.

Which one to run

  • The nginx developers recommend mainline for most users: fixes reach it first, and it is not less reliable than stable.
  • Stable suits environments where any behaviour change needs review, or where third-party modules are only tested against stable.
  • Official packages for both branches are on nginx.org for Debian, Ubuntu, RHEL and others; distribution repositories usually ship a stable version.

Sources