Skip to Content
Cobalt

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.

GroupCan
group.staffOpen the admin menu (F7 or /admin), noclip, names and blips, go to, bring, spectate, freeze, mute, warn, kick, reports and staff chat
group.adminEvery other admin menu action and admin command, timed bans, and /doorlock
group.ownerMoney, 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.admin

txAdmin'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 allow

Optional keys

Both are off until you set them in server.cfg.

ConvarWhat it turns onWhere to get it
steam_webApiKeySteam identifiers for playerssteamcommunity.com/dev/apikey
fivemesh_api_keyServer logs and phone photo uploads through FiveMeshapp.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:

ConvarDefaultWhat it does
player_save_interval60Seconds between saves of online players who changed. Logout and shutdown always save.
inventory_save_interval60Seconds 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_maxclients48Player 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 forWorks through
QBCore (qb-core)cobalt_core's QBCore bridge
ox_inventorycobalt_inventory
oxmysql, mysql-async, ghmattimysqlcobalt_mysql
chatcobalt_chat
screenshot-basicscreencapture

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" pull

With 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.

On this page