> For the complete documentation index, see [llms.txt](https://docs.rainmad.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rainmad.com/resources/watch-admin-menu/getting-started/installation.md).

# Installation

{% stepper %}
{% step %}

### Install the dependencies

Make sure everything under **Required** on the [Requirements](https://docs.rainmad.com/resources/watch-admin-menu/getting-started/requirements) page is installed and starts **before** rm\_watch: `ox_lib`, `oxmysql`, your framework, and your inventory and voice scripts if you run them.
{% endstep %}

{% step %}

### Add the resource

Download rm\_watch from the [Cfx Portal](https://portal.cfx.re/assets/granted-assets), unzip it and put the folder in your `resources` directory:

* `rm_watch`

{% hint style="danger" %}
Do not rename the folder. Other scripts call `exports.rm_watch`, the ace lines below name `resource.rm_watch`, and the events are called `rm_watch:...`. A renamed folder breaks all three.
{% endhint %}
{% endstep %}

{% step %}

### Add it to server.cfg

Below its dependencies, with the key and the ace lines:

```cfg
ensure ox_lib
ensure oxmysql
ensure qbx_core            # your framework, inventory and voice scripts first
ensure pma-voice
ensure screenshot-basic    # optional

set rm_watch_key "rmw_..." # your licence key, see Linking the web panel

ensure rm_watch

# you, as owner
add_ace group.rm_watch_owner rm_watch.owner allow
add_principal identifier.license:YOUR_LICENSE group.rm_watch_owner

# dashboard: per resource profiling and the server restart
add_ace resource.rm_watch command.profiler allow
add_ace resource.rm_watch command.quit allow
```

Replace `YOUR_LICENSE` with your own license identifier (txAdmin shows it on your player card). Any identifier works as the principal: `license:`, `discord:`, `steam:`, `fivem:`.

{% hint style="warning" %}
Use `set` for the key, never `setr`. A `setr` value is sent to every player.
{% endhint %}

Every line of this block is explained on [server.cfg lines](https://docs.rainmad.com/resources/watch-admin-menu/configuration/server.cfg-lines).
{% endstep %}

{% step %}

### Database

Nothing to import. On the first start rm\_watch creates its tables (all named `rm_watch_...`) and adds any missing column on later updates.
{% endstep %}

{% step %}

### Check the bridges

The defaults in `cfg.lua` detect your framework, inventory, keys, medical, clothing and weather scripts. Most servers change nothing. If you run a script under another name, set it by hand in `cfg.bridge`, see [Bridges](https://docs.rainmad.com/resources/watch-admin-menu/configuration/bridges).
{% endstep %}

{% step %}

### First start

Restart the server and read the console:

| Console line                                       | Meaning                                                                              |
| -------------------------------------------------- | ------------------------------------------------------------------------------------ |
| `Connected to fivemad.com/watch.`                  | The key works and the web panel is live.                                             |
| `rm_watch_key is not set, so the live map is off.` | No key yet. Everything in game still works.                                          |
| `fivemad refused the rm_watch_key`                 | The key is wrong. Copy it again from [fivemad.com/watch](https://fivemad.com/watch). |

Join the server and press **F6**, or type `/watch`. The menu opens and shows your role as **Owner**.
{% endstep %}

{% step %}

### Optional: Discord logs

Staff actions can go to Discord channels. Paste your webhook URLs in `server/discord_log.lua` (never in `cfg.lua`, which every player downloads). See [server.cfg lines](https://docs.rainmad.com/resources/watch-admin-menu/configuration/server.cfg-lines#discord-webhooks).
{% endstep %}
{% endstepper %}

## Next

* [Linking the web panel](https://docs.rainmad.com/resources/watch-admin-menu/getting-started/linking-the-web-panel)
* [Roles and groups](https://docs.rainmad.com/resources/watch-admin-menu/permissions/roles-and-groups): give your staff their roles.
* [cfg.lua walkthrough](https://docs.rainmad.com/resources/watch-admin-menu/configuration/cfg.lua-walkthrough)
