# Installation

:::::steps
### Install the dependencies

These must be started before the inventory:

- `oxmysql`
- your framework (`es_extended` or `qb-core`)
- [`koja-lib`](/koja-lib/getting-started)

The manifest declares `oxmysql` and `koja-lib` as dependencies, so the resource will not start without them.

### Stop your old inventory

Only one inventory can run. Remove `ensure ox_inventory` (or `qb-inventory`, `qs-inventory` and so on) from `server.cfg`. If you come from ox_inventory, keep its `data/` folder: it is imported automatically. See [Migrating from ox_inventory](/new/inventory-v2/migrating-from-ox).

### Add the resource

Put the `koja-inventory-v2` folder in your resources directory. The folder name is the resource name and the name used by exports, so do not rename it.

### Edit server.cfg

```cfg title="server.cfg"
ensure oxmysql
ensure es_extended   # or qb-core
ensure koja-lib
ensure koja-inventory-v2
ensure ox_inventory  # only the bridge, see below
```

::::hint{type="info" title="The ox_inventory bridge"}
`bridge/ox_inventory/fxmanifest.lua` turns your old `ox_inventory` folder into a tiny bridge resource: delete everything in `ox_inventory` except `data/`, copy that manifest in, and ensure it after `koja-inventory-v2`. ESX then keeps running in its ox mode, and resources with `dependency 'ox_inventory'` still start. Without the bridge everything else works, because the inventory also answers `exports.ox_inventory` calls itself.
::::

### Give admins access

Admin commands and the `/invadmin` panel are allowed for the ACE `command.koja-inventory-v2` and for the framework groups in `Config.AdminGroups` (`admin`, `superadmin`, `god` by default).

```cfg title="server.cfg"
add_ace group.admin command.koja-inventory-v2 allow
```

### Database

Nothing to import. On start the resource creates one table, `koja_inventory_v2`, that holds every inventory (players, slots, backpacks, stashes, trunks, gloveboxes). If you used the older `koja_grid_inventory` build, its table is renamed to `koja_inventory_v2` automatically on the first start. See [Database](/new/inventory-v2/database).

### Item images

Images are read from `Config.ImagePath` (default `images/`, which is `web/build/images/<item>.png`). The release already contains images for the default items. You can point the path at another resource, for example `nui://ox_inventory/web/images/`. Items without an image show a category icon.

### Start and check the console

On start the console prints a banner with the version, framework, koja-lib version, database status, item count (and how many came from ox), shops, stashes, benches, admin locations, enabled features and detected integrations (ox compatibility, target, appearance). If a line says `off` for something you use, check that the resource is started before the inventory.
:::::

## First-run checklist

- [ ] The banner shows `Database connected` and no red errors.
- [ ] The item count includes your ox items (`Items ... (ox N)`).
- [ ] Join and press `TAB`. The inventory opens and your old items are there.
- [ ] Type `/invkit` as an admin. You get the showcase kit.
- [ ] Open a trunk, drop an item, open a shop and craft something at a bench.
- [ ] Open `/invadmin` and check the Locations tab lists your shops, stashes and benches.
- [ ] Set `Config.Locale` to your server language. See [Translations](/new/inventory-v2/translations).
