> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nexdev.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation

> How to install NEX Item Whitelist on your FiveM server.

## Requirements

* FiveM server
* MySQL or MariaDB
* [`ox_inventory`](https://github.com/overextended/ox_inventory)
* [`ox_lib`](https://github.com/overextended/ox_lib)
* [`oxmysql`](https://github.com/overextended/oxmysql)
* One of: [`qbx_core`](https://github.com/Qbox-project/qbx_core), [`qb-core`](https://github.com/qbcore-framework/qb-core), or [`es_extended`](https://github.com/esx-framework/esx_core) *(or `none` to run framework-less — set in `config.lua`)*

## Steps

1. Drop the `nex_itemwhitelist` folder into your resources, e.g. `resources/[nex]/nex_itemwhitelist/`.

2. *(Optional)* Import `install.sql` into your database. You can skip this — the `nex_whitelist` table auto-creates and auto-migrates on first start.

3. Add it to `server.cfg` **after** its dependencies:

   ```
   ensure ox_lib
   ensure oxmysql
   ensure ox_inventory
   ensure nex_itemwhitelist
   ```

4. *(Optional)* Open `config.lua` and adjust:
   * `Config.Framework` — `auto` (default), `Qbox`, `QB`, `ESX`, or `none`.
   * `Config.NotifySystem` — which notification backend to use.
   * `Config.Commands` — chat command names.
   * `Config.AdminGroup` — ACE group required for the menu and chat commands (default `group.admin`).
   * `Config.Discord.webhook` — paste your webhook here to log blocked attempts.

5. Grant yourself the admin group:

   ```
   add_ace identifier.steam:XXXXXXXXX group.admin
   ```

6. Restart your server.

## Checking it worked

In-game, run:

```
/whitelistmenu
```

You should get the admin menu. If nothing happens, you don't have the ACE group.

From F8:

```
lua print(GetResourceState('nex_itemwhitelist'))
```

Should print `started`.

## Updating

`config.lua` and `client/notify.lua` are listed under `escrow_ignore` and are preserved across updates. Whitelist entries live in MySQL and are preserved automatically.

1. Replace the resource files with the new version (keep your edited `config.lua`).
2. Restart the server.
