The Server Handbook for FiveM
setup to launch, in one place.
Everything it takes to run a FiveM server, chapter by chapter: 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 is its own page, gives you the working commands and config, and links to a detailed guide when you need more.
- 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
- Create a server key on portal.cfx.re (free).
- Download the recommended server build from the Server Download page —
server.7zon Windows,fx.tar.xzon Linux. - Extract it to
C:\FXServer\server(or~/FXServer/server) and runFXServer.exe(or./run.sh). - txAdmin opens on port 40120: enter the PIN, link your Cfx.re account and set the panel password.
- Pick a recipe (CFX Default needs no database), paste your server key and click Save & Run Server.
- Open port 30120 TCP and UDP in the firewall and set
sv_projectNameandsv_projectDesc. - Connect from the F8 console with
connect your-ip:30120; the server list can take up to 8 minutes to show you.
The chapters
Each one is its own page, with its own commands and its own checklist. Read them in order or open the one that matches the problem in front of you.
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.
| Command | What it does |
|---|---|
ensure name | Start a resource, or restart it if running |
start name / stop name | Start or stop a resource or [category] |
restart name | Restart a running resource |
refresh | Rescan the resources folder |
exec file.cfg | Run commands from a file (also @resource/file.cfg) |
quit "reason" | Stop the server with a message to players |
status | List players with ID, identifier, endpoint and ping (rconlog) |
clientkick id reason | Kick a player by server ID (rconlog) |
say message | Chat message as console (chat resource) |
add_ace / remove_ace | Add or remove a permission entry |
add_principal / remove_principal | Add or remove group inheritance |
test_ace principal object | Check whether a permission is allowed |
load_server_icon file.png | Load a 96×96 PNG server icon |
profiler record 500 / profiler view | Record and inspect server performance |
con_addChannelFilter filter action | Silence noisy console channels |
svgui | Open or close the server debug GUI |
Core convars
The settings almost every server uses.
| Convar | Example | Notes |
|---|---|---|
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_maxclients | 48 | 1–2048 |
set onesync | on | on / legacy / off |
sv_enforceGameBuild | 3258 | Startup only |
sv_licenseKey | "…" | From portal.cfx.re |
sets sv_appearAllowlisted | true | Lock icon in the server list |
sets sv_allowlistInstructions | "Apply on discord.gg/…" | Shown with the lock icon |
sv_lan | false | true = LAN only, not listed |
set steam_webApiKey | "…" | Enables Steam identifiers |
set sv_forceIndirectListing | true | Do not advertise the real IP |
sv_kvsName | default | KVP database file name; startup only |
OneSync convars
Defaults are right for most servers; change them only with a reason.
| Convar | Default | What it does |
|---|---|---|
onesync_enableInfinity | true | Large-scale entity sync; startup only |
onesync_population | true | AI peds and traffic |
onesync_forceMigration | true | Move entity ownership when the owner leaves |
onesync_distanceCulling | true | Stop syncing far-away entities |
onesync_distanceCullVehicles | false | Apply culling to vehicles too |
onesync_radiusFrequency | true | Update near entities more often |
sv_useAccurateSends | true | Send updates by relevance and distance |
Where things live
Paths you will need sooner or later.
| What | Path |
|---|---|
| Server build | C:\FXServer\server · ~/FXServer/server |
| Resources and server.cfg | server-data/ |
| Server cache (safe to delete when stopped) | server-data/cache |
| txAdmin data (admins, bans, history) | txData/ |
| txAdmin admins | txData/admins.json |
| Client cache | %localappdata%\FiveM\FiveM.app\data\cache |
| Client game build data (keep) | %localappdata%\FiveM\FiveM.app\data\game-storage |
Glossary
Every term this handbook uses, in one line each.
- ACE
- Access Control Entry — a permission rule added with
add_ace, checked withIsPlayerAceAllowed. - 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 withset,setsorsetr. - Deferrals
- The
playerConnectingAPI 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:…orfivem:…. - 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.
Questions server owners ask
How do I make a FiveM server?
Is it free to host a FiveM server?
Which ports does FiveM use?
What does txAdmin do?
Why is my server not showing in the server list?
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?
on, and above 48 you need a Cfx.re subscription.Should I use Windows or Linux?
What is the best CPU for a FiveM server?
How do I give someone admin on FiveM?
add_principal identifier.fivem:ID group.admin.What does OneSync do?
What game build should my server use?
sv_enforceGameBuild; newer builds unlock newer vehicles, weapons and map content.How do I fix lag on my FiveM server?
How do I secure a FiveM server?
How often should I restart a FiveM server?
How do I back up a FiveM server?
mariadb-dump --single-transaction, archive server-data and txData, and copy everything off the machine.What is increase_pool_size?
How do I add cars, maps or clothes?
ensure the resource. Keep textures small to avoid oversized-asset warnings.Which framework should I choose?
Where do I get help?
How do I change the minimap on my server?
Official references
Primary sources this handbook is checked against. When in doubt, they win.
Official Cfx.re documentation
- FiveM documentation — Home of the official docs
- Setting up a server — All setup routes
- Setting up with txAdmin — The recommended route
- Vanilla FXServer setup — Windows and Linux without txAdmin
- Server commands and convars — Every command and convar
- Proxy setup — Hiding the server IP
- Server issues — Server list, slots, slow startup
- Client issues — Player-side problems
- Resource manifest — fxmanifest.lua reference
- OneSync — Server-side state awareness
- State bags — Synced key/value data
- Net game events — Names for block_net_game_event
- Natives reference — Every game and Cfx.re native
Downloads and accounts
- Server download — Recommended and latest, Windows or Linux
- Artifact changelog — The build numbers behind recommended and latest
- Cfx.re Portal — Server keys and subscriptions
- cfx-server-data — Default resources
- txAdmin on GitHub — Source, issues and releases
- MariaDB downloads — Database server
Frameworks and libraries
- oxmysql — Database connector
- Overextended docs — ox_lib, ox_inventory, ox_target
- ESX documentation — ESX Legacy
- Qbox documentation — qbx_core
- QBCore documentation — qb-core
Community
- Cfx.re forum — Releases, help and announcements
The handbook series for FiveM
Four free handbooks, one per part of the job. Read them in any order.
Give your server a map players remember
36 ready-made FiveM-compatible minimaps — with or without postal codes — or brand one with your logo in the studio.