> For the complete documentation index, see [llms.txt](https://oph3zdev.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://oph3zdev.gitbook.io/docs/paid-scripts/inventory/configuration/server-config.md).

# Server config

Everything in <mark style="color:$primary;">config/server\_config.lua</mark>. This file is loaded **only on the server** and is never sent to clients, so tokens and webhook URLs in it stay private.

### Logging

Master switch for Discord webhook logging. The webhook URLs themselves are set per category below.

```lua
Config.UseDiscordWebhook = false
```

`true` = the same logs are also written into the `oph3z_inventory_logs` database table, where the admin panel's Logs tab reads them.

```lua
Config.DatabaseLogs = true
```

How many days database logs are kept before they are cleaned up automatically. `0` = keep forever.

```lua
Config.LogRetentionDays = 7
```

### Discord bot token

Used only to show real Discord profile pictures in the admin panel's player list. Leave it empty and initials are shown instead. Never share this file with the token filled in.

```lua
Config.DiscordBotToken = ""
```

### Webhook branding

How the embeds look in your Discord channel - the sender name, its avatar, a thumbnail image and the footer.

```lua
Config.WebhookName = "oph3z-inventory"
Config.WebhookAvatar = ""
Config.WebhookThumbnail = ""
Config.WebhookFooterText = "oph3z-inventory"
Config.WebhookFooterIcon = ""
```

### Webhook categories

One Discord webhook URL per log category, so different actions can go to different channels. An empty string disables that category.

* `give` - player to player gives.
* `shop` - purchases.
* `craft` - crafting and collecting.
* `rob` - items taken from another player.
* `drop` - ground drops and pickups.
* `storage` - stash, trunk, glovebox and containers.
* `money` - money item movement.
* `admin` - admin menu and item commands.
* `trade` - completed trades (always in the database too).
* `weapons` - attachments, repairs, paint and filed serials.
* `world` - shops, stations, workbenches and items managed from the admin panel.

```lua
Config.Webhooks = {
    give = "",
    shop = "",
    craft = "",
    rob = "",
    drop = "",
    storage = "",
    money = "",
    admin = "",
    trade = "",
    weapons = "",
    world = ""
}
```

### Webhook colors

The embed color per category, as a decimal color value.

```lua
Config.WebhookColors = {
    give = 3908956,
    shop = 7059311,
    craft = 15113010,
    rob = 14561583,
    drop = 6208110,
    storage = 4176597,
    money = 6989434,
    admin = 15112531,
    trade = 3066993,
    weapons = 10233776,
    world = 5793266
}
```
