FiveM SDK — configuration
Configuration lives in two places: convars in server.cfg for secrets
and endpoints, and config.json in the spawnbase resource folder for
behaviour. Unknown keys in config.json are ignored; missing keys use the
defaults below.
Convars
Section titled “Convars”| Convar | Default | Purpose |
|---|---|---|
SPAWNBASE_MEDIA_API_KEY |
— | Media token (images, video, audio, presigned URLs). |
SPAWNBASE_LOGS_API_KEY |
— | Logs token (cloud logging). |
SPAWNBASE_API_URL |
https://api.spawnbase.gg |
API base (proxies/self-host only). |
SPAWNBASE_API_VERSION |
v1 |
v1 for Spawnbase; v3 only for a Fivemanage-shaped backend. |
The FIVEMANAGE_* equivalents (FIVEMANAGE_MEDIA_API_KEY, …) are also
read, for migrated servers — SPAWNBASE_* wins when both are set.
config.json
Section titled “config.json”{ "logs": { "level": "info", "levels": ["error", "warn", "info", "debug"], "console": true, "enableCloudLogging": true, "appendPlayerIdentifiers": true, "excludedPlayerIdentifiers": ["ip"], "excludeInDepthMetadata": false, "batch": { "size": 500, "flushMs": 5000, "bytes": 524288 }, "capture": { "encoding": "png", "quality": 0.9, "timeoutMs": 10000 }, "playerEvents": { "enabled": false, "dataset": "player_events" }, "chatEvents": { "enabled": false, "dataset": "chat" }, "baseEvents": { "enabled": false, "dataset": "base_events" }, "txAdminEvents": { "enabled": false, "dataset": "txadmin" }, "oxInventoryEvents": { "enabled": false, "dataset": "ox_inventory" } }}| Option | What it does |
|---|---|
logs.level |
Minimum level sent; entries below it are dropped before buffering. |
logs.levels |
Level hierarchy, most → least severe. |
logs.console |
Also print entries to the server console. |
logs.enableCloudLogging |
Send logs to Spawnbase. Off = console only. |
logs.appendPlayerIdentifiers |
With playerSource/targetSource in metadata, attach the player’s identifiers + framework identity as _playerIdentifiers. |
logs.excludedPlayerIdentifiers |
Identifier types never attached. Keep ip in this list unless you need it. |
logs.excludeInDepthMetadata |
Drop internal metadata (session details) from entries. |
logs.batch.size / flushMs |
Flush a dataset’s buffer at this many entries, or at least this often. |
logs.capture.encoding |
Screenshot encoding for screenshot-basic: png or jpg. |
logs.capture.quality |
0–1, jpg only. |
logs.capture.timeoutMs |
How long takeServerImage waits for the client before failing. |
logs.<event>Events |
Automatic event logging: enabled + target dataset. chatEvents can be high-volume — watch your log quota. |
The same reference ships with the resource as config.md next to
config.json.