Install from GitHub package files

Note:

If you are using NGINX One Console to manage your NGINX instances, NGINX Agent is installed automatically when you add an NGINX instance to NGINX One Console.

For a quick guide on how to connect your instance to NGINX One Console see: Connect to NGINX One Console

Follow the steps in this guide to install NGINX Agent in your NGINX instance using GitHub package files.

Before you begin

  • You must use one of the supported operating system and architectures
  • The user running the NGINX Agent installation must have the same privileges as the main NGINX process. We recommend not running NGINX or NGINX Agent as the root user.

GitHub package files

To install NGINX Agent on your system using GitHub package files, go to the GitHub releases page and download the latest package supported by your operating system distribution and CPU architecture.

Use your system’s package manager to install the package. Some examples:

  • Debian, Ubuntu, and other distributions using the dpkg package manager.

    sudo dpkg -i nginx-agent-<agent-version>.deb
  • RHEL, CentOS RHEL, Amazon Linux, Oracle Linux, and other distributions using the yum package manager

    sudo yum localinstall nginx-agent-<agent-version>.rpm
  • RHEL and other distributions using the rpm package manager

    sudo rpm -i nginx-agent-<agent-version>.rpm
  • Alpine Linux

    sudo apk add nginx-agent-<agent-version>.apk
  • FreeBSD

    sudo pkg add nginx-agent-<agent-version>.pkg

Manually connect NGINX Agent to NGINX One Console

If you have installed NGINX Agent manually, you will need to connect it to the NGINX One Console to manage your NGINX instances.

  1. Ensure NGINX Agent is installed

  2. Locate the NGINX Agent Configuration File:

    /etc/nginx-agent/nginx-agent.conf
  3. Open the NGINX Agent configuration file in a text editor like vim:

    sudo vim /etc/nginx-agent/nginx-agent.conf
  4. Uncomment the command block, and set the token to your data plane key

  5. Save the changes and close the editor

  6. Restart the NGINX Agent service:

    sudo systemctl stop nginx-agent

Start, stop, and enable NGINX Agent

To start NGINX Agent on systemd systems, run the following command:

sudo systemctl start nginx-agent

To enable NGINX Agent to start on boot, run the following command:

sudo systemctl enable nginx-agent

To stop NGINX Agent, run the following command:

sudo systemctl stop nginx-agent

Verify that NGINX Agent is running

Once you have installed NGINX Agent, you can verify that it is running with the following command:

sudo systemctl status nginx-agent

To check the version installed, run the following command:

sudo nginx-agent -v