Halloween Edition36 maps, limited runlimited runShop the drop
Volume 1 · Free handbook

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

  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.
17 chapters

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.

Chapter 01How a FiveM server worksA FiveM server is FXServer running a folder of resources and a server.cfg. What each part does, where the files live, and which build to run.Chapter 02Hardware and hostingFXServer does most of its work on one core, so single-core speed beats core count. How to pick a CPU, memory, disk and a host around that fact.Chapter 03Installing FXServer and txAdminTwo ways to install a FiveM server: the txAdmin route that sets everything up in a browser, and the vanilla route with cfx-server-data and your own cfg.Chapter 04server.cfg, line by lineserver.cfg is a list of console commands run at startup. Endpoints and convars first, resources in dependency order, secrets in a separate file.Chapter 05Ports, firewall and connectingPlayers connect on 30120 TCP and UDP; txAdmin listens on 40120. The firewall rules, the two convars behind a missing server listing, and how to test.Chapter 06Resources, fxmanifest.lua and start orderEvery feature on a FiveM server is a resource with an fxmanifest.lua. Folder layout, ensure versus start, and a start order that survives a restart.Chapter 07Database: MariaDB and oxmysqlFrameworks keep players, money and vehicles in MariaDB through oxmysql. Installing it, the connection string, and backing up the one file that matters.Chapter 08Frameworks and the core stackA framework gives every script the same idea of a character, a job and an inventory. What each one assumes, and why you choose before you buy scripts.Chapter 09OneSync, player slots and game buildsOneSync makes the server aware of every entity: what it unlocks, how it changes slot counts, and the game build convar that decides what content exists.Chapter 10Streaming maps, MLOs, vehicles and clothingAnything that adds game content is streamed from a resource stream/ folder. How the client gets it, what the manifest declares, and where it goes wrong.Chapter 11Performance: server lag, FPS and texture lossMeasure before you change anything: server lag, client FPS drops and texture loss are three different problems, with three different tools to find them.Chapter 12Security hardeningFiveM security is two things: server convars that shut whole classes of abuse, and scripts that never trust the client. Here are both, with the values.Chapter 13Admins, ACE permissions and moderationTwo permission systems run side by side: txAdmin for the panel and in-game menu, ACE for commands and scripts. How to set both without giving away root.Chapter 14Restarts, backups and updatesStable servers are boring on purpose: fixed restart times, automatic backups, a test server for updates and a rollback plan written before you need it.Chapter 15Map, minimap and world settingsThe map is what players look at most. Minimap, blips, weather, time, traffic density, wanted level and interiors are all yours to configure.Chapter 16Troubleshooting common problemsMost FiveM server problems follow a handful of patterns. Find the symptom here, check the likely cause, then open the guide that goes into detail.Chapter 17The launch checklistGo through this list before you advertise anywhere. Every item on it is something a real server discovered the hard way, on the day it opened.
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