There seem to be two active branches of the nginx web server: a “mainline” branch (currently 1.9.x) and a “stable” branch (currently 1.8.x). Can anyone provide an official source that describes the difference between these two branches and how one would choose between them?

  • Besides the obvious? Aug 18, 2015 at 16:20
  • 15
    @MichaelHampton The difference would be obvious if the branches were “stable” and “development”: “Don’t use the ‘development’ branch in production”. Is the “mainline” branch suitable to use in production settings? It kind of sounds like that to me.
    – bdesham
    Aug 18, 2015 at 16:32
  • 6
    @MichaelHampton this question discussed via mailing list over time. Nginx mainline (development) branch does not mean unstable but possible changes that affect 3rd party modules via internal API, good example is Tengine build with Lua and hundred other modules. Nginx developers recommend to use mainline edition in production.
    – Anatoly
    Aug 19, 2015 at 11:48

1 Answer 1


The difference between mainline and stable is explained here:


A graphical summary:

enter image description here

Among other differences:

Note that stable does not mean more reliable or more bug-free. In fact, the mainline is generally regarded as more reliable because we port all bug fixes to it, and not just critical fixes as for the stable branch. On the other hand, changes in the stable branch are very unlikely to affect third-party modules. We don’t make the same commitment concerning the mainline, where new features can affect the operation of third-party modules.


We recommend that in general you deploy the NGINX mainline branch at all times.

  • Do you know how often the fork happens? That is, roughly when 1.9 will become the next stable version?
    – ColinM
    Apr 12, 2016 at 15:41
  • No idea. Did not see such historic data and even if you extrapolate an average out of it, you wouldn't want to sit there waiting for the date to hit and find out it's well over the average. If you want the latest quite stable faster, you can always check out the Tengine web server fork by Taobao. It's stable enough to do billions in revenue for Taobao so should be fine.
    – JayMcTee
    Apr 12, 2016 at 15:45
  • 1
    Updated post from 12 April 2017: nginx.com/blog/nginx-1-12-1-13-released
    – SauceCode
    Apr 20, 2017 at 18:34
  • 4
    In other words, unless you use 3rd-party modules that may break with mainline, use mainline.
    – codewise
    Nov 21, 2018 at 8:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .