RivalityFX Docsrivalityfx.com ↗

Running a server

An operator's guide: bring the server up, grant ranks, run ranked play, and tune the handful of knobs you'll actually touch day to day. It assumes the server is already deployed (Deploy on Linux); its companion is Server configuration — the server.cfg file line by line, with the complete convar reference. For copy-paste setups, see Configuration recipes.

Everything an operator controls is either a static value shipped in a resource's config.lua (applied on restart) or an admin ConVar in server.cfg (set rfx_*, also applied on restart). There is no in-game admin panel — you administer from server.cfg and the /rfx chat/console commands.


1. Bring it up

Resources live under bracketed groups (resources/[platform]/, [modes]/, [packs]/); the brackets are organizational, FiveM loads anything beneath them. Enable each with ensure <name> in server.cfg. The platform needs at least sdk, engine, ui, lobby, plus one mode (mode_duel) and one battleground pack (battleground_pack_base). The full file, in order, is Server configuration.

  • Secrets (e.g. the stats API token) go in server_secrets.cfg, never server.cfg.
  • Hot reload: edit a file → restart <name> in the console. Added a new file or resource? Run refresh first.
  • Convars are read at resource start with the shipped value as default, so an unset convar = the documented default. Changing one means a restart of the resource that reads it (often engine), or a server restart.

2. Grant ranks (tiers)

Permissions ride FiveM ACE, derived live (no database). The ladder, low → high:

player  <  vip  <  staff  <  admin

A higher tier passes every lower gate. The mapping of which ACE group grants which tier is itself config (rfx_ace_admin / rfx_ace_staff / rfx_ace_vip, defaults group.admin / group.staff / group.vip).

To promote someone:

  1. When a player connects, the server console prints their identifiers and a ready-made line. Copy it into server.cfg:
    add_principal "identifier.license:xxxxxxxx" group.staff
    add_ace       group.staff  group.staff  allow   # the group self-grants its ace
  2. Principals load at SERVER START. A restart engine will not pick up a new add_principal — do a full server restart, or run the line live in the console, then have the player reconnect.
  3. Verify with /rfx whoami (the player runs it; or the console runs /rfx whoami <id>). It prints the resolved tier + each ACE check — the go-to when "I'm admin but I show as player" (almost always a not-yet-live principal).

The server console (src 0) is always full admin, so you can run any /rfx command from it without a principal.


3. The /rfx commands

One umbrella command routes to grouped subcommands, each gated by an access band (open = anyone, staff = staff+, admin = owners). Run /rfx alone for help filtered to what you may run.

CommandBandWhat it does
/rfx whoami [id]openyour resolved tier + ACE results + identifiers
/rfx arena liststafflive arenas (id, mode, players/cap, state; ranked/private tags)
/rfx users liststaffconnected players (id, name, tier, where they are)
/rfx users info <id>staffa player's tier + identifiers
/rfx users where <id>staffwhere a player is (lobby / arena / match / group)
/rfx users kick <id> [reason]staffdrop a player from the server
/rfx users ban <id> [duration] [reason]staff¹ban a player (see §3.1)
/rfx users unban <license>staff¹lift a ban — accepts a license fragment
/rfx users bansstafflist active bans
/rfx stats info <id>staffa connected player's career + season stats
/rfx queue open <mode> [loadout] [rounds] [map] [s<N>] [ranked]admindeclare a QUEUE — one card per config, instances on demand; ranked records stats (§4)
/rfx arena close <id>staffclose an arena (now if idle, else after the match)
/rfx lab <...>adminsolo-testing match-flow helpers — behind rfx_lab true (fallback rfx_dev_commands), leave off in production

¹ Banning is access-split by duration, not by command: a permanent ban (and lifting one) is admin-only; staff may issue and lift temporary bans only. See §3.1.

Most commands run from anywhere — chat, the server console, or the F8 client console (they all reach the same router; access is re-checked server-side). A few need a live player and are in-game only, so they refuse from the server console: /rfx group … and /rfx lab hold.

3.1 Moderation — kick & ban

  • Locate first. /rfx users list shows each player's location; /rfx users where <id> gives the detail (the scene/arena they're in). Handy before you act.
  • Kick drops a player for this session only (/rfx users kick <id> [reason]).
  • Ban blocks them from reconnecting. The duration is an optional token after the id:
    /rfx users ban 7 2h spawn-camping     # 2-hour ban   (staff OK)
    /rfx users ban 7 7d cheating          # 7-day ban    (staff OK)   units: s m h d w
    /rfx users ban 7 cheating             # PERMANENT    (admin only) — no duration = forever
    /rfx users ban 7 perm cheating        # PERMANENT    (admin only) — explicit
    • Staff must supply a finite duration; a permanent ban is rejected with a hint. Admin may do either. Lifting a permanent ban is likewise admin-only.
    • Tier safety. You can only ban someone strictly below your own tier — staff can't ban an admin (or each other), admins can't ban each other; only the console can ban anyone.
    • Unban by license — /rfx users unban <license>. A unique fragment of the license works too (copy it from /rfx users bans).
    • Where bans live. The active-ban set is stored locally in FiveM KVP, so it survives restarts and is read synchronously at connect time, before the player spawns. Every ban/unban also emits an audit event you can route to a webhook (see the api store in Server configuration).

4. Running arenas

An Arena is the one match container — the single creation surface for every mode (duel, squad, rooftop, battle_royale, squad_royale). You open persistent arenas by command (console/staff); players also create casual arenas in-game from the Arena browser. Each arena is casual (default) or ranked: a ranked arena records stats (career / season / leaderboard); a casual arena records nothing. Ranked is opened by the system only — from boot.cfg or the console (an admin ACE), never by a player — so no one can spin up a ranked arena to farm stats.

The model — a recycling arena

An arena is a match container that fills, plays, then recycles on its own:

/rfx arena open  →  [waiting] ──players join / gather──▶ [in-game] ──ends──▶ [frozen board]
                       ▲                                                          │
                       └──── recycles (persistent) / closes (ephemeral) ◀─ empty ─┘
                                                                       (60s timeout = safety net)
  • Fill & auto-start. Players join an arena from the browser; it launches on its own the moment it's ready — no ready-check, no Start button. A duel-shaped arena starts when it's full; a royale gathers to a minimum then runs a short countdown before launching.
  • Recycle or close. A persistent arena (every console/staff arena, and every ranked one) returns to waiting and refills after each match; an ephemeral (player-created) arena closes once it empties. A persistent arena lives until you close it.
  • Leavers forfeit. A player who leaves mid-match just drops their slot — the surviving team wins and the arena recycles (or closes). Leaving or disconnecting never ends anyone else's match.
  • Membership ≠ management. A room used to die with its host; an Arena persists. Its creator is a manager (keyed to their license, not their session), so they can leave and come back, and only they (or an admin) can delete it — in-game, or with /rfx arena close <id>. Console/boot arenas are system-managed (no in-game owner).

Open / list / close

Baseline play is a QUEUE, not an arena. A queue is a persistent template: one card in the menu per config, with the match instances materialised on demand (one joinable shell at a time; the next spawns the instant that one fills). That is what makes "two players each join a different empty copy and never meet" impossible. Declare one Quick Play queue and one Ranked queue per mode and the mode is playable.

/rfx queue open duel                          # QUICK PLAY (casual): RANDOM weapon each match — the recommended default
/rfx queue open duel 7                        # casual, best-of 7
/rfx queue open duel rifle 5 lot              # casual, pinned rifle + pinned battleground "lot"
/rfx queue open duel pistols 5 ranked         # ranked (records stats) — same as /rfx ranked open duel pistols 5
/rfx ranked open duel 5                       # RANKED, RANDOM weapon (console/admin only)
/rfx queue open battle_royale                 # royale: fills, then launches on a gather countdown
/rfx queue list                               # every live queue: track, searching, live, open
/rfx queue close casual|duel|random|5|*|0     # retire one (idle shells go now; a live match finishes first)

/rfx arena open remains for one-off bespoke arenas — a named slot, a pinned config, a private room with a join code; things a human deliberately browses to in the Custom list:

/rfx arena open duel rifle 7 warehouse        # a named one-off with a pinned config
/rfx arena open duel pistols pass:vip5        # PRIVATE: only players with code "vip5" can enter
/rfx arena list                               # live arenas, INCLUDING the hidden queue shells
/rfx arena close 12                           # close arena #12 (now if idle; else after its match)
  • Queue parameters are order-independent and all optional/rfx queue open duel is valid. [loadout] a weapon-config key or random (omit it for the RANDOM card: a fresh symmetric weapon each match, full variety with zero population split); [rounds] best-of (default rfx_duel_best_of, clamped to the mode's range); [map] a battleground id to pin (omit → a fresh map each match); [s<N>] stamina 0–100 (default rfx_stamina); [ranked] records stats (omit → Quick Play, records nothing).
  • One card per mode per track. A second queue card for the same mode and track splits that population; on a small server two 1-player queues never fill. rfx_queue_max_templates (default 0 = unlimited) refuses past a cap; below it a warning prints on every 2nd+ declare.
  • Arena parameters. <mode> and <loadout> are required, then [rounds] [map] [s<N>] [pass:<pw>] as above. [x<N>] on a public arena is refused — N identical browsable copies scatter joiners across empty containers, which is precisely what a queue exists to prevent. A private arena is exempt: its join code is the rendezvous.
  • Loadout. One of the mode's weapon configs (pistols | smg | rifle | sniper | shotgun; rooftop offers only pistols | smg). The literal random picks a fresh symmetric loadout each match.
  • Private arenas. pass:<pw> (no spaces in the code) locks the arena — only a player who supplies the join code may enter it.
  • Closing. An idle (waiting) arena is removed at once; an arena with a match in flight keeps that match and closes when it ends — the live match is never interrupted.

Operating tips

  • One arena = one match at a time. Open as many arenas as the concurrent matches you want running. The total of all live scenes is capped by rfx_max_scenes (default 8) — opening more arenas than that just leaves the extras waiting until a slot frees.
  • Cap the count. rfx_max_arenas (default 32) backstops player-created arenas; console/boot arenas bypass it (you control how many you open).
  • Campers can't hold an arena. After a match the board freezes; anyone still on it after rfx_postmatch_timeout (default 60s, 0 disables) is returned to the lobby, which lets the arena recycle.
  • Who may create. rfx_arena_creation (default staff) sets the minimum tier a player needs to create an arena in-game, with a per-mode override rfx_create_tier_<mode>; ranked stays console/admin only regardless.
  • Wind down by closing arenas — close an idle one to stop it recycling, or let in-flight matches finish first.

5. Match feel & limits — the knobs you'll touch

The operationally common convars (the complete, grouped reference is in Server configuration):

ConVarDefaultEffect
rfx_max_scenes8max concurrent scenes across all modes (caps the arenas that can be in-game at once)
rfx_max_arenas32server-wide cap on live player-created arenas (console/boot arenas bypass it)
rfx_max_spectators6spectators per scene
rfx_postmatch_timeout60seconds on the frozen scoreboard before everyone is returned to the lobby (0 = off)
rfx_duel_round90Duel round duration (s)
rfx_duel_best_of5Duel default best-of (the arena open rounds arg, and the mode's range default)
rfx_battlegrounds(all)battleground rotation allowlist (map ids, space/comma); empty = all loaded battlegrounds
rfx_arena_creationstaffmin tier to create an arena in-game (all|vip|staff|admin); per-mode override rfx_create_tier_<mode>
rfx_arena_privateallmin tier to create a private (password) arena
rfx_arena_empty_ttl60seconds an empty player-created arena survives before it's collected
# server.cfg — example
set rfx_max_scenes 8
set rfx_max_arenas 32
set rfx_postmatch_timeout 60
set rfx_duel_round 90
set rfx_duel_best_of 5
set rfx_arena_creation staff

6. Stats, seasons & the website

Stats record into a never-reset career layer and a per-season layer, persisted through the swappable store (rfx_store) — one backend for reads and writes:

  • kvp (default) — self-contained, no database, but can't build the cross-player leaderboard (the UI shows a "needs the API" hint).
  • api — persists through a web API (the RivalityFX stats stack), unlocking the leaderboard and the public website. Set rfx_api_url (server.cfg) and rfx_api_token (server_secrets.cfg) — both are covered in Server configuration.

Open a fresh season by bumping rfx_season (e.g. alphabeta) and restarting: new writes route to an empty layer, the previous season is left in place as the archive. rfx_career_stats toggles whether the all-time layer is shown in the menu (it's always recorded).


7. Map rotation

Maps are the shared battleground pool (the battlegrounds modes draw from — distinct from the Arena match containers of §4), not a per-mode setting. Control the rotation by which battleground packs you ensure (each registers its maps via the SDK), then optionally narrow it server-wide with rfx_battlegrounds (a space/comma allowlist of battleground ids; empty = all loaded). Adding a pack widens the pool with no code change. See the battleground SDK.


Cheat sheet

# promote a moderator (then full restart, reconnect)
add_principal "identifier.license:xxxx" group.staff
 
# verify
/rfx whoami <id>
 
# declare the ranked ladder (console/admin; RANDOM weapon, default best-of, fresh map each match)
/rfx ranked open duel
 
# check the board
/rfx queue list      # queues: track, searching, live, open
/rfx arena list      # arenas, INCLUDING the hidden queue shells
 
# wind an arena down
/rfx arena close <id>