ox_inventory is the most widely used slot-based inventory for FiveM roleplay servers. Originally built by Overextended and now community-maintained under CommunityOx, it provides metadata-aware items, stashes, shops, and a clean NUI. This guide walks through installing it correctly: getting the dependencies in the right load order, pointing it at your framework, importing the database, and wiring up item images. Get the order wrong and the resource simply will not start, so follow each step in sequence.
Dependencies you need first
ox_inventory does not run on its own. It relies on two required resources and one common optional one:
- oxmysql — handles every database query the inventory makes (saved items, stashes, vehicle trunks).
- ox_lib — shared library providing UI, callbacks, and utility functions.
- ox_target — optional, but recommended if you want targeted interaction with stashes and shops.
If you have not set up your database connection yet, configure oxmysql first — our FiveM oxmysql database guide covers the connection string and common errors. ox_inventory also needs a framework: vanilla ox_core, ESX (es_extended), or QBox (qbx_core). If you are running QBCore, see our QBCore installation walkthrough before adding the inventory.
Installing the resource
Always grab the latest release from the official CommunityOx repository rather than re-uploading old copies. The web UI is shipped pre-built in releases, but if you clone the source you must build it yourself:
git clone https://github.com/communityox/ox_inventory.git
cd ox_inventory/web
pnpm i
pnpm build
Drop oxmysql, ox_lib, your framework, ox_target, and ox_inventory into your resources folder. If you downloaded a tagged release ZIP, the web/build directory is already populated and you can skip the pnpm build step entirely.
Load order in server.cfg
This is the single most common failure point. ox_inventory must start after its dependencies, or it will throw errors and items will not load. Use the exact order below in your server.cfg:
ensure oxmysql
ensure ox_lib
ensure es_extended # or qbx_core / ox_core
ensure ox_target
ensure ox_inventory
The official docs express this as start oxmysql → start ox_lib → start framework → start ox_target → start ox_inventory. Using ensure is functionally equivalent and is the recommended modern keyword because it also restarts a resource if it is already running.
Telling ox_inventory which framework to use
ox_inventory ships with bridge code for several frameworks and selects which one to use through a convar. Add this to your server.cfg alongside the other inventory settings:
setr inventory:framework "esx"
Supported values include ox, esx, qbx, and nd. If your framework is not listed, copy the ox directory from the bridge folder, rename it to match, and adapt the event handlers — the docs note these are the bare-minimum functions you will need to customize.
Key configuration convars
Most behavior is controlled by convars set in server.cfg rather than editing Lua. These are the ones you will touch most often:
| Convar | Example | Purpose |
|---|---|---|
| inventory:framework | “esx” | Selects the framework bridge |
| inventory:slots | 50 | Number of player inventory slots |
| inventory:weight | 30000 | Max carry weight in grams |
| inventory:imagepath | “nui://ox_inventory/web/images” | Where item icons load from |
| inventory:clearstashes | “6 MONTH” | Auto-purge old stashes |
setr inventory:slots 50
setr inventory:weight 30000
setr inventory:imagepath "nui://ox_inventory/web/images"
set inventory:clearstashes "6 MONTH"
Defining items and adding images
Items are defined in data/items.lua inside the resource. Each item entry sets a label, weight, and optional metadata. The image for an item is matched by filename: ox_inventory looks for a PNG in the web/images folder named exactly after the item’s name (its key in items.lua). So an item keyed water needs a water.png file in web/images.
- Place icons in
ox_inventory/web/images/as..png - Keep filenames lowercase and exactly matching the item key — mismatches show a blank icon, not an error.
- The default load path is
nui://ox_inventory/web/images; changeinventory:imagepathonly if you serve images from elsewhere.
Database setup
ox_inventory stores persistent data through oxmysql. If you are migrating from a framework’s built-in inventory, expect compatibility errors — the docs warn that replacing a built-in inventory is not seamless. Confirm oxmysql connects cleanly (no startup errors in your console) before launching ox_inventory, otherwise items and stashes will fail to save. Always check the current README in the repository for the exact tables and any SQL the version you downloaded expects, since these can change between releases.
Hosting that keeps ox_inventory smooth
A full RP stack — framework, inventory, target, voice, and dozens of resources — needs consistent CPU clock speed and a fast database. If your inventory feels laggy under load, profile it with resmon before blaming the script. For a managed environment with the FxServer artifacts, a tuned MySQL, and one-click resource management, our FiveM roleplay hosting plans are built for exactly this kind of setup, and the FiveM hosting documentation covers panel-side configuration.
FAQ
Why won’t ox_inventory start?
Almost always a load-order problem. oxmysql and ox_lib must be ensured before ox_inventory, and your framework must start in between. Check your console for “resource not found” or dependency errors and confirm the ensure lines in server.cfg follow the order shown above.
My item icons are blank — what’s wrong?
The PNG filename must match the item’s name in data/items.lua exactly, in lowercase, and live in web/images. A missing or misnamed file produces a blank slot rather than an error, so double-check spelling and confirm inventory:imagepath points to nui://ox_inventory/web/images.
Does ox_inventory work with both ESX and QBCore?
Yes. Set inventory:framework to esx for ESX or qbx for QBox; vanilla ox and nd are also supported. For other or heavily customized frameworks you can adapt the bridge directory, but verify the current bridge list in the official docs since supported values evolve.
Ready to play?
Run your own FiveM server with XGamingServer
Spin up an always-on FiveM server your friends can join in minutes — no port-forwarding, no tech headaches.







