Skip to main content

Installing Qbox Core

This guide will walk you through installing Qbox Core and all required dependencies for your FiveM server.
Qbox Core requires FiveM server build 10731 or higher with OneSync Infinity enabled.

Prerequisites

Before installing Qbox Core, ensure your server meets these requirements:
  • FiveM server artifacts build 10731+
  • OneSync Infinity enabled
  • MySQL database server
  • Basic knowledge of FiveM server administration

Dependencies

Qbox Core requires three core dependencies that must be installed first:

oxmysql

Database connector for MySQL/MariaDB

ox_lib

Utility library with UI components

ox_inventory

Modern inventory system

Step 1: Enable OneSync Infinity

OneSync Infinity is required for Qbox Core to function. The server will not start without it.
Enable OneSync Infinity in your server configuration:
  1. Open your txAdmin panel
  2. Navigate to Settings → FXServer
  3. Find “OneSync” setting
  4. Select “Infinity” from the dropdown
  5. Save and restart your server

Step 2: Install oxmysql

1

Download oxmysql

Download the latest release from GitHub
2

Extract to resources

Extract the oxmysql folder to your resources directory
3

Configure database connection

Add your database connection string to server.cfg:
server.cfg
set mysql_connection_string "mysql://username:password@localhost/database?charset=utf8mb4"
4

Start the resource

Add to your server.cfg before qbx_core:
server.cfg
ensure oxmysql
Replace username, password, localhost, and database with your actual MySQL credentials.

Step 3: Install ox_lib

1

Download ox_lib

Download the latest release (v3.20.0 or higher) from GitHub
2

Extract to resources

Extract the ox_lib folder to your resources directory
3

Start the resource

Add to your server.cfg:
server.cfg
ensure ox_lib
Qbox Core requires ox_lib version 3.20.0 or higher. Make sure you download a compatible version.

Step 4: Install ox_inventory

1

Download ox_inventory

Download the latest release (v2.42.1 or higher) from GitHub
2

Extract to resources

Extract the ox_inventory folder to your resources directory
3

Configure for Qbox

Add this to your server.cfg before starting ox_inventory:
server.cfg
setr inventory:framework "qbx"
4

Start the resource

Add to your server.cfg:
server.cfg
ensure ox_inventory
The inventory:framework convar must be set to "qbx" for Qbox Core to work properly.

Step 5: Install qbx_core

1

Download qbx_core

Download the latest release from GitHub
2

Extract to resources

Extract the qbx_core folder to your resources directory
3

Import database

Import the qbx_core.sql file into your MySQL database:
mysql -u username -p database < qbx_core.sql
Or use phpMyAdmin/HeidiSQL to import the file manually.
4

Start the resource

Add to your server.cfg after the dependencies:
server.cfg
ensure qbx_core

Step 6: Verify installation

Your server.cfg should now include these lines in this order:
server.cfg
# Database
set mysql_connection_string "mysql://username:password@localhost/database?charset=utf8mb4"

# OneSync
set onesync on
setr onesync_enableInfinity 1

# Inventory Framework
setr inventory:framework "qbx"

# Dependencies
ensure oxmysql
ensure ox_lib
ensure ox_inventory

# Qbox Core
ensure qbx_core
The order matters! Make sure dependencies are loaded before qbx_core.

Optional dependencies

For full functionality, you may want to install these additional resources:

qbx_vehiclekeys

Vehicle key system for persistent vehicles
config/server.lua
giveVehicleKeys = function(src, plate, vehicle)
    return exports.qbx_vehiclekeys:GiveKeys(src, vehicle)
end

qbx_spawn

Spawn selection system (required if startingApartment = true)
config/client.lua
characters = {
    startingApartment = true,
}

qbx_idcard

ID card system for starter items
config/shared.lua
starterItems = {
    { name = 'id_card', amount = 1 },
}

Renewed-Banking

Society banking system
config/server.lua
money = {
    paycheckSociety = true
}

Database tables

The qbx_core.sql file creates these essential tables:

players table

Stores all player character data:
CREATE TABLE IF NOT EXISTS `players` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `citizenid` varchar(50) NOT NULL,
  `cid` int(11) DEFAULT NULL,
  `license` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `money` text NOT NULL,
  `charinfo` text DEFAULT NULL,
  `job` text NOT NULL,
  `gang` text DEFAULT NULL,
  `position` text NOT NULL,
  `metadata` text NOT NULL,
  `inventory` longtext DEFAULT NULL,
  `phone_number` VARCHAR(20) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`citizenid`)
);

player_groups table

Stores player job and gang assignments:
CREATE TABLE IF NOT EXISTS `player_groups` (
  `citizenid` VARCHAR(50) NOT NULL,
  `group` VARCHAR(50) NOT NULL,
  `type` VARCHAR(50) NOT NULL,
  `grade` TINYINT(3) UNSIGNED NOT NULL,
  PRIMARY KEY (`citizenid`, `type`, `group`),
  CONSTRAINT `fk_citizenid` FOREIGN KEY (`citizenid`) 
    REFERENCES `players` (`citizenid`) 
    ON UPDATE CASCADE 
    ON DELETE CASCADE
);

bans table

Stores player bans:
CREATE TABLE IF NOT EXISTS `bans` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) DEFAULT NULL,
  `license` varchar(50) DEFAULT NULL,
  `discord` varchar(50) DEFAULT NULL,
  `ip` varchar(50) DEFAULT NULL,
  `reason` text DEFAULT NULL,
  `expire` int(11) DEFAULT NULL,
  `bannedby` varchar(255) NOT NULL DEFAULT 'LeBanhammer',
  PRIMARY KEY (`id`)
);

Troubleshooting

Error message:
OneSync Infinity is not enabled
Solution: Make sure you have enabled OneSync Infinity in txAdmin settings or added +set onesync on to your startup command.
Error message:
ox_lib version 3.20.0 or higher is required
Solution: Download the latest version of ox_lib from the GitHub releases page.
Error message:
ox_inventory version 2.42.1 or higher is required
Solution: Download the latest version of ox_inventory from the GitHub releases page.
Error message:
inventory:framework must be set to "qbx"
Solution: Add setr inventory:framework "qbx" to your server.cfg before starting ox_inventory.
Error message:
Failed to execute mysql_connection_string
Solution: Check your MySQL credentials in the connection string. Make sure the database exists and the user has proper permissions.

Server convars

Qbox Core supports several optional convars for customization:
server.cfg
# Maximum jobs per player (default: 1)
setr qbx:max_jobs_per_player 2

# Maximum gangs per player (default: 1)  
setr qbx:max_gangs_per_player 1

# Should SetJob replace current job? (default: true)
setr qbx:setjob_replaces "true"

# Should SetGang replace current gang? (default: true)
setr qbx:setgang_replaces "true"

# Routing bucket lockdown mode (default: inactive)
# Options: strict, relaxed, inactive
setr qbx:bucketlockdownmode "inactive"

# Inventory accounts (default: ["money"])
setr inventory:accounts '["money"]'

Next steps

Quick Start Guide

Now that you have installed Qbox Core, learn how to configure it and create your first character

Build docs developers (and LLMs) love