> For the complete documentation index, see [llms.txt](https://docs.lostdev.store/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lostdev.store/races/installation.md).

# Installation

## Requirements

* [ox\_lib](https://github.com/overextended/ox_lib)
* [oxmysql](https://github.com/overextended/oxmysql)
* QBCore, QBX (Qbox), ESX, or standalone — auto-detected, or set explicitly in `config/config.lua`

## Steps

{% stepper %}
{% step %}

### Copy the resource

Copy the `ld_races` folder into your server's `resources` directory.
{% endstep %}

{% step %}

### Import the database

Import `install.sql` into your database. This creates the routes, results, leaderboard, stats, and ghost tables.
{% endstep %}

{% step %}

### Add the resource to your server configuration

Add `ensure ld_races` to your `server.cfg`, **after** your framework, `ox_lib`, and `oxmysql`.
{% endstep %}

{% step %}

### Review the configuration

Open `config/config.lua` and review at minimum:

* `Config.Framework.type` — leave `nil` to auto-detect, or set it explicitly (see [Framework](/races/integrations/framework.md)).
* `Config.Admin.permission` / `Config.Admin.allowedGroups` — who can use admin commands and the route creator.
* `Config.Dispatch` — only relevant if you want illegal races to alert a dispatch resource (see [Dispatch Integration](/races/integrations/dispatch.md)).
  {% endstep %}

{% step %}

### Start the resource

Start (or restart) the resource.
{% endstep %}

{% step %}

### Create your first route

In-game, as an admin, run `/racecreator` to place your first route. See [Creating Routes](/races/route-creator.md).
{% endstep %}
{% endstepper %}

## Verifying it's working

* `/races` (default keybind **F6**) should open the race menu (or the `ld_races` app inside `ld_tablet`, if that resource is running and `Config.UI.useSharedTablet` is `true`).
* An admin running `/racecreator` should see a success notification and the editor open.
* Check your server console for any `[ld_races]` warnings on startup — these usually point at a missing dependency, a bad `Config.Framework` override, or a database table that wasn't imported.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.lostdev.store/races/installation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
