> For the complete documentation index, see [llms.txt](https://code-after-sex.gitbook.io/script-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://code-after-sex.gitbook.io/script-documentation/cas-telegram/installation.md).

# Installation

Install CAS Telegram on your RedM server — VORP, RSG or standalone, oxmysql, self-building tables and no SQL to import.

## 1. Place the folder

Copy `cas-telegram` into your `resources` folder.

If you downloaded a zip, make sure the folder is named exactly `cas-telegram`. A folder named `cas-telegram-main` or `cas-telegram-1.1.0` will not work.

## 2. Add it to server.cfg

`oxmysql` must start before this resource. Your framework must start before it too.

```cfg
ensure oxmysql
ensure vorp_core
ensure cas-telegram
```

Replace `vorp_core` with `rsg-core` if that is what you run, or leave it out if you run standalone.

## 3. Start the server

The database tables are created on the first start. There is no SQL file to import.

Watch your console. You should see:

```
[telegram] framework: vorp · currency: money · locale: en
```

On RSG it names the money account instead:

```
[telegram] framework: rsg · currency: cash · locale: en
```

The resource waits up to a minute for your framework, so the order in `server.cfg` being slightly off will not break it. If it still says `standalone` when you run VORP or RSG, the framework never started at all. Fix it, or name the framework by hand:

```lua
Config.Framework = 'vorp'   -- 'auto' | 'vorp' | 'rsg' | 'standalone'
```

{% hint style="info" %}
If a setting in `config.lua` is wrong, the console names it and the resource does not open. Fix the value and restart. Nothing fails quietly.
{% endhint %}

## 4. Set your currency

Skip this if your server charges in cash. See [Currency](/script-documentation/cas-telegram/configuration.md#currency).

## 5. Check it in game

Join your server and type:

```
/telegram
```

The device should open and you should be given a free number. Press **Escape** to close it.

## Updating

Replace every file except `config.lua`. Keep your own `config.lua` so you do not lose your settings, then compare it against the new one for any settings that were added.

Never delete the database tables when updating. Every number, conversation, voice message, and marketplace listing lives there.

Any new database changes are applied automatically on the next start.
