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

# Install the Lua resource in FiveM

> The dashboard talks to your game server through a small Lua resource called nexora-dashboard. Without it, the dashboard shows zero live data.

The dashboard talks to your game server through a small Lua resource called `nexora-dashboard`. Without it, the dashboard shows zero live data.

## What you need

* The `nexora-dashboard` folder (ships inside the release ZIP, located at `/home/fivem/nexora-dashboard/` after you extract).
* Your `FIVEM_API_KEY` (printed at the end of the install script, also in `/home/fivem/.env`).
* Your dashboard URL (e.g. `https://dash.yourdomain.com`).
* Access to your FiveM server's `resources/` folder and `server.cfg`.

## Step 1: Copy the folder

Drop the `nexora-dashboard` folder anywhere inside your server's `resources/` directory. Subfolder doesn't matter (`[standalone]/`, `[hb]/`, root, anywhere), FiveM finds it automatically.

Keep the folder name **exactly** `nexora-dashboard`, `fxmanifest.lua` references it.

## Step 2: Add convars to `server.cfg`

The resource is configured entirely via FiveM convars. Add these lines to your `server.cfg` **before** the `ensure nexora-dashboard` line:

```
set DASHBOARD_URL "https://dash.yourdomain.com"
set DASHBOARD_API_KEY "paste your FIVEM_API_KEY here"
```

* `DASHBOARD_URL`: your dashboard URL, no trailing slash.
* `DASHBOARD_API_KEY`: the `FIVEM_API_KEY` printed by the install script (also in `/home/fivem/.env`). Must match exactly.

## Step 3: Ensure the resource

Add this line in `server.cfg` near your other `ensure` lines:

```
ensure nexora-dashboard
```

If you use ESX or older QBCore that loads resources in a specific order, put it **after** your framework (`qbx_core`, `qb-core`, `es_extended`) so it can detect which framework is running.

## Step 4: Restart

From the FiveM live console:

```
restart nexora-dashboard
```

Or restart the whole server. You should see lines like:

```
[nexora-dashboard] starting...
[nexora-dashboard] framework detected: qbx
[nexora-dashboard] connected to dashboard
```

If you see `ERROR: DASHBOARD_URL or DASHBOARD_API_KEY convar not set in server.cfg!`, double-check Step 2.

## Step 5: Verify in the dashboard

Open the dashboard → **Online Players** page. Within 5 seconds you should see your online players.

If the page is empty:

* Check the FiveM console for `[nexora-dashboard]` errors.
* Make sure `DASHBOARD_API_KEY` convar exactly matches `FIVEM_API_KEY` in `/home/fivem/.env`.
* Make sure `DASHBOARD_URL` is reachable from the FiveM server (not blocked by firewall). Test with `curl https://yourdomain.com/api/health`.

## Updating the resource later

When a new version of the dashboard ships, download the new release ZIP from your Tebex purchase page, extract it, and copy the fresh `nexora-dashboard/` folder over the old one on your game server. Your convars in `server.cfg` stay in place. Then `restart nexora-dashboard` in the FiveM console.
