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

# Configuration

> Configure frameworks, integrations, reports, monitoring, inventories, and Discord logs.

YB Admin separates shared settings from server-only integrations so secrets stay off connected clients.

## Editable files

| File                           | Scope       | Purpose                                                                                            |
| ------------------------------ | ----------- | -------------------------------------------------------------------------------------------------- |
| `config.lua`                   | Shared      | Safe feature settings, UI behavior, commands, limits, and presets                                  |
| `editable/server.lua`          | Server only | Owners, groups, permissions, inventory bridge, weather adapters, and private connectivity settings |
| `editable/server/webhooks.lua` | Server only | Discord URLs, category routing, identity, and audit presentation                                   |
| `editable/client.lua`          | Client      | Notifications, revive, appearance, inventory, fuel, and vehicle key integrations                   |

<Warning>
  Never place webhook URLs, private identifiers, credentials, or other secrets in `config.lua` or a client file.
</Warning>

## Framework

`auto` checks QBox first, then QBCore, then ESX.

<Tabs>
  <Tab title="Automatic">
    ```lua theme={"theme":{"light":"github-light","dark":"github-dark"}}
    Config.Framework = 'auto'
    ```
  </Tab>

  <Tab title="QBox">
    ```lua theme={"theme":{"light":"github-light","dark":"github-dark"}}
    Config.Framework = 'qbox'
    ```
  </Tab>

  <Tab title="QBCore">
    ```lua theme={"theme":{"light":"github-light","dark":"github-dark"}}
    Config.Framework = 'qb'
    ```
  </Tab>

  <Tab title="ESX">
    ```lua theme={"theme":{"light":"github-light","dark":"github-dark"}}
    Config.Framework = 'esx'
    ```
  </Tab>
</Tabs>

If a framework resource was renamed, update `Config.FrameworkResources`.

## Owners and groups

Configure bootstrap owners, default groups, permission categories, protected groups, and high-level permissions in `editable/server.lua`.

* Higher group levels represent stronger ranks.
* `inherit` includes every permission from a lower group.
* `*` grants all permissions and should remain owner-only.
* Protected groups cannot be edited or assigned by lower-ranked staff.
* Every action is validated by the server.

See [Permissions and duty](/admin-menu/permissions) for the complete model.

## Duty

```lua theme={"theme":{"light":"github-light","dark":"github-dark"}}
Config.Duty = {
    defaultOn = false,
}
```

When `defaultOn` is false, staff must use **Go On Duty** before opening the full panel or running staff actions.

## Branding

Use a server name or a square image:

```lua theme={"theme":{"light":"github-light","dark":"github-dark"}}
Config.Branding = {
    useServerName = true,
    serverName = 'My Server',
    logoUrl = '',
}
```

## Commands and keybinds

| Setting                   | Default     |
| ------------------------- | ----------- |
| `Config.Command`          | `admin`     |
| `Config.OpenKey`          | `F6`        |
| `Config.StaffChatKey`     | `F7`        |
| `Config.NoclipCommand`    | `noclip`    |
| `Config.NoclipKey`        | `F2`        |
| `Config.ShowNamesCommand` | `shownames` |
| `Config.DevTools.key`     | `F9`        |

These are defaults. Staff can create personal shortcuts from the Keybinds window. Saved bindings are stored in `yb_admin_settings`.

## Reports and evidence

`Config.Reports` controls `/report`, categories, anti-spam limits, dispatch controls, message length, and evidence.

```lua theme={"theme":{"light":"github-light","dark":"github-dark"}}
Config.Reports.evidence.provider = 'screencapture'
-- auto | screencapture | screenshot-basic
```

* `screencapture` supports screenshots and short video evidence.
* `screenshot-basic` supports screenshots only.
* Evidence is uploaded through the `screenshots` webhook route.
* `clearOnResourceStart` keeps the panel session-focused while Discord retains its audit copy.

## Screen viewing and screenshots

`Config.Screenshot` controls live-view limits, capture dimensions, frame rate, bitrate, and the provider used for manual screenshots.

<Tip>
  Start with `960 × 540`, 30 FPS, and 1000 Kbps. Reduce these values for servers with weaker player connections.
</Tip>

Manual screenshots can use `screencapture` or `screenshot-basic`. Live screen viewing is built into YB Admin and does not require either provider.

## Weather and time

Weather adapters are configured in `editable/server.lua`. Presets are included for Renewed-Weathersync and qb-weathersync.

```lua theme={"theme":{"light":"github-light","dark":"github-dark"}}
Config.Dashboard.serverTime.nativeFallback = true
```

When no configured adapter is running, the native fallback synchronizes the selected time and weather directly.

## Inventory and items

The server bridge detects `ox_inventory`, `qs-inventory`, `qb-inventory`, and compatible providers. Configure delivery limits in `Config.Items`:

* `nearbyRadius`
* `maxSelectedItems`
* `maxAmountPerItem`
* `maxTargets`
* `hiddenItems`

Edit provider-specific behavior only in `editable/server.lua` and `editable/client.lua`.

## Economy and property storage

`Config.Economy` controls the leaderboard, cache duration, money items, vehicle storage, and housing presets.

Included presets:

* `qbx_properties`
* `qb-apartments`
* `qb-houses`
* `ox_property`
* `esx_property`

For QBox properties with ox\_inventory, use:

```lua theme={"theme":{"light":"github-light","dark":"github-dark"}}
Config.Economy.properties.script = 'qbx_properties'
```

Saved stashes are resolved as `qbx_properties_<property_name>` and matched to the owner's citizen ID.

## Dashboard and cleanup

* `Config.Dashboard.serverTime` configures time and weather controls.
* `Config.Dashboard.playerChart` configures sampling and chart history.
* `Config.IgnoreZones` protects defined areas from vehicle cleanup.
* `Config.IgnoreModels` protects specific vehicle models.
* `Config.Cleanup` controls countdown limits and default exclusions.
* `Config.AnnouncementUI` controls duration, position, colors, size, and borders.

## Logs and Discord

`Config.Logs` controls the in-panel memory history and automatic categories. Configure Discord delivery in `editable/server/webhooks.lua`.

<AccordionGroup>
  <Accordion title="Use one webhook for everything" icon="webhook">
    Set `PRIMARY_WEBHOOK`. Categories assigned to it share the same Discord channel.
  </Accordion>

  <Accordion title="Use separate category channels" icon="split">
    Add individual URLs to `Config.Webhooks.staff`, `reports`, `bans`, `inventory`, `resources`, or `screenshots`.
  </Accordion>

  <Accordion title="Disable a route" icon="circle-off">
    Leave both the category and its fallback empty.
  </Accordion>
</AccordionGroup>

## Protected resources

`Config.ProtectedResources` blocks accidental changes to critical resources. Set `Config.AllowOwnerProtectedResourceActions = false` when even owners must be prevented from stopping or restarting them.

## Debug mode

Keep `Config.Debug = false` in production. Enable it only while reproducing an integration issue, collect the relevant console output, then disable it again.
