# How to Install QBCore Framework on Your FiveM Server (/docs/fivem/install-qbcore)



import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
import { Step, Steps } from 'fumadocs-ui/components/steps';

**QBCore** is an open-source FiveM roleplay framework that provides jobs, gangs, housing, inventory, phone, HUD, and more. It includes built-in multicharacter support and a gang system — features that require addons on ESX.

Prerequisites [#prerequisites]

* A **MySQL/MariaDB database** — create one in the **Databases** tab on the [XGamingServer Panel](https://panel.xgamingserver.com). MariaDB is recommended over MySQL by both QBCore and oxmysql documentation
* A **FiveM license key** from [keymaster.fivem.net](https://keymaster.fivem.net)

Install QBCore [#install-qbcore]

The recommended method is the **txAdmin recipe** — it downloads \~70 resources, imports the database schema, and configures server.cfg automatically.

<Steps>
  <Step>
    Open txAdmin Server Deployer [#open-txadmin-server-deployer]

    Access txAdmin through your panel. At the deployment step, select **Popular Template**, then choose **"QBCore Framework"**.
  </Step>

  <Step>
    Configure the database connection [#configure-the-database-connection]

    When prompted, enter the MySQL connection string using the credentials from your **Databases** tab:

    ```
    mysql://dbuser:dbpassword@127.0.0.1:3306/dbname?charset=utf8mb4
    ```

    > If your password contains special characters, use the semicolon format instead: `user=root;password=12345;host=127.0.0.1;port=3306;database=dbname`
  </Step>

  <Step>
    Complete the recipe [#complete-the-recipe]

    The recipe automatically:

    * Downloads cfx-server-data (default resources)
    * Installs **oxmysql** (MySQL connector)
    * Installs **pma-voice** + **qb-radio** (voice chat)
    * Installs **\~50 qb-* resources*\* (core, HUD, inventory, phone, jobs, gangs, housing, etc.)
    * Installs standalone dependencies (PolyZone, progressbar, menuv, connectqueue)
    * Imports `qbcore.sql` into your database
    * Deploys a preconfigured `server.cfg`
  </Step>

  <Step>
    Start the server [#start-the-server]

    Once the recipe completes, start the server from **Console**. QBCore is fully installed.
  </Step>
</Steps>

Key server.cfg Entries [#key-servercfg-entries]

The recipe generates these — you can adjust after install:

```ini
sv_enforceGameBuild 3095
set mysql_connection_string "mysql://user:password@localhost:3306/dbname?charset=utf8mb4"

# Voice
setr voice_useNativeAudio true
setr voice_useSendingRangeOnly true
setr voice_defaultCycle "GRAVE"
setr voice_defaultVolume 0.3

# QBCore
setr qb_locale "en"
setr UseTarget false

# Start order
ensure qb-core
ensure [qb]
ensure [standalone]
ensure [voice]
ensure [defaultmaps]

# Permissions
add_ace resource.qb-core command allow
add_ace qbcore.god command allow
```

Key Configuration (config.lua) [#key-configuration-configlua]

After installing, customize QBCore in `resources/[qb]/qb-core/config.lua`:

| Setting                          | Default                                   | Description                         |
| -------------------------------- | ----------------------------------------- | ----------------------------------- |
| `QBConfig.Money.MoneyTypes`      | `{ cash = 500, bank = 5000, crypto = 0 }` | Starting money for new characters   |
| `QBConfig.Money.PayCheckTimeOut` | `10`                                      | Paycheck interval in minutes        |
| `QBConfig.Player.HungerRate`     | —                                         | Hunger decrease rate                |
| `QBConfig.Player.ThirstRate`     | —                                         | Thirst decrease rate                |
| `QBConfig.DefaultSpawn`          | —                                         | Coordinates for default spawn point |

Max players is read from `sv_maxclients` in server.cfg (default 48).

Common Issues [#common-issues]

| Problem                    | Fix                                                                                               |
| -------------------------- | ------------------------------------------------------------------------------------------------- |
| Database connection failed | Check connection string. Special characters in password need URL-encoding or use semicolon format |
| Resources not starting     | Ensure `qb-core` starts before `[qb]` in server.cfg                                               |
| "Table not found" errors   | `qbcore.sql` wasn't imported. Re-run the recipe or import manually via phpMyAdmin                 |
| OneSync errors             | The recipe sets `set onesync on` — verify it's in your server.cfg                                 |

Related Guides [#related-guides]

* [Database Setup](/docs/fivem/database-setup)
* [ESX Framework](/docs/fivem/install-esx)
* [ESX vs QBCore](/docs/fivem/esx-vs-qbcore)
* [Install Resources](/docs/fivem/install-resources)
