Skip to the content
Docs

Files & Convars

On this page8

There are two config files and they are not interchangeable.

FileLoaded asWho can read itWhat belongs in it
config.luashared_scriptsthe server and every connected playerGameplay numbers, feature switches, integration selectors, item names, HUD defaults.
config_server.luaserver_scriptsthe server onlySecrets, Discord webhook URLs, photo hosting keys, rate limits, retention, clean-up.

Both files stay open after asset escrow (together with locales/*.lua and bridge/*.lua), so you can edit them and keep your edits across updates.

Units used in config.lua

SuffixMeans
...Seconds, ...Ms, ...Minutes, ...Hours, ...Daysexactly that
...Pct, ...Atwhole percent, 0–100
...Factor, ...Match, ...Sharea multiplier, 0.0–1.0
distancesmetres
anglesdegrees

General

KeyDefaultAllowedWhat it does
Config.Debugfalsetrue / falseExtra console output and the admin debug overlay.
Config.Locale'en'any file in locales/Which language file to load.

Convars

Every secret in config_server.lua can also be set from server.cfg. The convar always wins over the value written in the file, and an empty or unset convar leaves the file value alone.

cfg
set recognition_secret            "a-long-random-string"
set recognition_webhook_default   "https://discord.com/api/webhooks/..."
set recognition_webhook_proofs    "https://discord.com/api/webhooks/..."
set recognition_webhook_deaths    "https://discord.com/api/webhooks/..."
set recognition_webhook_admin     "https://discord.com/api/webhooks/..."
set recognition_webhook_exports   "https://discord.com/api/webhooks/..."
set recognition_webhook_errors    "https://discord.com/api/webhooks/..."
set recognition_webhook_anomalies "https://discord.com/api/webhooks/..."
set recognition_fivemanage_key    "YOUR_KEY_HERE"
set recognition_photo_webhook     "https://discord.com/api/webhooks/..."
ConvarOverridesNotes
recognition_secretServerConfig.SecretSaltSet it before the first start, then never change it.
recognition_webhook_defaultServerConfig.Webhooks.DefaultAnything without its own channel.
recognition_webhook_proofs.ProofsAction snapshots.
recognition_webhook_deaths.DeathsNew Life Rule resets.
recognition_webhook_admin.AdminAdmin edits, deletes, identity resets, settings changes.
recognition_webhook_exports.ExportsOne-click pair exports from the panel.
recognition_webhook_errors.ErrorsScript errors.
recognition_webhook_anomalies.AnomaliesPossible cheating.
recognition_fivemanage_keyServerConfig.Fivemanage.ApiKeyOnly when PhotoHost = 'fivemanage'.
recognition_photo_webhookServerConfig.PhotoDiscord.WebhookOnly when PhotoHost = 'discord'.

The secret salt

lua
ServerConfig.SecretSalt = ''       -- convar: recognition_secret
ServerConfig.AllowSaltChange = false
KeyDefaultAllowedWhat it does
ServerConfig.SecretSalt''any long random textKeeps the hidden voice values secret and protects the proof log.
ServerConfig.AllowSaltChangefalsetrue / falseWhether a changed salt is accepted at boot. Leave it off.

Leave it empty and the script generates one into the database on first start. That works, but it is weaker — anyone with database access can read it — and the console warns at every boot:

Code
[5code-recognition] The secret salt is stored in the database. Set recognition_secret in server.cfg (see docs: Security).

Anti-spam and safety limits

config_server.lua also holds a few protection blocks. Leave them as they are unless 5CODE support asks you to change them. Players never download this file.

BlockWhat it is
ServerConfig.RateLimitsPer-player anti-spam limits: how often one player's game may send each kind of message (starting scans, actions like introduce or the mirror, photos, admin panel traffic and so on).
ServerConfig.Security.MaxPayloadBytesThe largest message the server accepts, per kind of message. A bigger one is dropped.
ServerConfig.Security.FocusPosMaxDistanceA camera-distance limit used while scanning. Third-person cameras sit several metres behind the character, so keep it generous. On server artifacts older than 12882 this check is skipped and the console says so once at boot.
KeyDefaultAllowedWhat it does
ServerConfig.Security.LogAnomaliestruetrue / falseSave "possible cheating" notes in the database (recognition_anomalies) for admins.
ServerConfig.Security.AnomalyWebhooktruetrue / falseAlso send them to the Anomalies webhook.

Letting other resources call our write exports

lua
ServerConfig.Api = {
    TrustedResources = {},   -- e.g. { 'my_surgeon_shop', 'my_idcard' }
}

Our own bridges are always allowed. Anything else that calls a write export — ResetIdentity, StartFaceImplant, ReportDown / ReportRevived / ReportRespawned, GrantLabIdentification, LogAction, RecordIntroduction, GiveItem, TriggerItemUse — must be named here, or the call is refused and logged for admins.

Performance logging

KeyDefaultAllowedWhat it does
ServerConfig.Perf.TickWarnMs5.0msWarn when one background loop tick takes longer than this.
ServerConfig.Perf.WindowSeconds300secondsRolling window shown by recognition:status.
ServerConfig.Perf.LogEveryMinutes00 = off, else minutesPeriodic performance line in the console.
ServerConfig.Debugfalsetrue / falseExtra server-side logging.

What can and cannot be changed in game

Admins with the settings level can change almost everything in config.lua from the panel. These can only ever be changed in the files:

  • Everything in ServerConfig — webhooks, the salt, photo keys, rate limits, retention. It is never even offered in the panel.
  • Every integration selector (Config.Framework, Config.MulticharSystem, every *System key) and Config.MDT[...] — they are resolved once at boot.
  • The admin permission settings (Config.Admin.Ace, .FrameworkGroups, .TxAdmin, .TxAdminPerms, .Perms, .GroupPerms, .LiveSettings, .FileOnly, .SettingPerms) and the audit switches (.BlockSelfEdit, .BlockSelfView, .RequireReason, .LogViews, .DiscordActions) — admins can never widen their own rights from inside the game.
  • Config.Memory.Disguises, which changes the shape of stored memory rows.

Details, plus how to lock more keys yourself: Admin & Permissions.