Skip to Content
Cobalt

Install Cobalt

Deploy the framework with the txAdmin recipe, or put it together by hand.

With the txAdmin recipe

The recipe downloads every resource, connects the database and writes a ready server.cfg.

  1. In txAdmin's setup, give the server a name and pick Remote URL Template as the deployment type.
  2. Paste the recipe URL:
    https://raw.githubusercontent.com/Project-Cobalt-FiveM/txAdminRecipe/main/recipe.yaml
  3. Choose an empty folder for the server data, for example C:\FXServer\server-data.
  4. Enter your license key and the database login.
  5. Run the recipe. It takes a few minutes, mostly downloads.
  6. Read through server.cfg on the last screen, then save and start the server.

The first start creates every table. Watch the console for created the tables of ... lines, then connect with connect 127.0.0.1 in FiveM's F8 console.

GitHub allows 60 anonymous API calls an hour from one IP, and the recipe uses about 40. If you run it twice within an hour, downloads fail with a 403. Wait an hour and run it again.

Install by hand

Use this when you can't use the recipe, or want every resource as a Git checkout so updates are a git pull.

Folder layout

server-data/
├─ server.cfg
├─ logo.png
└─ resources/
   ├─ [cfx-default]/   mapmanager, spawnmanager, baseevents
   ├─ [ox]/            require, ox_lib, ox_target, ox_fuel, ox_doorlock
   ├─ [standalone]/    pma-voice, screencapture, bob74_ipl, hospital_map, dealer_map,
   │                   illenium-appearance, npwd
   └─ [cobalt]/        cobalt_core, cobalt_mysql and every other cobalt_ resource

Download the resources

Run this in PowerShell from your server-data folder. It needs Git.

$cobalt = 'cobalt_mysql','cobalt_core','cobalt_map','cobalt_interfaces','cobalt_sound',
  'cobalt_loading','cobalt_hud','cobalt_chat','cobalt_inventory','cobalt_banking',
  'cobalt_management','cobalt_housing','cobalt_weather','cobalt_multicharacter',
  'cobalt_vehiclekeys','cobalt_garages','cobalt_dealership','cobalt_mechanic',
  'cobalt_cityhall','cobalt_police','cobalt_ambulancejob','cobalt_crime',
  'cobalt_addons','cobalt_adminmenu'
foreach ($name in $cobalt) {
  git clone "https://github.com/Project-Cobalt-FiveM/$name" "resources/[cobalt]/$name"
}

foreach ($name in 'ox_lib','ox_target','ox_fuel','ox_doorlock') {
  git clone "https://github.com/Project-Cobalt-FiveM/$name" "resources/[ox]/$name"
}
git clone --branch v1.0.2 https://github.com/overextended/cfxlua-require "resources/[ox]/require"

foreach ($name in 'illenium-appearance','npwd','bob74_ipl') {
  git clone "https://github.com/Project-Cobalt-FiveM/$name" "resources/[standalone]/$name"
}
git clone https://github.com/AvarianKnight/pma-voice "resources/[standalone]/pma-voice"
git clone https://github.com/qbcore-framework/hospital_map "resources/[standalone]/hospital_map"
git clone https://github.com/qbcore-framework/dealer_map "resources/[standalone]/dealer_map"
New-Item -ItemType File "resources/[standalone]/npwd/.yarn.installed" | Out-Null

Then add the last three by hand:

  • screencapture. Download screencapture.zip from its v0.17.2 release and extract it into resources/[standalone].
  • mapmanager, spawnmanager, baseevents. Copy them from cfx-server-data ([managers] and [system]) into resources/[cfx-default].
  • server.cfg and logo.png. Copy them from the recipe repo.

The empty .yarn.installed file stops FXServer from trying to build npwd on start. npwd ships already built.

Fill in server.cfg

The recipe's server.cfg has placeholders in double braces. Replace them:

PlaceholderReplace with
{{serverEndpoints}}endpoint_add_tcp "0.0.0.0:30120" and endpoint_add_udp "0.0.0.0:30120", on two lines
{{svLicense}}Your license key
{{dbConnectionString}}Your connection string
{{serverName}}Your server's name
{{recipeName}}, {{recipeDescription}}Anything, or delete those lines
{{maxClients}}Your slot count, for example 48
{{addPrincipalsMaster}}add_principal identifier.license:YOUR_LICENSE group.owner. txAdmin's player panel shows your identifiers once you've joined.

Then start the server with FXServer.exe +set onesync on +exec server.cfg from the server-data folder, or point txAdmin at the folder with Existing Server Data.

On this page