Cube Scripts

Installation

Install and configure Cube Monitoring in a few minutes.

1

Download the resource#

After your purchase, the resource is delivered to your CFX account. Download it from the CFX Portal, under Granted assets.

Note

Sign in with the same CFX.re account you used at checkout. If the asset is not listed, open a ticket on our Discord and we will look into it.

Unzip the folder into your server's resources directory. There is nothing to build - the resource ships with the interface already compiled in web/.

Warning

Keep the folder named cube_monitoring. The interface resolves its own resource name at runtime, but the exports in your other scripts reference this name.

2

Add it to your server.cfg#

cfg
ensure cube_monitoring

There are no dependencies. The resource runs standalone, and detects ESX or QBCore on its own if either is present.

3

Grant yourself access#

By default the resource uses ace permissions.

cfg
add_ace group.admin cube_monitoring.admin allow
add_principal identifier.fivem:1234567 group.admin

The default. Works on any server, framework or not.

config.lua
Config.Permission = "ace"
Config.Ace = "cube_monitoring.admin"
Tip

Config.Permission = "both" accepts either an ace or a framework group. It is the safest option while you are still setting permissions up.

4

Set up a TURN server#

Streams work out of the box for players on simple home networks. Players behind CGNAT, mobile data or symmetric NAT need a TURN relay, and they are a meaningful share of any real server.

Warning

Without TURN, a percentage of your players will never be watchable. This is the single most important thing to configure.

Follow the WebRTC guide. It covers Cloudflare (built in), Metered and self-hosted coturn.

5

Start watching#

Restart your server and run:

code
/watchpanel

The player list opens on the left. Click a player to open their stream, or use Watch listed to open all of them at once.

Development#

Only needed if you are editing the React interface, which is not included in the escrowed release.

bash
npm install
npm run build   # outputs to web/
npm run watch   # rebuild on every change