Skip to content

Convars

Every convar tLib reads — what it does, its unit, its default, and whether it needs set or setr.

tLib has no config file. Everything an owner can change is a convar in server.cfg, placed above ensure tLib. If a convar is not on this page, tLib does not read it. Every duration carries its unit in the name (_ms); there are no unit-less aliases.

set vs setr

set defines a convar the server can read. setr also replicates it to every connected game client. A convar read by client Lua or by the NUI needs setr; one read only by the server bundle uses set.

Getting it wrong fails quietly:

  • A setr convar written with set makes the client read the built-in default. Point tlib_api_base_url at your own host with set and the server talks to your host while the in-game panel keeps talking to ours.
  • A set convar written with setr works, but ships the value to everyone who joins. Never do it for a secret.

Demo mode

ConvarCommandType / unitDefaultWhat it does
tlib_demosetboolean — 1, true, yes, on(off)Turns the server into a self-resetting showroom. Every player becomes a superadmin and every access gate opens, no resource writes its data file, and marketplace installs are swept at the next start.

setr also works and does no harm.

In demo mode
Server settings, layouts, codeplugs, vehicle configs — anything in a data.jsonHeld in memory for the session, never written. Back to the shipped file on restart.
Marketplace items a visitor installsReally installed, so they work; swept at that resource's next start.
Preinstalled marketplace content shipped in the zipUntouched.
Per-player client storage (HUD placement, menu preferences)Untouched. It lives on the player's machine.

Nothing is deleted — writes are dropped, not rolled back — so removing the convar and restarting brings the server back exactly as it was.

tlib_demo [on|off|convar] (console, or tlib.admin) changes it live and reports the new state; convar stops overriding and follows server.cfg again. Access and permission changes take effect immediately; the data reset and the marketplace sweep happen when a resource starts.

Diagnostics

ConvarCommandType / unitDefaultWhat it does
tlib_telemetrysetboolean — 1, true, yes, on, enabled / 0, false, no, off, disabled(unset — off)Opt in to diagnostics events: errors, warnings, renderer crashes and slow-operation outliers from our own code, with machine context. This convar is the only control.
tlib_telemetry_keysetstring(empty)Dev only: points the transport at a local ingest credential. There is nothing for an operator to supply.

tlib_telemetry is the only way to turn diagnostics on or off. An unreadable value (maybe) still counts as a decision, leaving diagnostics off. Unset is off. A consumer resource can store an answer of its own with SetTelemetryConsent (see Exports), and this convar, once set, overrides it.

What this convar does not cover: the per-install id

Marketplace browse, installs and previews, community configs and the startup update check all run regardless of this setting. Every one of them, and the diagnostics ingest, carries a random per-install id (x-install-id) so one server can be rate-limited or blocked on its own.

The id is random, generated on your own server from no input, and is never an IP, a licence key, a server name or a player identifier. It lives in tLib's data.json; deleting it only mints a new one, which is not an opt-out.

Where to see the current state

tlib_telemetry_status in the server console: what is enabled, what decided it, how much is queued, and whether the transport has given up for this session. tLib's hub at http://<server>:7777/ neither shows nor changes it.

What is collected

Faults in our code and performance on real machines — five event kinds, nothing else:

EventCarries
tlib.error_reportedthe resource and version, which VM the fault was in, an error kind, the error name, a file-and-line location, a hash of the normalised stack, and the scrubbed stack itself, stored once per hash per day
tlib.warning_reportedthe same context, a warning kind and a warning code. No message: a warning's text has nowhere to go
tlib.crash_reporteda crash kind and how long the session survived. Sent on the NEXT start, because the renderer that died could not send anything
tlib.slow_operationwhich operation, how long it took, the budget it crossed. Outliers only — never one row per call
tlib.environment_reportedonce per boot: OS, a RAM bucket, GPU vendor and model, CPU threads

What is deliberately not

No IP, no sv_licenseKey, no server name, no server endpoint, no player name, licence, Steam or Discord id, and no player count. The only identifier is the random per-install id above.

Before anything is sent: home-directory paths lose the account name, credential-shaped values are blanked, and anything shaped like a FiveM player identifier (steam:, license:, discord:, a bare Steam id or snowflake, an IP address) is removed.

The RAM bucket caps at 8 GB, so it says "under 8 GB" or "cannot tell" and nothing between.

<resource>_diag output is not routed into this. Those stay in your console.

Marketplace

ConvarCommandType / unitDefaultWhat it does
tlib_api_base_urlsetrURL, no trailing slash, no /api suffixhttps://timmygstudios.comWhere the TIMMYG Studios API lives: browse, preview, install downloads, community configs and the startup version check all follow it. Read by the server bundle and by client Lua, so set alone leaves the in-game panel on the default host.

HTTP router

All server-read; none needs replicating. The listener starts on 7777 with no configuration. Opening that port on the host and in NAT is the step most often missed — see Installation.

ConvarCommandType / unitDefaultWhat it does
tlib_http_portsetinteger, 1–655357777The one external listen port.
tlib_http_hostsetbind address0.0.0.0Interface the listener binds.
tlib_http_public_urlsethost, host:port or full URL(empty — auto-detect)The address clients are told to use. A bare IP or localhost implies HTTP and the listener port; a bare domain implies https://. Advertised, not bound.
tlib_realtime_public_urlsetws:// / wss:// URL(empty — derived)Overrides the realtime WebSocket URL handed to clients. Realtime is a mount on the router at /rt; the removed tlib_realtime_port and tlib_realtime_host do nothing.

All read by client Lua, so all need setr. Changing tlib_menu_key or tlib_menu_pad_key needs a restart, not a reload. Out-of-range or non-numeric values fall back to the default rather than erroring.

ConvarCommandType / unitDefaultWhat it does
tlib_menu_commandsetrstringtlibmenuChat/console command that opens the menu.
tlib_menu_keysetrkey nameF1Default keyboard binding.
tlib_menu_pad_keysetrpad control namestart_indexDefault controller binding.
tlib_menu_search_keysetrkey nameF3Opens search.
tlib_menu_labelsetrstringOpen MenuLabel shown in FiveM's key-binding settings.
tlib_menu_key_slotssetrinteger, 0–168Per-item quick-bind slots offered. 0 disables them.
tlib_menu_localesetrlocale codeenUI language.
tlib_menu_request_timeout_mssetrms, 1000–6000010000How long a snapshot/action request waits before failing.
tlib_menu_permission_refresh_mssetrms, 1000–600005000How often permission-filtered menus are re-pushed.
tlib_menu_highlight_settle_mssetrms, 0–2000120Delay before a highlight change counts as settled. 0 fires immediately.

HUD and storage

ConvarCommandType / unitDefaultWhat it does
tlib_hud_profilesetrstring(empty — the server endpoint)Namespaces each player's saved HUD placement. Set it when one community runs several endpoints that should share one layout.
tlib_community_idsetrstring, [A-Za-z0-9_-] only(empty — falls back to sv_projectName)Prefix for tLib's KVP keys, so two servers on one machine do not share player storage. Disallowed characters are stripped; a value that strips to nothing falls through to sv_projectName. Read by client Lua and the server bundle.

Not convars

These look similar and are not convars. Do not put them in server.cfg:

NameWhat it actually is
tlib_min_version, tlib_module, tlib_modulesfxmanifest.lua metadata keys on the consuming resource.
tlib_menu_selftest, tlib_menu_refresh, tlib_menu_permissionsConsole commands.
tlib_demo (as a command)Also a console command, tlib_demo [on|off|convar], toggling the convar above at runtime. The convar is the real setting.
tmarketplace_resource_secretNothing reads it. An earlier version of this page listed it as required; delete the line if you have it.
tlib_menu_request_timeout, tlib_menu_permission_refresh, tlib_menu_highlight_settleUnit-less near-misses for the three _ms convars. Nothing reads them.

Still stuck? Support can answer it directly.

Was this page helpful?