Configuration & Tokens

Detailed explanation of config.lua options, convars, sync intervals, and token rotation.

The bridge resource can be configured via server.cfg convars or directly inside config/config.lua.


Config File Breakdown (config/config.lua)

Lua
Config = {}

-- Bridge token: read automatically from server.cfg convar
local _token = GetConvar('finals_webpanel_token', '')
Config.BridgeToken = _token

-- Heartbeat interval (seconds) — panel freshness + pending action polling
Config.HeartbeatInterval = 10

-- Fallback snapshot POST interval (seconds)
Config.SnapshotInterval = 30

-- Framework data sync interval (seconds) — jobs, items, gangs with labels
Config.FrameworkSyncInterval = 300

-- Resources sync interval (seconds) — list of server resources and states
Config.ResourcesSyncInterval = 300

-- Console & announcements sync interval (seconds)
Config.ConsoleSyncInterval = 5

-- Server display name (defaults to sv_hostname)
Config.ServerName = GetConvar('sv_hostname', 'FiveM Server')

-- Bridge version
Config.BridgeVersion = '1.2.0'

Convar Reference

ConvarDefaultDescription
finals_webpanel_token""The secret bridge token obtained from the Web Panel.
finals_webpanel_framework"" (auto)Manual framework override (qbcore or qbox). Leave blank for auto-detection.
sv_hostname"FiveM Server"Used as the fallback server display name if not specified.

Manual Framework Override Example

If your server runs a hybrid configuration and you wish to force a specific adapter, specify the framework convar in server.cfg before ensure finals_webpanel:

Config
setr finals_webpanel_framework "qbcore"
# or
setr finals_webpanel_framework "qbox"

Synchronization Intervals

  • Heartbeat (Config.HeartbeatInterval = 10): Keeps the server status green on the dashboard and instantly executes queued administrative commands (kicks, teleports, money edits).
  • Snapshot (Config.SnapshotInterval = 30): Sends a complete state dump of online players, identifiers, ping, coords, and job info. Player joins and disconnects trigger instant micro-syncs.
  • Framework Sync (Config.FrameworkSyncInterval = 300): Syncs all registered items, jobs, and gangs from your framework so dropdowns in the Web Panel always reflect your in-game definitions.
  • Console Sync (Config.ConsoleSyncInterval = 5): Batches server console stdout and system broadcasts to the panel terminal.

Token Rotation & Security

[!WARNING] Your finals_webpanel_token is a private key that grants the panel control over your server. Never commit this token to public GitHub repositories or share it with unauthorized staff.

How to Rotate a Compromised Token:

  1. Open Finals Web Panel -> Servers -> select your server.

  2. Click Server Settings -> Security -> Regenerate Token.

  3. The panel will immediately invalidate the previous token.

  4. Update server.cfg with the newly generated token:

    Config
    setr finals_webpanel_token "br_live_NEW_TOKEN_HERE"
  5. Restart finals_webpanel or restart the FXServer to reconnect.