# 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](/quickstart) | The server boots and a test client connects |
| Run QBCore in Docker | [QBCore Docker Compose guide](/tutorials/beginner/qbcore-docker-server) | FXServer, MariaDB, txAdmin and saved characters survive restarts |
| Install QBCore on Windows or Linux | [Installation guides](/docs/installation) | The recipe, database and resource order are correct |
| Learn Lua for FiveM | [Lua scripting tutorial](/tutorials/beginner/lua-scripting-fivem) | A small client resource starts without errors |
| Build my first QBCore script | [QBCore scripting guide](/docs/guides/scripting) | An `fxmanifest.lua` loads a client/server script |
| Configure QBCore crafting recipes safely | [qb-crafting reference](/docs/resources/qb-crafting) | Ingredients, reputation, and server event authorization match the deployed version |
| Create or edit a job | [Create a job](/docs/guides/create-job) | Defined grades and assignments work in-game |
| Handle QBCore player data and events | [Functions](/docs/core/functions) and [events](/docs/core/events) | The API matches the correct client/server side |
| Build a browser-to-Lua form | [NUI callback tutorial](/docs/guides/nui-form-callback) | Input, cancellation and invalid data are handled |
| Diagnose a nil export or broken resource | [Debugging](/docs/development/debugging) | The first failure is reproducible and isolated |
| Check a downloaded resource's manifest | [Compatibility Analyzer](/tools/compatibility-analyzer) | Dependencies and references have been reviewed, followed by staging tests |
| Update existing scripts safely | [Resource update guide](/docs/migration/resource-updates) | Data and resource rollback are tested |

For exact function signatures rather than a walkthrough, use the
[QBCore API reference](/docs/api). 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.

1. **Start a test server:** follow [txAdmin QBCore quickstart](/quickstart), then
   [first-boot checks](/docs/getting-started).
2. **Understand the layout:** read
   [FiveM resource development](/tutorials/beginner/fivem-development-tutorial)
   and [QBCore architecture](/tutorials/beginner/architecture).
3. **Load a simple resource:** create `fxmanifest.lua` and `client.lua` following the
   [QBCore scripting tutorial](/docs/guides/scripting).
4. **Observe a local event:** use [player data](/docs/core/player-data) and the
   [QBCore event guide](/docs/core/events) to read your current character state after login.
5. **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:

```lua
-- 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](/docs/guides/scripting).

### Character login and spawn setup

When working on first login, follow the actual separation between resources:

- [qb-multicharacter](/docs/resources/qb-multicharacter) controls character slots,
  selection and the handoff after login.
- [qb-spawn](/docs/resources/qb-spawn) configures selectable public spawn locations via
  `QB.Spawns`.
- [Multicharacter loading troubleshooting](/docs/troubleshooting/multicharacter-loading)
  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](/docs/guides/create-job) |
| Assign a player's job | [Set a job](/docs/guides/set-job) |
| Add a usable inventory item | [Usable-item workflow](/docs/guides/item-use-effect) |
| Set up `qb-target` interactions | [qb-target: zones and options](/docs/resources/qb-target) |
| Handle a client/server callback | [NUI callback](/docs/guides/nui-form-callback) |
| Find a QBCore server function | [Server functions](/docs/api/server-functions) |
| Listen for player and job events | [QBCore events](/docs/core/events) |
| Diagnose a hitch or high resource usage | [Profiler and server optimization](/docs/performance/server-optimization) |

## Tutorial Categories

### Framework comparisons

If you're choosing or migrating a framework, read
[QBCore vs ESX](/tutorials/qbcore-vs-esx-comparison),
[QBCore vs Qbox](/tutorials/qbcore-vs-qbox-comparison) or the
[broader FiveM framework comparison](/tutorials/fivem-frameworks-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](/docs/guides/how-to-become-admin),
[resource load order](/docs/troubleshooting/resource-load-order) and
[backups or resource updates](/docs/migration/resource-updates) rather than deploying
experimental example code directly to a populated server.

### Resource development

Continue from [Lua fundamentals](/tutorials/beginner/lua-scripting-fivem) to
[QBCore functions](/docs/core/functions), [events](/docs/core/events),
[client/server API](/docs/api) and
[safe server events](/docs/security/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](/tutorials/intermediate) for
jobs and browser forms or the [advanced path](/tutorials/advanced) for security
review, profiling and migrations.

## Contributing to Tutorials

To report a broken example, use [support](/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](https://github.com/qbcore-fivem).

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.
