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

# Installation

## Before you begin

You need:

* A current FXServer with OneSync
* SonoranCADFiveM version `4.0.72` or newer for units and calls
* Access to the CFX account that owns the Tebex asset
* Permission to add resources and ACE entries to the server

The resource does not enforce a specific FXServer artifact number. Use a supported current artifact. No framework, SQL database, menu library, Node.js runtime, or `radio_fivem` installation is required.

## 1. Download the resource

After purchasing the resource, download it from the CFX portal account that owns the asset. See [Accessing Tebex Assets](/store/general/tebex-assets.md) for the established store download process.

Extract the download before copying it to the server.

## 2. Verify the folder structure

The folder containing `fxmanifest.lua` must be named:

```
sonoran-stationdisplay
```

A correct installation looks like:

```
resources/
└── [sonoran]/
    └── sonoran-stationdisplay/
        ├── fxmanifest.lua
        ├── config.lua
        ├── client/
        ├── server/
        ├── data/
        └── web/
```

Do not leave an extra nested folder:

```
resources/sonoran-stationdisplay/sonoran-stationdisplay/fxmanifest.lua
```

If that occurs, move the inner `sonoran-stationdisplay` folder into the resources directory and remove the empty outer folder.

## 3. Install or update SonoranCADFiveM

Install SonoranCADFiveM according to the [SonoranCADFiveM installation guide](https://info.sonorancad.com/integration-plugins/in-game-integration/fivem-installation).

The default dependency resource name is:

```
sonorancad
```

Sonoran Station Displays requires version `4.0.72` or newer and the local `GetUnitCache`, `GetCallCache`, and `GetEmergencyCache` exports. It does not require a second CAD API key.

The optional Bodycams page additionally needs a package/build that exposes `GetBodycamRuntime()` and the runtime event, plus the standard `screenshot-basic` resource. The base `4.0.72` cache requirement does not guarantee that every package with that version contains the newer bodycam bridge.

The dependency name is managed internally and must remain `sonorancad`.

## 4. Configure start order

Add:

```ini
ensure sonorancad
ensure screenshot-basic
ensure sonoran-stationdisplay
```

Start SonoranCADFiveM and `screenshot-basic` first. Sonoran Station Displays can remain started if either stops; normal boards recover with CAD, while bodycam imagery reports the missing capture dependency and recovers when it returns.

The current preconfigured SonoranCADFiveM bundle may instruct you to use `exec @sonorancad/sonorancad.cfg` instead of manually ensuring its resources. In that installation, place the `exec` line before `ensure sonoran-stationdisplay`; the required core resource must still start as `sonorancad`.

Do not add `ensure radio_fivem` for this product unless your server separately uses Sonoran Radio. The radio resource is not a dependency.

## 5. Add ACE permissions

For an administrator group:

```ini
add_ace group.admin sonoran.stationdisplay.menu allow
add_ace group.admin sonoran.stationdisplay.place allow
add_ace group.admin sonoran.stationdisplay.edit allow
add_ace group.admin sonoran.stationdisplay.delete allow
add_ace group.admin sonoran.stationdisplay.diagnostics allow
add_ace group.admin sonoran.stationdisplay.refresh allow
add_ace group.admin sonoran.stationdisplay.webhook.test allow
```

Viewing displays does not require an ACE. Grant `sonoran.stationdisplay.menu` to each group that should open the administrative menu, then grant only the required action ACEs. See [Permissions](/store/sonoran-station-displays/permissions.md) for least-privilege examples and custom permission mode.

## 6. Review configuration

Open `sonoran-stationdisplay/config.lua` and confirm:

* `Config.PermissionMode = "ace"`
* Default pages, service filter, theme, rotation, clock/weather, and distances
* Live Map and bodycam defaults
* The included display model registry

Update checks, the dependency name/minimum version, DUI lifecycle, and security rate limits require no customer configuration. Do not place API keys, Tebex credentials, or license credentials in this file, and do not modify protected implementation files.

## 7. Restart and verify startup

Restart the server. In the server console, expect messages similar to:

```
[Sonoran Station Displays] Connected to SonoranCADFiveM 4.0.72 using supported cache exports.
[Sonoran Station Displays] Loaded 0 configured display(s).
```

On first start, the resource creates:

```
sonoran-stationdisplay/data/displays.json
```

If CAD is missing, old, or incompatible, the server prints an `SSD-CAD-*` error. See [Troubleshooting](/store/sonoran-station-displays/troubleshooting.md).

## 8. Place a test display

1. Join with the administrator ACE permissions.
2. Confirm at least one unit is on duty in Sonoran CAD.
3. Run `/stationdisplay`.
4. Select **Mounted Displays**.
5. Select **Place New Display**.
6. Choose a model, service filter, and one or more pages.
7. Leave the rotation interval at the default 30 seconds.
8. Select **Continue to Placement**.
9. Position the preview within 15 meters, then select **Confirm Placement**.
10. Walk within the display's render distance and confirm current state appears without the CAD unavailable overlay.

If the display has no rows, confirm its service filter matches the on-duty unit's `unit.data.page` classification.

## Tebex Asset Escrow

The production package is intended for FiveM Asset Escrow. Customer-editable files are excluded from encryption:

* `config.lua`
* `server/admin_webhook_config.lua`
* `locales/*.lua`
* `data/displays.DEFAULT.json`
* `docs/*.md`
* `README.md`

Runtime display data is written to `data/displays.json`. Back it up before replacing the resource during an update.

## Source builds

Customers do not build the web interface. It ships as static production files and has no Node.js dependency.

Repository maintainers can validate and package a source checkout from the repository root:

```powershell
python scripts/validate.py
python scripts/package.py
```

The package command creates `build/stationDisplay.zip` with one top-level `sonoran-stationdisplay` folder.


---

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.sonoransoftware.com/store/sonoran-station-displays/installation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
