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

# Installation

Install Cuxial Chat step by step: dependencies, convars and start order.

Cuxial Chat needs no SQL import and no inventory items. It creates its own tables on first start.

{% stepper %}
{% step %}

## Check the dependencies

These resources must be installed and working before you add the chat:

* `ox_lib`
* `oxmysql`
* `cuxial_bridge`, with one of the supported frameworks: QBox, QBCore or ESX
* OneSync enabled on the server

`cuxial_gang` is optional. When it is running, each organization uses its own colour in `/gchat`. Without it, all organizations use `gchat.fallbackColor`.
{% endstep %}

{% step %}

## Copy the resource

Place the `cuxial_chat` folder inside your `resources` directory. Keep the folder name as it is.
{% endstep %}

{% step %}

## Remove the default chat

Cuxial Chat takes the place of the `chat` resource. Delete or comment out every line that starts another chat:

{% code title="server.cfg" %}

```cfg
# ensure chat
```

{% endcode %}

{% hint style="danger" %}
Two chats running at once fight over the same key and the same events. Leave only Cuxial Chat.
{% endhint %}
{% endstep %}

{% step %}

## Set the convars

All of them are optional.

{% code title="server.cfg" %}

```cfg
# Language of the chat (en and es are included)
setr ox:locale "en"

# Discord webhook for message logs
set cuxial_chat_webhook "https://discord.com/api/webhooks/..."

# Debug traces in the console
setr cuxial_chat_debug "0"
```

{% endcode %}

{% hint style="info" %}
The webhook goes in `server.cfg`, never in `shared/config.lua`. The name of the convar can be changed in `logs.discord.convar`.
{% endhint %}
{% endstep %}

{% step %}

## Start the resource

Start the chat after its dependencies and after your framework:

{% code title="server.cfg" %}

```cfg
ensure ox_lib
ensure oxmysql
# your framework here (qbx_core, qb-core or es_extended)
ensure cuxial_bridge
# optional
ensure cuxial_gang
ensure cuxial_chat
```

{% endcode %}

No SQL to run. The resource creates `cuxial_chat_settings` (with `persistSettings = true`) and `cuxial_chat_logs` (with `logs.database = true`) when it starts.
{% endstep %}

{% step %}

## Check that it works

1. Join the server and press <kbd>T</kbd>. The chat opens.
2. Type `/me waves`. The action appears above your head.
3. Type `/` and check that the command list shows up.
4. Open the settings panel in the chat, move it to another corner, then reconnect. The position is kept.
   {% endstep %}
   {% endstepper %}

Next: adjust the chat to your server in [Configuration](/scripts/interface/cuxial-chat/configuration.md).


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.cuxial.com/scripts/interface/cuxial-chat/installation.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
