> For the complete documentation index, see [llms.txt](https://corex-zombies.gitbook.io/corex-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://corex-zombies.gitbook.io/corex-docs/start-here/installation.md).

# Install CoreX

Install into a fresh server-data directory, then verify dependencies and startup order.

{% stepper %}
{% step %}

## Prepare a fresh deployment <a href="#id-1-prepare-a-fresh-deployment" id="id-1-prepare-a-fresh-deployment"></a>

Use a recommended FXServer build at least artifact `12913`, txAdmin, MariaDB/MySQL, a Cfx.re server key and the real `oxmysql` resource. The recipe pins the built releases of oxmysql `2.14.1` and ox\_lib `3.39.0`; Admin requires ox\_lib. Keep database and server-management ports private.

Install and start SQL before running the recipe; txAdmin's own player database is not the framework's SQL database. Obtain your server registration key privately from the [Cfx.re Portal](https://portal.cfx.re/) and enter it in the recipe parameters. The initial txAdmin PIN comes from the FXServer console. Linking a Cfx.re account does not fill in a registration key by itself. For the complete beginner walkthrough, use the [recipe README](https://github.com/corex-zombies/txAdminRecipe#readme).

In txAdmin's **Remote URL Template**, use the [official recipe](https://github.com/corex-zombies/txAdminRecipe):

```
https://raw.githubusercontent.com/corex-zombies/txAdminRecipe/main/corex.yaml
```

The old `ABUGIZA/COREX-Framework` repository is an information page, not the framework download.

{% hint style="warning" %}
Check the package you actually downloaded. Older published recipes may contain only native resources. The September 2026 recipe pins the published compatibility resources and template to immutable commits. Local edits do not change what its remote URL installs.
{% endhint %}
{% endstep %}

{% step %}

## Check the folder layout <a href="#id-2-check-the-folder-layout" id="id-2-check-the-folder-layout"></a>

The directory containing your executed configuration is **server-data**. It may use `server.cfg` or another file executed from it. Edit the configuration that actually starts your resources.

Each resource needs its own `fxmanifest.lua`, without an extra ZIP-wrapper directory:

```
server-data/
  server.cfg
  resources/
    [standalone]/
      oxmysql/
      ox_lib/                 # required by corex-admin and some third-party scripts
    [corex]/
      corex-core/             # native player data, money, metadata and lifecycle
      corex-capabilities/     # service contracts, selection and compatibility storage
      corex-ui-compat/
      corex-inventory/        # native inventory, if selected
      corex-adapters/         # external inventory adapters
      qb-core/
      qbx_core/
      es_extended/
      corex-content/
        packs/custom.lua     # your trusted item-pack declarations
      corex-spawn/            # and other selected native gameplay resources
      corex-admin/            # staff panel; permissions are checked server-side
    [corex-ui-proxies]/
      progressbar/  qb-input/  qb-menu/
      esx_context/  esx_notify/  esx_progressbar/  esx_textui/
    [local]/                 # suggested home for custom/third-party resources
```

Bracketed directories are groups, not resource names. `qb-menu-main/qb-menu/fxmanifest.lua` is not the same layout as `qb-menu/fxmanifest.lua`.

Do not install upstream `qb-core`, `qbx_core` or `es_extended` alongside CoreX's facades, and do not rename facade folders. Resource names must be unique.
{% endstep %}

{% step %}

## Connect the intended database <a href="#id-3-connect-the-intended-database" id="id-3-connect-the-intended-database"></a>

Use a dedicated account and `utf8mb4`. Set the connection before `ensure oxmysql`:

```cfg
set mysql_connection_string "mysql://YOUR_USER:YOUR_PASSWORD@127.0.0.1/YOUR_DATABASE?charset=utf8mb4"
```

Keep credentials and your license key private. Apply the native and compatibility schemas only if the installer has not already done so. [Database setup and schema](/corex-docs/start-here/database.md) names the files and read-only checks. Do not import a whole upstream framework schema over CoreX.
{% endstep %}

{% step %}

## Start the foundation in order <a href="#id-4-start-the-foundation-in-order" id="id-4-start-the-foundation-in-order"></a>

This is the **native-inventory compatibility foundation**, not a complete server configuration. Keep endpoint, license, permissions, map and gameplay settings from your package.

```mermaid
flowchart TD
    foundation["Database and native core"] --> services["Capabilities, UI and native inventory"]
    services --> compatibility["Adapters, facades and content packs"]
    compatibility --> consumers["UI proxies and selected gameplay"]
```

These are grouped stages of the native example below, not a universal manifest dependency graph. External inventories can require a different order.

```cfg
# Grant the facade's command-registration permission before it starts.
add_ace resource.qb-core command allow
ensure oxmysql
ensure ox_lib
ensure corex-core
ensure corex-capabilities
ensure corex-ui-compat
ensure corex-inventory
ensure corex-adapters
ensure qb-core
ensure qbx_core
ensure es_extended
ensure corex-content

ensure progressbar
ensure qb-input
ensure qb-menu
ensure esx_context
ensure esx_notify
ensure esx_progressbar
ensure esx_textui

# Start your selected native gameplay resources afterward.
# If [corex] contains only resources you intend to run:
start [corex]
```

`start` leaves an already-running resource alone. `ensure` restarts one that is running and can stop its dependents. Avoid repeated broad `ensure [corex]` during gameplay. Do not include alternative inventories, unconfigured downloads or development fixtures in a group production starts automatically.

The recipe starts CFX `mapmanager`, `chat`, `spawnmanager` and `baseevents` explicitly. It installs only the three required resources from `cfx-server-data`; `chat` comes from the supported FXServer artifact with `set resources_useSystemChat true`. Do not use `ensure [cfx-default]` on a full upstream download: that also starts example money scripts, development utilities and incompatible RedM maps.
{% endstep %}

{% step %}

## Verify before inviting players <a href="#id-5-verify-before-inviting-players" id="id-5-verify-before-inviting-players"></a>

In the **server console**:

```
qbcore_compat_status
qbx_compat_status
esx_compat_status
corex_inventory_adapters
corex_content_status
```

Check for one intended inventory, persistent compatibility storage and no missing imports, resource errors or schema failures. A `WAITING` pack for a resource you have not started is normal. Investigate the **first** error; exact boot messages vary by package and configuration.

On the same computer, open FiveM, press F8 and use `connect 127.0.0.1:30120` (or your configured game port). On a hosted server, use its game address, not the txAdmin management address. Verify character creation, inventory opening, a normal item action, disconnect/reconnect and saved state. Optional `/corex_lab` checks bounded public contracts; neither it nor correct startup order proves the whole player journey.

To start the server later, open the same txAdmin profile and choose **Start Server**. Do not redeploy the recipe to restart an existing installation. Assign staff deliberately through the template's `add_principal` examples; do not grant every player the Admin permission.
{% endstep %}
{% endstepper %}

## Dependency rules <a href="#dependency-rules" id="dependency-rules"></a>

Your chosen external inventory may need a different order. Read the selected manifests rather than treating the example above as a universal graph.

| Start first                                  | Then                                      |
| -------------------------------------------- | ----------------------------------------- |
| Real `oxmysql` with the intended connection  | Native core and persistent services       |
| `corex-core`                                 | `corex-capabilities` and native consumers |
| `corex-capabilities`                         | Facades, adapters and content packs       |
| The selected inventory's framework/libraries | That inventory                            |
| Required UI, target and other libraries      | Scripts importing or calling them         |
| Compatibility foundation and item setup      | Third-party gameplay resources            |

A manifest import such as `@ox_lib/init.lua` still requires the real library. Start notification/UI foundations before consumers. Configure spawn/death together, and inventory before crafting, loot and consumables. Zones, weather, zombies and events have runtime interactions described in their [resource references](/corex-docs/reference/resource-index.md).

## Files you will usually edit <a href="#files-you-will-usually-edit" id="files-you-will-usually-edit"></a>

* Executed server configuration: connection, permissions and startup order.
* A native resource's `config.lua`, when it has one: that resource's settings.
* `corex-content/packs/custom.lua`: trusted item data for new resources.
* The third-party resource's configuration and documented SQL.

Do not edit shared storage to fake unsupported features. Keep backups and runtime recovery files outside public source control.

Next: [Database setup](/corex-docs/start-here/database.md), then [add a resource](/corex-docs/start-here/add-a-resource.md).
