Volume 1 · Free handbook

The FiveM Server Handbook
setup to launch, in one place.

Everything you need to run a FiveM server, in one place: choosing hardware, installing FXServer with txAdmin, writing server.cfg, opening the right ports, organising resources, connecting a database, OneSync and slots, streaming maps and vehicles, finding lag, hardening security, managing staff and keeping the server alive with restarts and backups. Each chapter gives you the working commands and config, explains why they matter, and links to a detailed guide when you need to go deeper.

  • 17chapters
  • 55 minreading time
  • 45commands & convars
  • 41glossary terms

Who this handbook is for

  • First-time owners setting up a FiveM server from zero
  • Owners moving from a game host to a VPS or dedicated server
  • Staff who handle restarts, backups, permissions and moderation
  • Developers who want to understand the server they deploy to

Updated 11 September 2026 · checked against the official Cfx.re documentation.

A running server in fifteen minutes

  1. Create a server key on portal.cfx.re (free).
  2. Download the recommended server build from the Server Download page — server.7z on Windows, fx.tar.xz on Linux.
  3. Extract it to C:\FXServer\server (or ~/FXServer/server) and run FXServer.exe (or ./run.sh).
  4. txAdmin opens on port 40120: enter the PIN, link your Cfx.re account and set the panel password.
  5. Pick a recipe (CFX Default needs no database), paste your server key and click Save & Run Server.
  6. Open port 30120 TCP and UDP in the firewall and set sv_projectName and sv_projectDesc.
  7. Connect from the F8 console with connect your-ip:30120; the server list can take up to 8 minutes to show you.
Chapter 01

#How a FiveM server works

A FiveM server is FXServer — the Cfx.re server program — running a folder of resources and a server.cfg. Knowing which part does what makes every later chapter easier.

PartWhat it isWhere it lives
ArtifactsThe FXServer build itself, published by Cfx.reC:\FXServer\server or ~/FXServer/server
Server dataYour resources, server.cfg and cacheserver-data/ (with txAdmin: the folder you choose)
ResourcesFolders with an fxmanifest.lua: scripts, maps, vehicles, UIserver-data/resources/
server.cfgStartup commands: endpoints, name, slots, resources, permissionsserver-data/server.cfg
txAdminWeb panel bundled with the artifactsPort 40120, data in txData/
Server keyLinks the server to your Cfx.re accountsv_licenseKey in server.cfg
DatabaseWhere frameworks store players, money and itemsMariaDB/MySQL through oxmysql

Players connect to your IP on port 30120. The server tells each client which resources to download — scripts, streamed models and textures, UI files — then runs server scripts on the server and client scripts on every player’s PC. The server also sends a heartbeat to the Cfx.re server list, which is how players find you.

Scripts come in halves. Server scripts are authoritative: they can read the database, secrets and every player. Client scripts run on each player’s PC: they draw the world, read input and show UI. Anything that runs on a player’s PC can be modified, so money, items and permissions are always decided on the server — see security hardening.

Chapter 02

#Hardware and hosting

The FXServer main thread does most of its work on one core, so the speed of a single CPU core matters more than the number of cores. Choose hardware and a host around that.

Server sizePlayersCPURAMStorage
Test / friendsUp to ~10Any modern 4-core8 GBSSD
Small community32–64High single-thread, 4–6 cores16 GBNVMe
Busy roleplay100–200+The fastest single-thread CPU you can get32 GB+NVMe, database tuned or separate

Starting points, not guarantees — scripts matter more than player count. Measure with txAdmin and the profiler.

OptionGood forWatch out for
Home PCDevelopment, a few friendsUpload speed, exposing your home IP, uptime
Game-server hostA first public server without admin skillsShared CPUs, limited database and file access
VPSFull control at a low priceOversold CPUs (steal time); you manage security
Dedicated serverLarge, busy serversCost; you manage everything
  • Ask which CPU model you get and whether cores are shared.
  • Ask for game-aware (UDP) DDoS filtering, not only web protection.
  • Pick a data centre close to most of your players.
  • Make sure you can open 30120 TCP/UDP and restrict 40120 to your IP.
  • Check whether backups are included and whether you can restore them yourself.
Chapter 03

#Installing FXServer and txAdmin

The official quick route is txAdmin: download the artifacts, run them, and txAdmin sets up the rest in your browser. The vanilla route — cfx-server-data plus your own server.cfg — still works and shows what txAdmin does for you.

  1. Create C:\FXServer\server and download the recommended Windows build (server.7z) from the Server Download page.
  2. Extract it into that folder with 7-Zip or WinRAR.
  3. Double-click FXServer.exe. txAdmin opens in your browser — check that the PIN is filled in and click Link Account.
  4. Log in with your Cfx.re account, allow access, and create the admin panel password.
  5. Name the server, choose Popular Recipes and pick one. CFX Default needs no database; framework recipes (ESX, QBCore, Qbox) do.
  6. Run the recipe deployer, enter your server key from portal.cfx.re, then click Save & Run Server.
Optional on Windows: stop Microsoft Defender from slowing startup (run as administrator)
Add-MpPreference -ExclusionPath 'C:\FXServer\'

Linux. Cfx.re calls the Linux build a courtesy port — Windows receives fixes first — but many large servers run on Linux without trouble. You need xz-utils to unpack the build.

Linux (Debian/Ubuntu) — txAdmin route
sudo apt install -y xz-utils curl git
mkdir -p ~/FXServer/server && cd ~/FXServer/server
wget "<recommended fx.tar.xz URL from the Server Download page>"
tar xf fx.tar.xz
./run.sh    # starts txAdmin on port 40120
Vanilla route (no txAdmin recipe)
git clone https://github.com/citizenfx/cfx-server-data.git ~/FXServer/server-data
cd ~/FXServer/server-data
# create server.cfg (see the next chapter), then:
bash ~/FXServer/server/run.sh +exec server.cfg
Checklist
  • Server key created on portal.cfx.re
  • Recommended artifacts extracted
  • txAdmin master account linked to your Cfx.re account
  • Recipe deployed or server data folder selected
  • Server starts without red errors in the console
Chapter 04

#server.cfg, line by line

server.cfg is a list of console commands run at startup. Endpoints and convars go first, resources start in dependency order, and secrets live in a separate file.

server.cfg — a production-style example
# Network: players connect on 30120, TCP and UDP
endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"

# How the server appears in the server list
sv_hostname "Night City RP"
sets sv_projectName "Night City RP"
sets sv_projectDesc "Serious roleplay with custom jobs, housing and a player-run economy."
sets tags "roleplay, serious, economy, jobs"
sets locale "en-US"
load_server_icon logo96.png
sets banner_detail "https://example.com/banner-detail.png"
sets banner_connecting "https://example.com/banner-connecting.png"

# Game settings (startup only)
set onesync on
sv_maxclients 48
sv_enforceGameBuild 3258

# Security basics (see the Security chapter)
sv_scriptHookAllowed 0
sv_endpointPrivacy true
sv_pureLevel 1

# Database for oxmysql
set mysql_connection_string "mysql://fivem:[email protected]/fivem?charset=utf8mb4"

# Base resources, then libraries, then framework, then everything else
ensure mapmanager
ensure chat
ensure spawnmanager
ensure sessionmanager
ensure hardcap
ensure oxmysql
ensure ox_lib
ensure [framework]
ensure [jobs]
ensure [maps]
ensure [ui]

# Permissions
add_ace group.admin command allow
add_ace group.admin command.quit deny
add_principal identifier.fivem:1 group.admin

# Keys and tokens live in a file you never share
exec secrets.cfg
secrets.cfg — kept out of screenshots, Git and support tickets
sv_licenseKey "your-server-key"
set steam_webApiKey ""
set discord_bot_token "..."
LineWhy it matters
endpoint_add_tcp / endpoint_add_udpThe port players connect on; both protocols are needed
sets sv_projectName / sv_projectDescRequired for the server list — if either is missing the server shows an error on startup and may not be listed
sets tags / sets localeServer list filters and language; replace the default root-AQ with a real locale
load_server_iconThe server list icon — a 96×96 PNG
set onesync onRequired above 64 slots; enables server-side entities and routing buckets
sv_maxclients1–2048 slots; more than 48 needs a Cfx.re subscription (Element Club Argentum or higher)
sv_enforceGameBuildGame build for every player; only read at startup
ensureStarts a resource, or restarts it if it is running; order = dependency order
execRuns another cfg file — perfect for secrets and per-server overrides
set / sets / setrset is a normal convar, sets also publishes it to the server list, setr replicates it to clients
Chapter 05

#Ports, firewall and connecting

When players cannot connect, or the server is missing from the list, the cause is almost always ports, the firewall or two missing convars.

PortProtocolPurposeOpen to
30120TCP + UDPGame connections and the HTTP endpoints (info.json)Everyone
40120TCPtxAdmin web panel (TXHOST_TXA_PORT changes it in txAdmin 8+)Only your IP, a VPN or a proxy
3306TCPMariaDB / MySQLNobody — bind to localhost
Linux (ufw)
sudo ufw allow 30120/tcp
sudo ufw allow 30120/udp
sudo ufw allow from YOUR.HOME.IP to any port 40120 proto tcp
sudo ufw allow OpenSSH
sudo ufw enable
Windows Firewall (run as administrator)
New-NetFirewallRule -DisplayName "FiveM TCP" -Direction Inbound -Protocol TCP -LocalPort 30120 -Action Allow
New-NetFirewallRule -DisplayName "FiveM UDP" -Direction Inbound -Protocol UDP -LocalPort 30120 -Action Allow
  1. Open http://your-ip:30120/info.json in a browser — it should return JSON describing the server.
  2. In FiveM press F8 and run connect your-ip:30120. If this fails, port forwarding or the firewall is wrong.
  3. Check that sv_master1 is commented out.
  4. Confirm sv_projectName and sv_projectDesc are set.
  5. Wait — a new server can take up to 8 minutes to appear in the list.
  6. Behind a NAT or gateway that rewrites UDP source ports, the server may not list; check your router or firewall documentation.
Chapter 06

#Resources, fxmanifest.lua and start order

Every feature on a FiveM server is a resource: a folder with an fxmanifest.lua. Organised folders and a clear start order prevent most “it worked yesterday” problems.

A resources folder that stays readable at 200 resources
resources/
  [base]/        mapmanager, chat, spawnmanager, sessionmanager, hardcap
  [libs]/        oxmysql, ox_lib, ox_target
  [framework]/   qbx_core or es_extended and its core resources
  [jobs]/        police, ambulance, mechanic
  [maps]/        MLOs and ymaps
  [vehicles]/    add-on cars
  [ui]/          hud, loading screen, minimap
fxmanifest.lua — a typical script resource
fx_version 'cerulean'
game 'gta5'
lua54 'yes'

name 'nc_garage'
version '1.2.0'

shared_scripts { '@ox_lib/init.lua', 'config.lua' }
client_scripts { 'client/*.lua' }
server_scripts { '@oxmysql/lib/MySQL.lua', 'server/*.lua' }

ui_page 'web/dist/index.html'
files { 'web/dist/**' }

dependencies { 'oxmysql', 'ox_lib' }
CommandWhat it does
ensure nameStarts the resource, or restarts it if it is running
start name / stop nameStart or stop; also works on categories such as start [cars]
restart nameRestarts a running resource
refreshRescans the resources folder so new resources can be started
exec file.cfgRuns commands from another file, including @resource/file.cfg
  • Bracket folders such as [jobs] are categories: ensure [jobs] starts everything inside.
  • Start libraries before anything that uses them: oxmysql and ox_lib, then the framework, then jobs and UI.
  • After copying in a new folder on a running server: refresh, then ensure name.
  • Leave the default cfx-server-data resources unedited unless you must — updates become painful.
  • Delete what you do not use. Every client script costs frame time on every player’s PC.
Chapter 07

#Database: MariaDB and oxmysql

Frameworks keep players, money, items and vehicles in MariaDB (or MySQL) through oxmysql. The database is the most valuable thing on the machine — set it up properly and back it up from the first day.

Install MariaDB (Debian/Ubuntu)
sudo apt install -y mariadb-server
sudo mariadb-secure-installation
sudo mariadb
A database and a user that can only touch it
CREATE DATABASE fivem CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'fivem'@'127.0.0.1' IDENTIFIED BY 'a-long-random-password';
GRANT ALL PRIVILEGES ON fivem.* TO 'fivem'@'127.0.0.1';
FLUSH PRIVILEGES;
server.cfg
set mysql_connection_string "mysql://fivem:[email protected]/fivem?charset=utf8mb4"
set mysql_slow_query_warning 200
ensure oxmysql
  • Use a dedicated user with rights on one database only — never root.
  • Keep 3306 closed to the internet; manage the database over an SSH tunnel.
  • Import the framework’s SQL file before the first start.
  • oxmysql prints a warning for queries slower than mysql_slow_query_warning (200 ms by default). Treat each one as a bug: add an index or move the query out of a loop.
  • Index columns you search by — identifiers, citizen IDs, plates.

Schema tips for developers: FiveM database design.

Chapter 08

#Frameworks and the core stack

A framework gives every script the same idea of a character, a job, money and an inventory. Choose one before you buy scripts — most resources are written for a specific framework.

FrameworkStyleNotes
ESX LegacyLong-running, very large cataloguees_extended; works with ox_inventory
QBCorePopular, large script marketqb-core; qb-inventory by default
QboxQBCore-compatible on a modern ox stackqbx_core; ox_inventory and ox_lib built in
ox_coreMinimal and developer-focusedBy Overextended; ox_inventory native
Standalone / vMenuFreeroam, racing, driftNo character or economy system

The Overextended stack — oxmysql, ox_lib, ox_inventory, ox_target, ox_doorlock — is shared across frameworks; ox_inventory officially supports ox_core, ESX, Qbox and ND_Core. A full comparison: ESX vs QBCore vs Qbox.

  • Start from the framework’s txAdmin recipe, then add scripts one at a time.
  • Buy scripts that support your framework (or bridge several) and read their dependency list first.
  • Never run two frameworks on one server.
  • Keep a list of every resource, its version and where it came from.
Chapter 09

#OneSync, player slots and game builds

OneSync makes the server aware of every entity. It is required for large slot counts and unlocks server-side entity natives, entity lockdown, state bags and routing buckets.

`onesync` valueMeaning
onFull state awareness and server-determined entity routing — use this
legacyCompatibility mode for scripts that expect every player on every client; not recommended
offStandard GTA peer-to-peer networking; the server is only a relay
Slots (`sv_maxclients`)Requirement
From 32OneSync on or legacy
Above 64OneSync on
Above 48Element Club Argentum subscription or higher on the key owner’s account
Maximum2048
Routing buckets and state bags (server)
-- move a player into their apartment instance
SetPlayerRoutingBucket(source, 1000 + source)
SetRoutingBucketPopulationEnabled(1000 + source, false)

-- back to the normal world
SetPlayerRoutingBucket(source, 0)

-- synced data on the player
Player(source).state:set('duty', true, true)
BuildUpdate
2189Cayo Perico Heist
2802Los Santos Drug Wars
2944San Andreas Mercenaries
3095The Chop Shop
3258Bottom Dollar Bounties
3407Agents of Sabotage
3570Money Fronts
3751A Safehouse in the Hills
3889The Kortz Center Heist

`sv_enforceGameBuild <number>` — startup only; each build includes everything before it.

Chapter 10

#Streaming maps, MLOs, vehicles and clothing

Anything that adds or replaces game content — maps, MLOs, vehicles, clothing, props, the minimap — is streamed: the files sit in a resource’s stream/ folder and players download them on join.

FileContainsUsed for
.yftFragment modelVehicles, some weapons and props
.ydrDrawable modelProps, weapons
.yddDrawable dictionaryClothing, peds, minimap geometry
.ytdTexture dictionaryTextures for everything
.ybnCollision boundsMaps and MLOs
.ymapPlacementsWhere entities sit in the world
.ytypArchetype definitionsNew props and interiors
.metaData filesVehicles, handling, weapons, peds
fxmanifest.lua — an add-on vehicle
fx_version 'cerulean'
game 'gta5'

files {
    'data/vehicles.meta',
    'data/handling.meta',
    'data/carvariations.meta',
    'data/carcols.meta',
}

data_file 'HANDLING_FILE' 'data/handling.meta'
data_file 'VEHICLE_METADATA_FILE' 'data/vehicles.meta'
data_file 'CARCOLS_FILE' 'data/carcols.meta'
data_file 'VEHICLE_VARIATION_FILE' 'data/carvariations.meta'
  • Assets above 16 MiB of physical memory trigger the oversized-asset warning. Downscale 4K textures to 2K or 1K and compress them with mipmaps.
  • Maps and MLOs need this_is_a_map 'yes'; new props need a .ytyp declared with data_file 'DLC_ITYP_REQUEST'.
  • Two resources streaming the same file name conflict — only one wins. This is the usual cause of a broken minimap.
  • Very large asset counts can exceed game pools such as TxdStore; raise them with increase_pool_size within Cfx.re’s limits (see the performance chapter).
  • Check the Cfx.re Portal for any subscription requirement before streaming custom clothing.
Chapter 11

#Performance: server lag, FPS and texture loss

Measure before you change anything. Server lag, client FPS drops and texture loss have different causes and different tools.

SymptomToolUsual cause
Everyone rubber-bands at onceHitch warnings in the console, profilerA resource blocking the server thread
One player lagsTheir ping, their F8 consoleTheir connection or PC
Low FPS for everyoneresmon 1 in F8Client scripts working every frame, heavy NUI
Textures pop or go missingOversized-asset warningsToo many large textures
Server slows over hoursEntity counts, memory in resmonLeaks: entities never deleted, growing tables
Server console — record the profiler while the lag happens
profiler record 500
profiler view
  • Client loops: sleep when nothing is near (Wait(500) or more); use Wait(0) only while drawing or reading controls.
  • Replace polling with events, state bags and ox_lib points or zones.
  • Database: asynchronous queries, indexes, and never a query inside a loop over players.
  • Lower AI population with density multipliers, or set onesync_population false if you need none.
  • Delete entities when a job ends, when a resource stops and when a player drops.
PoolMax increase (FiveM)
TxdStore26000
AnimStore20480
EntityDescPool20480
Building20000
FragmentStore14000
CWeaponComponentInfo2048
Object2000
fragInstGta2000

Set with `increase_pool_size "TxdStore" 6000` at startup; inspect pools in F8 → Tools → Streaming → Pool Monitor.

Chapter 12

#Security hardening

FiveM security comes down to two things: server convars that shut whole classes of abuse, and scripts that never trust the client.

Convar / commandSuggestedEffect
sv_scriptHookAllowed0Refuses clients running Script Hook V
sv_pureLevel1 or 2Blocks modified game files (level 1 allows audio and known graphics mods)
sv_entityLockdownstrict or relaxed, after testingstrict: clients cannot create entities; relaxed: client-created script entities are blocked
sv_filterRequestControl14Blocks control requests for entities controlled by players
sv_enableNetworkedSoundsfalseStops routing NETWORK_PLAY_SOUND_EVENT, a common abuse vector
sv_enableNetworkedPhoneExplosionsfalse (default)Keep phone explosion events disabled
sv_enableNetworkedScriptEntityStatesfalse if unusedStops routing SCRIPT_ENTITY_STATE_CHANGE_EVENT
setr sv_stateBagStrictModetrueOnly the server can change state bags on networked entities
sv_endpointPrivacytrueHides player IPs from public server output
rcon_passwordunsetRCON stays disabled
block_net_game_eventEvents you never useDrops a game event on the server

In scripts, validate every server event: who sent it (source), whether they may do it (job, ACE, distance), whether the values make sense (types, ranges) and how often they call it. Never accept money, prices or item counts from the client. Patterns and code: secure server events.

  • Keep the server key, webhooks, bot tokens and store secrets in an exec’d file or server-only convars — never in client files.
  • Restrict txAdmin to known IPs and give every staff member their own account.
  • Update artifacts and resources; old versions have publicly known exploits.
  • Buy from reputable sellers — leaked resources often ship with backdoors.
  • Log admin actions and economy changes somewhere staff cannot edit.
Chapter 13

#Admins, ACE permissions and moderation

Two permission systems run side by side: txAdmin permissions for the web panel and in-game admin menu, and ACE permissions for commands and scripts.

server.cfg — groups, inheritance and people
# groups
add_ace group.admin command allow
add_ace group.admin command.quit deny
add_ace group.mod command.kick allow
add_principal group.admin group.mod

# people
add_principal identifier.fivem:1 group.admin
add_principal identifier.discord:123456789012345678 group.mod

# check from the console
test_ace group.mod command.kick
Checking a permission in a script (server)
RegisterCommand('kickidle', function(source)
    if source ~= 0 and not IsPlayerAceAllowed(source, 'command.kick') then return end
    -- ...
end, false)
IdentifierAlways there?Notes
licenseYesRockstar licence — the stable key for players
license2UsuallySecond licence (for example Steam users)
discordIf Discord is runningNeeded for Discord roles and whitelists
fivemIf logged in to Cfx.reUsed by txAdmin
steamOnly with steam_webApiKeyAnd Steam running
ipYesChanges; never use alone
  • One txAdmin account per staff member with only the permissions their role needs.
  • txAdmin bans store identifiers and hardware tokens and log who banned and why.
  • Write down punishments and an appeal route, and link them from Discord.
  • Separate moderation powers from infrastructure access (files, database, host).
Chapter 14

#Restarts, backups and updates

Stable servers are boring on purpose: fixed restart times, automatic backups, a test server for updates and a written rollback plan.

WhenRoutine
Every restartSave player data in txAdmin’s restart and shutdown events
DailyDatabase dump, compressed and copied off the machine
WeeklyDisk space, txAdmin diagnostics, resmon on a busy evening
Every updateTest on a dev server, back up, deploy in a quiet hour, keep the old version
MonthlyRestore a backup to a spare database to prove it works
Saving before txAdmin restarts (server)
AddEventHandler('txAdmin:events:scheduledRestart', function(data)
    if data.secondsRemaining == 60 then
        -- save everything that is not saved yet
    end
end)

AddEventHandler('txAdmin:events:serverShuttingDown', function()
    -- final save
end)

txAdmin announces a scheduled restart 30, 15, 10, 5, 4, 3, 2 and 1 minutes before it happens, and restarts crashed servers automatically.

/opt/fivem/backup.sh — run daily from cron (0 5 * * *)
#!/bin/sh
STAMP=$(date +%F-%H%M)
mariadb-dump --single-transaction fivem | gzip > /backups/fivem-$STAMP.sql.gz
tar --exclude='server-data/cache' -czf /backups/server-data-$STAMP.tar.gz -C /home/fivem server-data
find /backups -type f -mtime +14 -delete
  • Read the artifact changelog, then update the test server first.
  • Keep the previous artifact folder — rolling back is switching folders.
  • Update one resource at a time and watch the console after each.
  • Copy backups off the machine; a backup on the same disk dies with it.
Chapter 15

#Map, minimap and world settings

The map is what players look at most. Minimap, blips, weather, traffic, wanted level and interiors are all yours to configure.

You wantHow
A themed or branded minimapStream one minimap resource — install a custom minimap
Postal codes and /postalA postal map plus a nearest-postal script using the same data — postal codes
Map blipsAddBlipForCoord with a sprite and colour — blips
Synced weather and timeOne sync resource on the server — weather and time
Less traffic and fewer pedsDensity multipliers every frame, or onesync_population falsetraffic
No wanted level or AI policeSetMaxWantedLevel(0) and dispatch off — wanted level
GTA Online interiorsRequestIpl or bob74_ipl — interiors and IPLs
Cayo PericoGame build 2189+ and the island natives — Cayo Perico
client.lua — no wanted level, no AI police
CreateThread(function()
    SetMaxWantedLevel(0)
    for i = 1, 15 do
        EnableDispatchService(i, false)
    end
    SetCreateRandomCops(false)
end)

The minimap is on screen for the whole session, so a map in your server’s colours — with or without postal codes, or with your logo on it — is one of the most visible upgrades you can make. Browse ready-made minimaps or brand one in the studio.

Chapter 16

#Troubleshooting common problems

Most server problems follow a handful of patterns. Find the symptom, check the likely cause, then open the linked guide.

SymptomLikely causeFirst thing to try
Not in the server listPorts, active sv_master1, missing project name/description, or just startedinfo.json test, direct connect, wait up to 8 minutes
“Failed to start resource”Started from the wrong folder, or no fxmanifest.luaStart from server-data; check the manifest
Stuck downloading on joinHuge or broken streamed filesCheck oversized-asset warnings; remove the last resource added
Only 48 slotsNo subscription on the key owner’s accountElement Club Argentum or higher, then raise sv_maxclients
Hitch warnings during playA resource blocking the server threadprofiler record while it happens
Missing minimap or texture lossConflicting minimap resources, oversized texturesKeep one minimap resource; compress textures
Slow startup on WindowsDefender scanning FXServer filesAdd a Defender exclusion
Crash on joinA broken streamed asset or game build mismatchRead the crash dump; remove recent assets
Desync and rubber-bandingServer hitches, bad connections, client-only stateProfile the server; sync state through the server
Chapter 17

#The launch checklist

Before you advertise anywhere, go through this list. Every item is something a real server discovered on launch day.

The first minute decides whether a new player stays — loading screen, spawn, minimap and HUD all count. Read the first sixty seconds, and for the marketing side use the server launch checklist.

Checklist
  • Recommended artifacts, tested on a dev server
  • sv_projectName, sv_projectDesc, tags, locale and a 96×96 icon set
  • Server list banners and a loading screen that match your brand
  • Ports 30120 TCP/UDP open; 40120 and 3306 closed to the public
  • OneSync on and sv_maxclients matching your subscription
  • Security convars set and tested
  • Secrets moved to an exec’d file
  • Staff accounts in txAdmin with the right permissions
  • ACE groups for admin commands
  • Scheduled restarts with save handlers
  • Daily off-machine database backups — and one test restore
  • resmon checked with 20+ players on the test server
  • No oversized-asset warnings in the console
  • Rules, appeal route and support channel in Discord
  • A rollback plan for the first update
Reference

Cheat sheets

The commands, convars and paths you will look up again and again.

Server console commands

Type these in the server console or the txAdmin live console.

CommandWhat it does
ensure nameStart a resource, or restart it if running
start name / stop nameStart or stop a resource or [category]
restart nameRestart a running resource
refreshRescan the resources folder
exec file.cfgRun commands from a file (also @resource/file.cfg)
quit "reason"Stop the server with a message to players
statusList players with ID, identifier, endpoint and ping (rconlog)
clientkick id reasonKick a player by server ID (rconlog)
say messageChat message as console (chat resource)
add_ace / remove_aceAdd or remove a permission entry
add_principal / remove_principalAdd or remove group inheritance
test_ace principal objectCheck whether a permission is allowed
load_server_icon file.pngLoad a 96×96 PNG server icon
profiler record 500 / profiler viewRecord and inspect server performance
con_addChannelFilter filter actionSilence noisy console channels
svguiOpen or close the server debug GUI

Core convars

The settings almost every server uses.

ConvarExampleNotes
sv_hostname"Night City RP"Server-specific host name
sets sv_projectName"Night City RP"Required for the list; a name, not tags
sets sv_projectDesc"Serious roleplay…"Required for the list; one sentence
sets tags"roleplay, economy"Comma-separated tags
sets locale"en-US"Primary language
sv_maxclients481–2048
set onesynconon / legacy / off
sv_enforceGameBuild3258Startup only
sv_licenseKey"…"From portal.cfx.re
sets sv_appearAllowlistedtrueLock icon in the server list
sets sv_allowlistInstructions"Apply on discord.gg/…"Shown with the lock icon
sv_lanfalsetrue = LAN only, not listed
set steam_webApiKey"…"Enables Steam identifiers
set sv_forceIndirectListingtrueDo not advertise the real IP
sv_kvsNamedefaultKVP database file name; startup only

OneSync convars

Defaults are right for most servers; change them only with a reason.

ConvarDefaultWhat it does
onesync_enableInfinitytrueLarge-scale entity sync; startup only
onesync_populationtrueAI peds and traffic
onesync_forceMigrationtrueMove entity ownership when the owner leaves
onesync_distanceCullingtrueStop syncing far-away entities
onesync_distanceCullVehiclesfalseApply culling to vehicles too
onesync_radiusFrequencytrueUpdate near entities more often
sv_useAccurateSendstrueSend updates by relevance and distance

Where things live

Paths you will need sooner or later.

WhatPath
Server buildC:\FXServer\server · ~/FXServer/server
Resources and server.cfgserver-data/
Server cache (safe to delete when stopped)server-data/cache
txAdmin data (admins, bans, history)txData/
txAdmin adminstxData/admins.json
Client cache%localappdata%\FiveM\FiveM.app\data\cache
Client game build data (keep)%localappdata%\FiveM\FiveM.app\data\game-storage
Reference

Glossary

Every term this handbook uses, in one line each.

ACE
Access Control Entry — a permission rule added with add_ace, checked with IsPlayerAceAllowed.
Artifacts
The FXServer builds Cfx.re publishes; “recommended” for live servers, “latest” for testing.
Cfx.re
The company and platform behind FiveM and RedM, now part of Rockstar Games.
Cfx.re Portal
portal.cfx.re — where you create server keys and manage subscriptions; replaced Keymaster.
Convar
A console variable such as sv_maxclients, set with set, sets or setr.
Deferrals
The playerConnecting API for holding a connecting player: checks, messages, adaptive cards.
Element Club
Cfx.re subscriptions; Argentum or higher unlocks more than 48 slots.
Entity lockdown
sv_entityLockdown — controls whether clients may create entities.
ESX
A long-running roleplay framework (es_extended).
fxmanifest.lua
The manifest every resource needs: scripts, files, dependencies, data files.
FXServer
The server program that runs FiveM and RedM servers.
Game build
The GTA V update a server enforces with sv_enforceGameBuild.
Hitch warning
A console warning that the server thread was blocked for a number of milliseconds.
Identifier
A player ID such as license:…, discord:… or fivem:….
IPL
A named map chunk switched on with RequestIpl, often used for interiors.
MLO
A custom interior streamed as a map resource.
Native
A game or Cfx.re function callable from scripts, listed at docs.fivem.net/natives.
NUI
The in-game browser layer used for HUDs, menus and loading screens.
OneSync
Server-side state awareness; required above 64 slots.
oxmysql
The standard MySQL/MariaDB connector resource for FiveM.
ox_lib
A shared library of UI, callbacks, zones and helpers used by many resources.
Pool
A fixed-size game store (textures, objects…) that can be raised with increase_pool_size.
Principal
A group or player identity that ACE rules apply to, such as group.admin.
Qbox
A QBCore-compatible framework built on the ox stack (qbx_core).
QBCore
A popular roleplay framework (qb-core).
Recipe
A txAdmin template that deploys a complete server.
resmon
The in-game resource monitor (F8 → resmon 1) showing CPU time and memory per resource.
Resource
A folder with an fxmanifest.lua — one feature, map, vehicle or UI.
Routing bucket
A separate instance of the world; bucket 0 is the normal world.
server.cfg
The startup config: endpoints, convars, resources and permissions.
State bag
Synced key/value data attached to players, entities or the global state.
Stream folder
A resource’s stream/ folder; files there are sent to clients as game assets.
sv_pureLevel
Blocks modified client game files at level 1 or 2.
txAdmin
The web panel bundled with FXServer for setup, restarts, players and bans.
txData
txAdmin’s data folder: admins, bans, settings and history.
YDD
Drawable dictionary — clothing, peds and minimap geometry.
YDR
A single drawable model, such as a prop or weapon.
YFT
A fragment model, mainly vehicles.
YMAP
A placement file listing entities in the world.
YTD
A texture dictionary.
YTYP
Archetype definitions for new props and interiors.
Reference

Questions server owners ask

How do I make a FiveM server?
Create a server key on portal.cfx.re, download the recommended server build, run FXServer, finish the txAdmin setup with a recipe, open port 30120 TCP and UDP, and set your project name and description.
Is it free to host a FiveM server?
The server software and a server key are free. You pay for hosting, and for more than 48 slots you need an Element Club Argentum subscription or higher.
Which ports does FiveM use?
30120 TCP and UDP for players. txAdmin uses 40120 TCP, which you should restrict to your own IP.
What does txAdmin do?
It is the web panel bundled with FXServer: setup with recipes, live console, scheduled restarts, player management, bans and staff accounts.
Why is my server not showing in the server list?
Usually ports or the firewall, an active sv_master1 line, or missing sv_projectName/sv_projectDesc. New servers can take up to 8 minutes to appear.
How many players can a FiveM server have?
Up to 2048 with OneSync on. From 32 slots you need OneSync, above 64 OneSync must be on, and above 48 you need a Cfx.re subscription.
Should I use Windows or Linux?
Both work. Windows receives fixes first and is easier for beginners; Linux is common on VPS hosting and uses fewer resources.
What is the best CPU for a FiveM server?
One with the highest single-thread performance you can afford — the main server thread depends on it more than on core count.
How do I give someone admin on FiveM?
Create a txAdmin account for them with the right permissions, and add them to an ACE group in server.cfg with add_principal identifier.fivem:ID group.admin.
What does OneSync do?
It makes the server aware of every entity, enabling large slot counts, server-side entity creation, entity lockdown, state bags and routing buckets.
What game build should my server use?
A recent build your scripts support. Set it with sv_enforceGameBuild; newer builds unlock newer vehicles, weapons and map content.
How do I fix lag on my FiveM server?
Find out whether it is the server (hitch warnings, profiler) or the clients (resmon), then fix the specific resource instead of guessing.
How do I secure a FiveM server?
Set the security convars (script hook off, pure level, entity lockdown, state bag strict mode), keep secrets out of client files, restrict txAdmin, and validate every server event in scripts.
How often should I restart a FiveM server?
Many servers restart every 6–12 hours at fixed times with txAdmin, saving player data in the restart events.
How do I back up a FiveM server?
Dump the database daily with mariadb-dump --single-transaction, archive server-data and txData, and copy everything off the machine.
What is increase_pool_size?
A startup command that raises a game pool such as TxdStore, within limits set by Cfx.re, for servers that stream very many assets.
How do I add cars, maps or clothes?
Put them in a resource’s stream folder with the right fxmanifest entries and ensure the resource. Keep textures small to avoid oversized-asset warnings.
Which framework should I choose?
Qbox and ESX with the ox stack are common modern choices; QBCore has a large legacy script market. Pick one before buying scripts.
Where do I get help?
The official docs at docs.fivem.net, the Cfx.re forum, your framework’s documentation and Discord, and the detailed guides linked in every chapter above.
How do I change the minimap on my server?
Stream a minimap resource that replaces the minimap textures, and make sure no other resource streams the same files.
Reference

Official references

Primary sources this handbook is checked against. When in doubt, they win.

Official Cfx.re documentation

Downloads and accounts

Frameworks and libraries

Community