Download and install

From Get docs

Download and install

Installing as a Linux package

For Linux, njs modules packages can be used:

  • nginx-module-njs — njs dynamic modules
  • nginx-module-njs-dbg — debug symbols for the nginx-module-njs package

After package installation, njs dynamic modules need to be loaded with the load_module directive:

load_module modules/;


load_module modules/;

Building from the sources

The repository with njs sources can be cloned with the following command: (requires Mercurial client):

hg clone

Then the modules should be compiled from nginx root directory using the --add-module configuration parameter:

./configure --add-module=path-to-njs/nginx

The modules can also be built as dynamic:

./configure --add-dynamic-module=path-to-njs/nginx

To build only njs command-line utility, run ./configure and make njs commands from njs root directory. The utility is available as ./build/njs.

© 2002-2021 Igor Sysoev
© 2011-2021 Nginx, Inc.
Licensed under the BSD License.