QBCore tutorials: from first server to custom Lua scripts
Start with the task you want to finish. These guides cover QBCore server setup, Lua resource development, jobs, player data, NUI, and debugging. You do not need to complete every tutorial in order.
Choose a tutorial by task
| I want to… | Start here | What to verify |
|---|---|---|
| Create a QBCore test server | Quickstart with txAdmin | The server boots and a test client connects |
| Run QBCore in Docker | QBCore Docker Compose guide | FXServer, MariaDB, txAdmin and saved characters survive restarts |
| Install QBCore on Windows or Linux | Installation guides | The recipe, database and resource order are correct |
| Learn Lua for FiveM | Lua scripting tutorial | A small client resource starts without errors |
| Build my first QBCore script | QBCore scripting guide | An fxmanifest.lua loads a client/server script |
| Configure QBCore crafting recipes safely | qb-crafting reference | Ingredients, reputation, and server event authorization match the deployed version |
| Create or edit a job | Create a job | Defined grades and assignments work in-game |
| Handle QBCore player data and events | Functions and events | The API matches the correct client/server side |
| Build a browser-to-Lua form | NUI callback tutorial | Input, cancellation and invalid data are handled |
| Diagnose a nil export or broken resource | Debugging | The first failure is reproducible and isolated |
| Check a downloaded resource's manifest | Compatibility Analyzer | Dependencies and references have been reviewed, followed by staging tests |
| Update existing scripts safely | Resource update guide | Data and resource rollback are tested |
For exact function signatures rather than a walkthrough, use the
QBCore API reference. Each technical example should be compared with the
qb-core revision installed on your server.
Learning Paths
Beginner QBCore tutorials
Install a test server, learn Lua syntax, understand resources and run your first script.
Intermediate QBCore tutorials
Work with jobs, player state, events, callbacks and NUI forms.
Advanced QBCore tutorials
Investigate profiler results, server authority, upgrades and persistent data changes.
QBCore video tutorials
Find video lessons and verify their API calls against the written references.
Featured Tutorials
Quick Start Series
A reliable first project is a separate, read-only client resource, not an edit to
qb-core itself.
- Start a test server: follow txAdmin QBCore quickstart, then first-boot checks.
- Understand the layout: read FiveM resource development and QBCore architecture.
- Load a simple resource: create
fxmanifest.luaandclient.luafollowing the QBCore scripting tutorial. - Observe a local event: use player data and the QBCore event guide to read your current character state after login.
- Validate: open the FiveM F8 console, run your test command, and fix the first error before expanding the resource.
For example, after declaring a client script and qb-core dependency in your manifest,
this read-only Lua command checks the currently loaded character:
-- client.lua — executed inside a FiveM client resource
local QBCore = exports['qb-core']:GetCoreObject({ 'Functions' })
RegisterCommand('qbnet-jobcheck', function()
local player = QBCore.Functions.GetPlayerData()
if not player or not player.job then
print('Load a character before running /qbnet-jobcheck')
return
end
print(('Current job: %s'):format(player.job.name))
end, false)This command only prints local state to F8. It does not assign jobs or authorize restricted operations. For the complete manifest and server-side rules, continue with create your first resource.
Character login and spawn setup
When working on first login, follow the actual separation between resources:
- qb-multicharacter controls character slots, selection and the handoff after login.
- qb-spawn configures selectable public spawn locations via
QB.Spawns. - Multicharacter loading troubleshooting covers characters stuck before the spawn interface appears.
Do not copy a Config.Spawns example from an unrelated fork into the current
qb-spawn resource.
Popular Topics
| Workflow | Tutorial or reference |
|---|---|
| Define jobs and grades | Create a job |
| Assign a player's job | Set a job |
| Add a usable inventory item | Usable-item workflow |
Set up qb-target interactions | qb-target: zones and options |
| Handle a client/server callback | NUI callback |
| Find a QBCore server function | Server functions |
| Listen for player and job events | QBCore events |
| Diagnose a hitch or high resource usage | Profiler and server optimization |
Tutorial Categories
Framework comparisons
If you're choosing or migrating a framework, read QBCore vs ESX, QBCore vs Qbox or the broader FiveM framework comparison. These cover different research tasks; a framework compatibility label alone does not establish that your installed inventory, jobs or UI resources can migrate unchanged.
Server administration
For production operations, use admin permissions, resource load order and backups or resource updates rather than deploying experimental example code directly to a populated server.
Resource development
Continue from Lua fundamentals to QBCore functions, events, client/server API and safe server events. A handler that changes money, items, permissions or jobs must enforce the rules on the server.
Getting Started
Use a separate FiveM test server and record your exact qb-core and resource commits.
A useful first acceptance check is straightforward: the resource starts, the command
returns the expected result after login, and a disconnected or not-yet-loaded player
does not cause a Lua exception.
Once that works, choose the intermediate path for jobs and browser forms or the advanced path for security review, profiling and migrations.
Contributing to Tutorials
To report a broken example, use support with the page URL, resource commit, file path, first console error and reproduction steps. Redact credentials, license identifiers and private player data. For an upstream API issue, report it to the relevant QBCore source repository.
The guides are independent community documentation. A source-verified snippet is not proof that it has been exercised on your particular server or inventory replacement.
