# Deploy a QBCore test server with txAdmin

This independent guide uses the project-maintained [QBCore txAdmin recipe](https://github.com/qbcore-fivem/txAdminRecipe). The recipe downloads `qb-core`, `oxmysql`, voice, map, and qb-* dependencies in a tested order and imports its `qbcore.sql` database schema. Read the official project documentation alongside this guide.

For a general explanation of what txAdmin recipes do and how to deploy them safely, see the [independent txAdmin server recipes guide](https://txadmin.org/docs/getting-started/recipes). Use the project-maintained QBCore recipe linked above for this deployment.

> **Use a test environment first**
> Do not run a new recipe over an existing production server. Back up the server directory and database, then deploy to a separate txAdmin profile.

![FXServer and txAdmin recipe setup flow](/diagrams/txadmin.svg)

*Conceptual diagram; verify the behavior against your installed resource version.*

## Prerequisites

- A current FiveM server artifact with txAdmin
- A FiveM license key from the Cfx.re portal
- An empty MySQL or MariaDB database reachable by txAdmin
- Enough disk space for the server artifacts and recipe resources
- Administrative access to the host and database

## Deployment

### Open the txAdmin recipe deployer

Create a new txAdmin profile, open **Recipe Deployer**, and choose the QBCore recipe. If you enter a recipe URL manually, use:

```text
https://github.com/qbcore-fivem/txAdminRecipe
```

### Configure the deployment

Provide the FiveM license key and the connection details for an empty development database. Keep credentials in txAdmin or environment configuration; do not commit them to a repository.

### Review before running

Confirm that the recipe source is `qbcore-fivem/txAdminRecipe` and its ref is `main`. The current recipe imports `qbcore.sql`, downloads `qb-core`, installs `oxmysql`, and then installs the declared standalone and qb-* resources.

### Run the recipe

Start deployment and keep the complete txAdmin log. If a download or database task fails, stop and resolve that first instead of manually skipping it.

### Start the server

After every recipe task succeeds, start the new profile from txAdmin. Watch the console until all ensured resources have started.

## First-boot smoke test

Verify each boundary before customizing the server:

1. The console has no missing-resource or database connection errors.
2. A client can connect and reach character selection.
3. A new character persists after disconnecting and reconnecting.
4. Inventory, spawn, and one basic job flow load without script errors.
5. txAdmin can stop and restart the profile cleanly.

> **Permissions**
> Follow the project-maintained permissions guide. Add only your own development identifiers and do not copy identifiers from examples.

## What the recipe version means

The `version` field in `txAdminRecipe/qbcore.yaml` versions the deployment recipe. It is not a semantic release number for `qb-core`. Record the Git commit of every customized resource when you need a reproducible server build.

## Updating later

Do not rerun the recipe over a customized installation. Instead:

1. Record the current commit of every changed repository.
2. Back up files and database, and verify that the backup restores.
3. Compare your commit with upstream `main`.
4. Apply changes on staging and run the smoke test again.
5. Keep a rollback commit and database snapshot for production rollout.

Continue with the [full installation overview](/docs/installation),
[permission guide](/docs/guides/how-to-become-admin), and
[txAdmin troubleshooting flow](/docs/troubleshooting/txadmin-recipe).
