> ## Documentation Index
> Fetch the complete documentation index at: https://rust-co.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation

> Put RCO Gym on the server in a few minutes.

## What you need

* A RedM server with **RSG Core** or **VORP Core**.
* **oxmysql** (the database connection both frameworks already use).
* For the muscle to show on the body: **RCO Appearance**, **RSG Appearance** or **VORP Character**. Optional: without one, levels still go up.

## Step by step

**1. Copy the folder**

Put the `rco-gym` folder inside your server's `resources` folder.

**2. Add it to server.cfg**

Start it **after** your database, your framework and your appearance creator:

```cfg theme={"dark"}
ensure oxmysql
ensure rsg-core        # or vorp_core
ensure rco-appearance  # or rsg-appearance / vorp_character

ensure rco-gym
```

**3. Start the server**

The database tables (`rco_gym`, `rco_gym_records` and `rco_gym_week`) are created by themselves on the first start. You don't need to import anything, and there are no items to add.

> [!NOTE]
>
> Only if your database user is not allowed to create tables: import `sql/rco_gym.sql` by hand once.

**4. Test it**

Load a character and ride to Strawberry: the gym is on the map. Walk up to the bench, press **E**, choose a load with **A** and **D** and press **SPACE**. Do at least 5 good repetitions and press **X** to leave: you see what you gained.

> [!WARNING]
>
> The gym takes over the inside of a house in Strawberry. If another resource changes the same house or the same area of Strawberry (a housing script, another map), the two can fight over the same files. See [Troubleshooting](https://rust-co.mintlify.site/rco-gym/troubleshooting.md).

## Changing things later

Every change in `config/config.lua` (keys, difficulty, loads...) needs a restart to show up.

> [!WARNING]
>
> Close your game before restarting RCO Gym, or restart the whole server. Restarting a resource that has 3D models while you are in the game can crash your game.

## Updating

Replace the folder with the new version. Your `config/config.lua` is yours: keep a copy before replacing and put your values back if the new version brings a new config. The players' levels and records are kept in the database and are not touched by an update.

When a new version is out, the server console tells you when the server starts, for example `[RCO Gym] Update available: v0.0.85 -> v0.0.86`. It only reads our public version list: if it can't reach it, RCO Gym starts normally.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.