Skip to content

Installation

Install Cuxial Admin step by step: dependencies, database, first superadmin, convars and start order.

Cuxial Admin creates its tables by itself and needs one staff row before anyone can open the panel. It adds no inventory items.

Check the dependencies ​

These resources must be installed and working before you add the panel:

  • A framework: QBox (qbx_core), QBCore (qb-core) or ESX (es_extended)
  • ox_lib
  • oxmysql
  • An inventory: ox_inventory, or qb-inventory on QBCore
  • cuxial_bridge 2.19.1 or later
  • OneSync enabled on the server

Update Cuxial Bridge to 2.19.1 or later before installing the panel. Earlier versions lack functions the panel uses for jobs, item definitions, the online player list, revive, heal, glovebox and trunk.

What changes on each framework is listed in Compatibility.

The optional integrations are listed in the Overview. None of them is needed to start.

Copy the resource ​

Place the cuxial_admin folder inside your resources directory. Keep the folder name as it is.

Prepare the database ​

Nothing to import. When the resource starts it creates five tables: cuxial_admin_ranks, cuxial_admin_staff, cuxial_admin_sanctions, cuxial_admin_report_transcripts and cuxial_admin_audit. It also adds any missing column and creates the starting ranks.

install/cuxial_admin.sql is optional. Run it only if your SQL user cannot create tables.

Add the first superadmin ​

Add your Discord account as the first superadmin. install/cuxial_admin.sql ends with a commented template for this row: replace YOUR_DISCORD_ID with your Discord ID and run it.

sql
INSERT INTO `cuxial_admin_staff` (`scope`, `identifier`, `label`, `rank`, `added_by`)
VALUES ('discord', 'YOUR_DISCORD_ID', 'Your name', 'superadmin', 'install');
  • scope = 'discord' gives the rank to that Discord account, on all its characters. The player must have Discord linked to FiveM.
  • To give it to a single character, use scope = 'character' and the character's citizenid as identifier.

The rank superadmin is created the first time the resource starts. If you add the row while the server is running, type staffreload in the server console to apply it.

From here on, grant and remove ranks from the panel. Whoever is in cuxial_admin_staff as superadmin has full control of it.

Set the convars ​

All of them are optional. Without them the panel works, with the screen view and the remote web panel turned off. The console warns at start if cuxial_admin_screen_owners is empty. The remote web panel also needs remote.enabled = true in shared/config.lua.

server.cfg
cfg
# Language of notifications and key names (en and es are included)
setr ox:locale "en"

# Staff allowed to view a player's screen: Discord IDs separated by commas
set cuxial_admin_screen_owners "DISCORD_ID_1,DISCORD_ID_2"

# Optional media relay for the screen view
set sd_phone_relay_url "wss://YOUR_RELAY_HOST/PATH"
set sd_phone_relay_key "YOUR_64_CHARACTER_HEX_KEY"
set sd_phone_relay_ttl "45"

# Optional remote web panel
set cuxial_admin_remote_url "http://YOUR_PANEL_SERVICE"
set cuxial_admin_remote_secret "YOUR_SHARED_SECRET"

# Debug traces in the server console
set cuxial_admin_debug "0"

Write the relay key and the remote secret with set, never with setr. setr sends the value to every player.

What each one does is explained in Configuration.

Start the resource ​

Start the panel after the framework, the inventory and Cuxial Bridge:

server.cfg
cfg
ensure oxmysql
ensure ox_lib
ensure qbx_core
ensure ox_inventory
ensure cuxial_bridge
ensure cuxial_admin

On QBCore, qb-inventory can be replaced by ox_inventory. The framework and the inventory must start before Cuxial Bridge, which detects them when it loads.

Optional integrations are detected while the server runs, so their position in the list does not matter.

Check that it works ​

  1. Join the server with the account you added and load a character.
  2. Press U or type /admin. The panel opens.
  3. Open the staff section and check that your rank is listed.
  4. With another account, type /report and send a message. It appears in the reports tab of the panel.

Next: adjust the panel to your server in Configuration.

© Cuxial