> For the complete documentation index, see [llms.txt](https://waf-doc.inext.checkpoint.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://waf-doc.inext.checkpoint.com/getting-started/deploy-enforcement-point/linux/kong-plug-in.md).

# Kong Plug In

## Prerequisites

* An existing deployment of Kong for Linux.&#x20;

## Installation

For deployment instructions follow steps in the Profile

#### Step 1 - Enforce Policy if not done already.

#### Step 2 -  Run these commands from a Linux server shell:

1. Install the dependencies

```
sudo apt-get update
sudo apt-get install -y libbrotli1 libbrotli-dev zlib1g-dev build-essential git curl ca-certificates
```

2. Run the command to install the Lua Plug In

```
luarocks install --server=https://luarocks.org/manifests/cloud-guard-waf cloudguard-waf-kong-plugin
export KONG_PLUGINS="bundled,cloudguard-waf-kong-plugin"
kong restart
curl -i -X POST http://localhost:8001/plugins --data "name=cloudguard-waf-kong-plugin"
```

{% hint style="info" %}
If `kong restart` fails with:\
`undefined symbol: BrotliDecoderSetParameter`

Ensure Brotli runtime libraries are installed and accessible:

```
sudo apt-get install -y libbrotli1
ldconfig -p | grep libbrotli
```

If the error persists, preload the detected Brotli libraries before restarting Kong.

```
export LD_PRELOAD="$(ldconfig -p | awk '/libbrotlidec.so.1/{print $4}')":"$(ldconfig -p | awk '/libbrotlicommon.so.1/{print $4}')"
kong restart
```

{% endhint %}

#### 3: Install the Agent

Run the following commands from the linux server shell, from the same location as previous step:

`chmod +x nanoegg`

`./nanoegg --install --token <token>`

{% hint style="info" %}
Make sure you obtain the \<token> from the [Enforcement **Profile**](/getting-started/deploy-enforcement-point.md) page, **Authentication** section. you will need it during agent deployment.

![](/files/tAyti9aG3utyFHls2McN)
{% endhint %}

The installer creates an initial registration with the CloudGuard WAF cloud and downloads the latest version of the agent installation.

#### Step 4: Verify installation

The agent will automatically install, connect and should display a successful connection message within the CloudGuard WAF web portal:

![](/files/B5QRYAp16foZFHtumQU3)

To check agent status after the installation from the Linux server shell, you can run:

`cpnano -s`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://waf-doc.inext.checkpoint.com/getting-started/deploy-enforcement-point/linux/kong-plug-in.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
