Skip to content

njs: NGINX njs dynamic modules


You can install this module in any RHEL-based distribution, including, but not limited to:

  • RedHat Enterprise Linux 7, 8, 9
  • CentOS 7, 8, 9
  • AlmaLinux 8, 9
  • Rocky Linux 8, 9
  • Amazon Linux 2 and Amazon Linux 2023
yum -y install
yum -y install nginx-module-njs

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

load_module modules/;
load_module modules/;

This document describes nginx-module-njs v0.8.2 released on Oct 24 2023.

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.