---
title: Upgrading the NGINX module
summary: null
url: >-
  https://www.fastly.com/documentation/guides/next-gen-waf/setup-and-configuration/module-agent-deployment/nginx-module/upgrading-nginx
---


We update our NGINX dynamic module within three weeks of a [stable or mainline NGINX release](https://nginx.org/en/download.html) or a [NGINX Plus release](https://docs.nginx.com/nginx/releases/) occurs. We will expedite a release when there are exceptions (e.g., critical vulnerability). Our [Compatibility and requirements](/guides/next-gen-waf/setup-and-configuration/compatibility-and-requirements/) guide lists the distributions our NGINX module has packages available for.

> **HINT:** Check the [NGINX Lua module release notes](/reference/changes/ngwaf-module-nginx-lua/) or [NGINX Native module release notes](/reference/changes/ngwaf-module-nginx-native/) for a list of what's new in the NGINX module.

## Upgrading the module on Alpine Linux systems

To upgrade the Next-Gen WAF NGINX module on Alpine Linux systems, follow these steps for the appropriate package:

<!-- TabbedPanels component: 
<Panel id="stable" label="Stable">

1. Upgrade the NGINX Alpine Linux module package.

   ```term copy nolinenums
   $ apk update
   $ apk add nginx-module-fastly-nxs
   ```

1. Restart your NGINX service.

</Panel>
<Panel id="mainline" label="Mainline">

1. Upgrade the NGINX Alpine Linux module package.

   ```term copy nolinenums
   $ apk update
   $ apk add nginx-module-fastly-nxm
   ```

1. Restart your NGINX service.

</Panel>
<Panel id="distribution-provided" label="Distribution-provided">

1. Upgrade the NGINX Alpine Linux module package.

   ```term copy nolinenums
   $ apk update
   $ apk add nginx-module-fastly-nxd
   ```

1. Restart your NGINX service.

</Panel>
<Panel id="nginx-plus" label="NGINX Plus">

1. Upgrade the NGINX Plus Alpine Linux module package.

   ```term copy nolinenums
   $ apk update
   $ apk add nginx-module-fastly-nxp
   ```

1. Restart your NGINX service.

</Panel>
 -->

## Upgrading the module on RHEL, CentOS, Amazon Linux and other RHEL-derived distributions

> **IMPORTANT:** <Partial name='notice-nginx-native-upgrade' />

To upgrade the Next-Gen WAF NGINX module for the NGINX on Red Hat Enterprise Linux (RHEL) and its derivative (e.g., CentOS) systems for a version of NGINX, follow the steps for the appropriate package:

<!-- TabbedPanels component: 
<Panel id="stable" label="Stable">

1. Upgrade the NGINX module package.

   ```term copy nolinenums
   $ sudo yum update
   $ sudo yum install nginx-module-fastly-nxs
   ```

1. Restart your NGINX service.

</Panel>
<Panel id="mainline" label="Mainline">

1. Upgrade the NGINX module package.

   ```term copy nolinenums
   $ sudo yum update
   $ sudo yum install nginx-module-fastly-nxm
   ```

1. Restart your NGINX service.

</Panel>
<Panel id="distribution-provided" label="Distribution-provided">

1. Upgrade the NGINX module package.

   ```term copy nolinenums
   $ sudo yum update
   $ sudo yum install nginx-module-fastly-nxd
   ```

1. Restart your NGINX service.

</Panel>
<Panel id="nginx-plus" label="NGINX Plus">

1. Upgrade the NGINX Plus module package.

   ```term copy nolinenums
   $ sudo yum update
   $ sudo yum install nginx-module-fastly-nxp
   ```

1. Restart your NGINX service.

</Panel>
 -->

## Upgrading the module on Ubuntu and Debian systems

To upgrade the Next-Gen WAF NGINX module for the NGINX version on Ubuntu and Debian systems, follow the steps for the appropriate package:

<!-- TabbedPanels component: 
<Panel id="stable" label="Stable">

1. Upgrade the NGINX module package.

   ```term copy nolinenums
   $ sudo apt-get update
   $ sudo apt-get install nginx-module-fastly-nxs
   ```

1. Restart your NGINX service.

</Panel>
<Panel id="mainline" label="Mainline">

1. Upgrade the NGINX module package.

   ```term copy nolinenums
   $ sudo apt-get update
   $ sudo apt-get install nginx-module-fastly-nxm
   ```

1. Restart your NGINX service.

</Panel>
<Panel id="distribution-provided" label="Distribution-provided">

1. Upgrade the NGINX module package.

   ```term copy nolinenums
   $ sudo apt-get update
   $ sudo apt-get install nginx-module-fastly-nxd
   ```

1. Restart your NGINX service.

</Panel>
<Panel id="nginx-plus" label="NGINX Plus">

1. Upgrade the NGINX Plus module package.

   ```term copy nolinenums
   $ sudo apt-get update
   $ sudo apt-get install nginx-module-fastly-nxp
   ```

1. Restart your NGINX service.

</Panel>
 -->

## Switching to a `nginx-module-fastly` package

If your existing installation uses one of the [`nginx-module-sigsci` packages](/guides/next-gen-waf/setup-and-configuration/module-agent-deployment/nginx-module/about-the-nginx-module/#choosing-an-nginx-module-variation), you can switch to one of our `nginx-module-fastly` packages by completing the following steps:

### Prerequisites

Before switching to an `nginx-module-fastly` package, ensure the following steps have been completed.

<!-- TabbedPanels component: 
<Panel id="debian-/-ubuntu" label="Debian / Ubuntu">

1. Run the following command to ensure you have access to the latest packages. You will be prompted to provide your root password.

   ```term copy nolinenums
   $ sudo apt-get update
   ```

1. Determine the NGINX version and package source. Refer to our section on [determining the NGINX version](#determining-the-nginx-version).

1. Check the Next-Gen WAF module you are using by running the following command. Be sure to record the version and whether it is a `-nxo` or `-nxp` module. You'll need this information in a future step.

   ```term copy nolinenums
   $ apt list --installed | grep module-sigsci
   ```

</Panel>
<Panel id="rhel-/-centos-/-amazon" label="RHEL / CentOS / Amazon">

1. Run the following command to ensure you have access to the latest packages. You will be prompted to provide your root password.

   ```term copy nolinenums
   $ sudo yum update
   ```

1. Determine the NGINX version and package source. Refer to our section on [determining the NGINX version](#determining-the-nginx-version).

1. Check the Next-Gen WAF module you are using by running the following command. Be sure to record the version and whether it is a `-nxo` or `-nxp` module. You'll need this information in a future step.

   ```term copy nolinenums
   $ yum list installed | grep module-sigsci
   ```

</Panel>
<Panel id="alpine-linux" label="Alpine Linux">

1. Run the following command to ensure you have access to the latest packages.

   ```term copy nolinenums
   $ apk update
   ```

1. Determine the NGINX version and package source. Refer to our section on [determining the NGINX version](#determining-the-nginx-version).

1. Check the Next-Gen WAF module you are using by running the following command. Be sure to record the version and whether it is a `-nxo` or `-nxp` module. You'll need this information in a future step.

   ```term copy nolinenums
   $ apk list --installed | grep module-sigsci
   ```

</Panel>
 -->

### Replacing the package

1. Run the following command according to your distribution of Linux. Substitute `<sigsci-module>` for either `nginx-module-sigsci-nxo` or `nginx-module-sigsci-nxp` as you determined in the previous step.

   <!-- TabbedPanels component: 
   <Panel id="debian-/-ubuntu" label="Debian / Ubuntu">

   ```term copy nolinenums
   $ sudo apt-get remove <sigsci-module>
   ```

   </Panel>
   <Panel id="rhel-/-centos-/-amazon" label="RHEL / CentOS / Amazon">

   ```term copy nolinenums
   $ sudo yum remove <sigsci-module>
   ```

   </Panel>
   <Panel id="alpine-linux" label="Alpine Linux">

   ```term copy nolinenums
   $ apk del <sigsci-module>
   ```

   </Panel>
    -->

1. Remove the `load_module` command for the old `sigsci_module.so` in `/etc/nginx/nginx.conf`. Look for the following line and remove it. The Fastly packages have renamed the shared object to `ngx_http_fastly_module.so`.

   ```
   load_module /etc/nginx/modules/ngx_http_sigsci_module.so;
   ```

1. [Install the variation of the NGINX dynamic module](/guides/next-gen-waf/setup-and-configuration/module-agent-deployment/nginx-module/installing-the-nginx-dynamic-module/#installing-the-nginx-dynamic-module) that is appropriate for your version of NGINX using the version of NGINX and the Fastly module that you noted in previous steps. For information about our module variations, check out [Choosing an NGINX module variation](/guides/next-gen-waf/setup-and-configuration/module-agent-deployment/nginx-module/about-the-nginx-module/#choosing-an-nginx-module-variation).
1. [Load the NGINX dynamic module](/guides/next-gen-waf/setup-and-configuration/module-agent-deployment/nginx-module/installing-the-nginx-dynamic-module/#loading-the-nginx-dynamic-module).
1. If you are using SELinux, [update your SELinux policy](/guides/next-gen-waf/setup-and-configuration/module-agent-deployment/selinux/).

## Determining the NGINX version

Determining the NGINX version as well as the source of NGINX is necessary to ensure that you install the correct version of the NGINX native module. Follow these steps to determine the NGINX version.

<!-- TabbedPanels component: 
<Panel id="debian-/-ubuntu" label="Debian / Ubuntu">

Run the following command to determine which version you have installed.

   ```term copy nolinenums
   $ apt list --installed | grep nginx
   ```

   On Debian and Ubuntu, the package name `nginx` will be followed by a `/` character and then the name of the repository it comes from. If it says `nginx/nginx` it means you are using a version of NGINX provided by `Nginx.org`. If it says `nginx/stable` or `nginx/noble-updates` or something else, then you are using a distribution-provided version of NGINX. Following the package and repository information, you will see the version of NGINX, for example `1.24.0`. For example, the following shows NGINX version 1.24.0 installed from an Ubuntu repository.

   ```term copy nolinenums
   $ apt list --installed | grep nginx

   nginx/noble-updates,noble-security,now 1.24.0-2ubuntu7.3 arm64 [installed]
   ```

</Panel>
<Panel id="rhel-/-centos-/-amazon" label="RHEL / CentOS / Amazon">

Run the following command to determine which version you have installed.

   ```term copy nolinenums
   $ yum list installed | grep nginx
   ```

   The package name and architecture are listed in the first column. The second column shows the version of NGINX installed. The third column shows the source of NGINX. If it says `@nginx-stable` or `@nginx-mainline`, then you are using NGINX provided by `Nginx.org`. If it says something else, then you are using a distribution-provided package. For example, the following shows NGINX version 1.28.0 installed from the NGINX's stable repository.

   ```term copy nolinenums
   $ yum list installed | grep nginx
   nginx.aarch64                                    2:1.28.0-1.el9.ngx               @nginx-stable
   ```

</Panel>
<Panel id="alpine-linux" label="Alpine Linux">

Run the following command to determine which version you have installed.

   ```term copy nolinenums
   $ nginx -v
   ```

   Determine whether NGINX was installed from `nginx.org` or from an Alpine Linux repository. Alpine Linux's package manager does not directly store information about which repository a package was installed from, but if there is an entry for `nginx.org` in `/etc/apk/repositories`, that is an indication that NGINX was installed from `nginx.org` rather than Alpine Linux.

</Panel>
 -->

## Determining the module version

The version in the package file name is the version of NGINX that the module package is built to work with. To determine the module version, you must query the package using the package tools appropriate to your distribution. The module version will be listed in the `Description:` field.

<!-- TabbedPanels component: 
<Panel id="alpine-linux" label="Alpine Linux">

To query the description for an installed package on Alpine Linux systems, use `apk info -d <package name>`. For example:

   ```term copy nolinenums
   $ apk info -d nginx-module-fastly-nxs
   ```

   The output will look something like this:

   ```term copy nolinenums
   nginx-module-fastly-nxs-1.24.0-r1201 description:
   Fastly module v1.2.0 for Nginx 1.24.0
   ```

   Alpine Linux does not support querying the metadata for packages that have been downloaded but not installed.

</Panel>
<Panel id="debian-/-ubuntu" label="Debian / Ubuntu">

To query an installed package on Ubuntu and Debian systems, use `apt-cache show <package name>`. To query a packaged downloaded from [https://dl.security.fastly.com](https://dl.security.fastly.com), use `dpkg-deb -I <file name>`. For example:

   ```term copy nolinenums
   $ dpkg-deb -I nginx-module-fastly-nxs_1.24.0-1201_amd64.deb
   ```

   The output will look something like this:

   ```term copy nolinenums
   new Debian package, version 2.0.
   size 49434 bytes: control archive=461 bytes.
      1 bytes,     0 lines      conffiles
      365 bytes,    11 lines      control
      80 bytes,     1 lines      md5sums
   Package: nginx-module-fastly-nxs
   Version: 1.24.0-1201
   Section: misc
   Priority: optional
   Architecture: amd64
   License: Copyright 2014-2025 Fastly, Inc. Proprietary and Confidential.
   Maintainer: Fastly Support <support@fastly.com>
   Installed-Size: 137
   Depends: nginx-r1.24.0
   Homepage: https://docs.fastly.com/guides/next-gen-waf/
   Description: Fastly module v1.2.0 for Nginx 1.24.0
   ```

</Panel>
<Panel id="rhel-/-centos-/-amazon" label="RHEL / CentOS / Amazon">

RHEL, CentOS, and Amazon Linux use the RPM package manager. To query an installed package, use `rpm -qi <package name>`. To query a packaged downloaded from [https://dl.security.fastly.com](https://dl.security.fastly.com), use `rpm -qip <file name>`. For example:

   ```term copy nolinenums
   $ rpm -qip nginx-module-fastly-nxm-1.27.4-1201.aarch64.rpm
   ```

   The output will look something like this:

   ```term copy nolinenums
   Name        : nginx-module-fastly-nxm
   Version     : 1.27.4
   Release     : 1201
   Architecture: aarch64
   Install Date: (not installed)
   Group       : (none)
   Size        : 142064
   License     : Copyright 2014-2025 Fastly, Inc. Proprietary and Confidential.
   Signature   : RSA/SHA256, Thu Jan  1 00:00:00 1970, Key ID d292629db61c0150
   Source RPM  : nginx-module-fastly-nxm-1.27.4-1201.src.rpm
   Build Date  : Wed Apr  2 01:03:15 2025
   Build Host  : ip-172-16-1-199
   Packager    : Fastly Support <support@fastly.com>
   Vendor      : Fastly, Inc.
   URL         : https://docs.fastly.com/guides/next-gen-waf/
   Summary     : Fastly module for Nginx
   Description : Fastly module 1.20.0 for Nginx 1.27.4
   Fastly module for Nginx
   ```

</Panel>
 -->

