Dynamic Modules

Load modules dynamically into NGINX Plus at runtime to add specialized functionality, including features authored by third parties.

Overview

NGINX Plus uses a modular architecture. New features and functionality can be added with software modules, which can be plugged into a running NGINX Plus instance on demand. Dynamic modules add functionality to NGINX Plus such as geolocating users by IP address, resizing images, and embedding NGINX JavaScript njs or Lua scripts into the NGINX Plus event‑processing model. Modules are created both by NGINX and third‑party developers.

NGINX Plus allows features to be plugged in on demand
Note:
Dynamic modules plug into NGINX Plus to provide additional functionality.

NGINX maintains a repository of dynamic modules for NGINX Plus. All modules in our repository are fully tested and certified for correct interoperation with NGINX Plus.

There are many additional third‑party modules that are not included in the repository, but can be found in community projects like awesome-nginx. You can compile many of them as dynamic modules.

Getting Started with the Dynamic Modules Repository

You can access and download the modules in the NGINX Plus dynamic modules repository using standard package management tools such as apt and yum. For example, to install njs dynamic modules for Debian and Ubuntu, run the command:

apt-get install nginx-plus-module-njs

Then you include the load_module directive in the NGINX Plus configuration file for each dynamic module. For example, to enable njs dynamic modules, specify the load_module directives in the top-level (“main”) context of the main NGINX Plus configuration file (nginx.conf):

load_module modules/ngx_http_js_module.so;
load_module modules/ngx_stream_js_module.so;

For module‑specific instructions, see the list of modules in the same section of the NGINX Plus Admin Guide as this article:

Prerequisites

To get started using dynamic modules, first install the latest NGINX Plus release, following the installation instructions. Dynamic modules are supported in NGINX Plus Release 9 (R9) and later.

Displaying the List of Available Modules

To see the list of available modules, run this command (for Debian and Ubuntu):

apt-cache search nginx-plus-module

The output of the command:

nginx-plus-module-geoip - NGINX Plus, provided by NGINX, Inc. (GeoIP dynamic modules)
nginx-plus-module-geoip-dbg - Debugging symbols for the nginx-plus-module-geoip
nginx-plus-module-geoip2 - NGINX Plus, provided by NGINX, Inc. (3rd-party GeoIP2 dynamic modules)
nginx-plus-module-geoip2-dbg - Debugging symbols for the nginx-plus-module-geoip2
nginx-plus-module-headers-more - NGINX Plus, provided by NGINX, Inc. (3rd-party headers-more dynamic module)
nginx-plus-module-headers-more-dbg - Debugging symbols for the nginx-plus-module-headers-more
nginx-plus-module-image-filter - NGINX Plus, provided by NGINX, Inc. (image filter dynamic module)
nginx-plus-module-image-filter-dbg - Debugging symbols for the nginx-plus-module-image-filter
Note:
There is an optional debugging symbols package available for every module. You can load and use the module without installing this package.

NGINX Plus Certified Modules

In addition to modules authored by NGINX and community third‑party developers, the repository contains NGINX Plus Certified Modules which are available for purchase from commercial third parties. Certified Modules are distributed and supported by their authors. NGINX has tested the modules extensively and certifies that they do not interfere with standard NGINX Plus functionality.

NGINX Plus Certified Modules are identified with this checkmark icon on the Dynamic Modules page:

test

Click the module box on that page and then the GET MODULE button.

Caveats

Some modules are not available for certain OS versions because of OS limitations. For details, see the NGINX Plus Technical Specifications.

Compiling Your Own Dynamic Modules

To compile your own dynamic modules, please see our blog.

Uninstalling a Dynamic Module

To uninstall a dynamic module, please follow the Uninstalling a dynamic module article.

See Also