Configure
Staff ranks, optional keys, your own resources and updates after the first start.
Staff ranks
server.cfg defines three ranks. Each one includes everything the rank below it can do.
| Group | Can |
|---|---|
group.staff | Open the admin menu (F7 or /admin), noclip, names and blips, go to, bring, spectate, freeze, mute, warn, kick, reports and staff chat |
group.admin | Every other admin menu action and admin command, timed bans, and /doorlock |
group.owner | Money, cars, permissions, kick all, resource control, permanent bans, and every server command except quit |
The recipe makes your txAdmin account the owner. Add more staff at the bottom of server.cfg:
add_principal identifier.license:abc123... group.staff
add_principal identifier.discord:123456789012345678 group.admintxAdmin's player panel lists each player's identifiers. In game, /addpermission <id> <rank> gives a rank until the next restart.
Whitelist
To let only approved players join, set whitelist = true in cobalt_core/config/server.lua, or run /whitelist in game to switch it on until the next restart. Staff ranks always pass. Approve a player in server.cfg:
add_ace identifier.license:abc123... whitelisted allowOptional keys
Both are off until you set them in server.cfg.
| Convar | What it turns on | Where to get it |
|---|---|---|
steam_webApiKey | Steam identifiers for players | steamcommunity.com/dev/apikey |
fivemesh_api_key | Server logs and phone photo uploads through FiveMesh | app.fivemesh.io |
Set fivemesh_api_key with set, never setr, so clients can't read it.
Server settings
These convars in server.cfg change how the framework behaves:
| Convar | Default | What it does |
|---|---|---|
player_save_interval | 60 | Seconds between saves of online players who changed. Logout and shutdown always save. |
inventory_save_interval | 60 | Seconds between saves of changed inventories, trunks and stashes. |
inventory_stash_cleanup | "24 WEEK" | Deletes stashes nobody has touched for this long. "0" keeps them forever. |
sv_maxclients | 48 | Player slots. |
Each resource's own options are in its config.lua, with a comment on every setting.
Adding your own resources
Put them in resources/ and add ensure your_resource below ensure cobalt_adminmenu in server.cfg. Anything that starts later than Cobalt can use its exports.
Scripts written for other frameworks mostly run without changes:
| Written for | Works through |
|---|---|
QBCore (qb-core) | cobalt_core's QBCore bridge |
| ox_inventory | cobalt_inventory |
| oxmysql, mysql-async, ghmattimysql | cobalt_mysql |
chat | cobalt_chat |
screenshot-basic | screencapture |
Don't install the originals of these next to Cobalt. Two resources providing the same name conflict.
Updating
Each resource is its own GitHub repo. With a manual install, update one with:
git -C "resources/[cobalt]/cobalt_core" pullWith a recipe install, download the new version of the resource from GitHub and replace its folder.
Restart the server after updating. If the console then shows Unknown column errors, a table changed layout. Run the update's migration SQL file, or wipe the database if it has none. When an update changes a table has the steps.