> For the complete documentation index, see [llms.txt](https://acestudios.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://acestudios.gitbook.io/docs/roleplay/live-radio/installation.md).

# Installation

Install ace\_liveradio and its two dependencies.

## Requirements

* [pma-voice](https://github.com/AvarianKnight/pma-voice) — Live Voice and Podcast broadcasts
* [xsound](https://github.com/Xanth174/xsound) — track playback
* **OneSync** enabled — used for broadcast range and vehicle passenger checks
* Optional, auto-detected: QBCore, Qbox or ESX; ox\_inventory, qs-inventory or qb-inventory; ox\_lib, okokNotify or a framework notification/text UI; ox\_target or qb-target. The resource works standalone without any of them.

## Steps

{% stepper %}
{% step %}

### Place the resource

Copy `ace_liveradio` into your `resources` directory.
{% endstep %}

{% step %}

### Add it to `server.cfg` after its dependencies

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

```properties
set onesync on

ensure pma-voice
ensure xsound

ensure ace_liveradio
```

{% endcode %}
{% endstep %}

{% step %}

### Configure

Open `config.lua` and adjust the settings to your server. See [Configuration](/docs/roleplay/live-radio/configuration.md).
{% endstep %}

{% step %}

### Restart and check the console

Restart the server, or run `ensure ace_liveradio`. About a second after start, the resource prints a summary of the framework, inventory, notification, text UI and target it detected, the enabled features, loaded stations, and any warnings (invalid config values, missing dependencies, integrations that aren't running).
{% endstep %}
{% endstepper %}

## Data storage

The resource saves player stations, host bans, station ratings and station community settings to `stations.json`, `banned_hosts.json`, `ratings.json` and `community.json` **inside its own resource folder**. That folder must be writable by the server.

{% hint style="warning" %}
No SQL database is used. Back up these JSON files along with the resource folder if you want to preserve player stations across a reinstall.
{% endhint %}

## Track title lookups

Track titles and thumbnails are looked up by the **server** (YouTube's oEmbed, or noembed.com for other sites) and saved with the station — players' games don't contact those services. Turn it off with `Config.FetchTrackTitles = false` in `config_advanced.lua`.

## Updating

After replacing the files with a new version, run `refresh` and then `ensure ace_liveradio` — a plain `restart` doesn't pick up new files. If a part of the resource still fails to load, the rest keeps working with that part switched off, and the server console / client F8 console names which file didn't load, for example:

```
client/headphones.lua didn't load, so that part is switched off
```

## For developers: building the NUI

The in-game UI is a React app in `web/`. The resource serves the built files from `web/dist`, which aren't committed to the repository:

{% code title="Build the UI" %}

```bash
cd web
npm install
npm run build
```

{% endcode %}

To create a clean copy for release or Asset Escrow upload (UI build included, no UI source, tooling or save data):

```bash
node tools/package-release.mjs
```

The package is written to `release/ace_liveradio`.

{% hint style="info" %}
This step is for the resource's own developer, not for server owners installing it. A normal download from the Cfx Portal already includes the built `web/dist` files.
{% endhint %}
