Skip to content

njs: NGINX njs dynamic modules


CentOS/RHEL 6, 7, 8 or Amazon Linux 2

bash yum -y install yum -y install nginx-module-njs

Enable the module by adding the following at the top of /etc/nginx/nginx.conf:

nginx load_module modules/; nginx load_module modules/;

This document describes nginx-module-njs v0.7.3 released on Apr 12 2022.

NGINX JavaScript (njs)

njs is a subset of the JavaScript language that allows extending nginx functionality. njs is created in compliance with ECMAScript 5.1 (strict mode) with some ECMAScript 6 and later extensions. The compliance is still evolving.

The documentation is available online:

Additional examples and howtos can be found here:

Please ask questions, report issues, and send patches to the mailing list: (

or via Github:

-- NGINX, Inc.,


You may find additional configuration tips and documentation for this module in the GitHub repository for nginx-module-njs.

Back to top