# Install from GitHub package files




**Note:** 
If you are using [NGINX One Console](/nginx-one-console/getting-started.md)
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](/nginx-one-console/connect-instances/add-instance.md)

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](/nginx-one-console/agent/overview/tech-specs.md#supported-distributions)
- 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](https://github.com/nginx/agent/releases) 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.

   ```shell
   sudo dpkg -i nginx-agent-<agent-version>.deb
   ```

- RHEL, CentOS RHEL, Amazon Linux, Oracle Linux, and other distributions using
   the `yum` package manager

  ```shell
  sudo yum localinstall nginx-agent-<agent-version>.rpm
  ```

- RHEL and other distributions using the `rpm` package manager

  ```shell
  sudo rpm -i nginx-agent-<agent-version>.rpm
  ```

- Alpine Linux

  ```shell
  sudo apk add nginx-agent-<agent-version>.apk
  ```

### 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

   ```shell
   nginx-agent -v
   ```

1. Locate the NGINX Agent Configuration File:

   ```shell
   /etc/nginx-agent/nginx-agent.conf
   ```

1. Open the NGINX Agent configuration file in a text editor like vim:

   ```shell
   sudo vim /etc/nginx-agent/nginx-agent.conf
   ```

1. Uncomment the command block, and set the token to your data plane key
1. Save the changes and close the editor
1. Restart the NGINX Agent service:

   ```shell
   sudo systemctl restart nginx-agent
   ```

1. Check the Agent log for `"Agent Connected"`

   ```shell
   sudo cat /var/log/nginx-agent/agent.log | grep "Agent connected"
   ```

## Start, stop, and enable NGINX Agent

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

```shell
sudo systemctl start nginx-agent
```

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

```shell
sudo systemctl enable nginx-agent
```

To stop NGINX Agent, run the following command:

```shell
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:

```shell
sudo systemctl status nginx-agent
```

To check the version installed, run the following command:
```shell
sudo nginx-agent -v
```
