Your server.cfg is the control panel for your FiveM server, and a few settings in it have a real impact on performance and player experience. This guide covers the ones that actually matter โ without drowning you in every possible line.
What server.cfg is
server.cfg is the configuration file your FiveM server reads on startup. It controls which resources load (ensure lines), server identity (name, tags), player slots, OneSync, and various tuning options. Editing it is a normal part of running a server โ just always keep a backup before big changes.
OneSync: the big one
OneSync is FiveM's system for syncing game state beyond GTA V's native 32-player limit. For any modern roleplay server, it needs to be on.
set onesync onOneSync moves more authority to the server, which is good for both higher player counts and anti-cheat (the server, not the client, becomes the source of truth). If you're running more than 32 players, or want proper server-authoritative behavior, OneSync is non-negotiable.
Player slots: be realistic
sv_maxclients 64Set this to what you actually need, not an aspirational number. Setting it far higher than your real population doesn't help and can affect how resources allocate. If you peak at 40 players, 48 or 64 is sensible; 128 is wasteful.
Population density
Ambient NPCs and traffic are a genuine, ongoing performance cost. FiveM lets you tune population density, and if your server doesn't need a packed city, dialing it down frees real performance:
These settings (through native controls or a population management resource) let you reduce how many NPC pedestrians and vehicles the game spawns. Lower density means less to sync and render โ a meaningful win on busy servers.
Resource load order
The order of your ensure lines matters. Dependencies must load first:
oxmysql(database) โ very earlyox_libโ before anything that needs it- Your framework (
qb-coreores_extended) - Inventory, target, and other core systems
- Everything else
Load-order mistakes cause a lot of "why won't my server start" problems โ a script that depends on the framework loading before the framework will error out.
Steam and authentication keys
Make sure your sv_licenseKey is set (from the Cfx.re keymaster), and configure any Steam API key you need. A missing or invalid license key stops your server from starting at all.
Endpoints and networking
Your endpoint settings define how players connect. If you're behind certain hosting setups, incorrect endpoint or port configuration causes connection failures. Most hosts set this up for you, but it's worth knowing it lives here if connections misbehave.
What NOT to obsess over
Server owners sometimes chase exotic config tweaks hoping for magic performance. The truth: your scripts and hosting matter far more than obscure server.cfg lines. Get OneSync right, keep population sensible, order resources correctly, and then focus your energy on auditing scripts in resmon and running quality resources โ that's where the real gains are.
A sensible baseline
For most roleplay servers: OneSync on, realistic max clients, population density tuned to your needs, correct load order, valid keys. That covers the config side. Everything beyond that is fine-tuning.
Once your config is solid, the biggest remaining performance lever is what you install. At Viper Development, our scripts are built to be light and clean, so they slot into a well-configured server without dragging it down. Browse our FiveM scripts โ