How to configure Onesync and keep your server updated
FiveM OneSync, Updates, and Backups
This guide covers scaling your FiveM server past 32 players with OneSync, keeping FXServer updated, and backing up your data. It is the operational handbook once your server is live. Complete the earlier guides first: Setup, Configuration, Running as a Service, and Database and Frameworks.
OneSync and Player Counts
FiveM's default networking maxes at 32 players. To go higher, enable OneSync.
Up to 64 Players
set onesync on sv_maxClients 64
Up to 1024 Players (OneSync Infinity)
For more than 64 players, you need OneSync Infinity. It is free, but requires your license to be tied to a Cfx.re Element Club Argentum tier or above:
set onesync_enableInfinity 1 set onesync_enableBeyond 1 sv_maxClients 128
The tier requirement is set by CFX.re. Check your keymaster account page (keymaster.fivem.net) for your current tier and how to upgrade.
Performance Reality Check
OneSync raises the player ceiling, but FiveM remains single-thread bound. A high player count on a low-clock CPU will lag regardless of OneSync settings. If you experience lag spikes with 60+ players:
- Confirm
set onesync on(or Infinity) is actually inserver.cfg - Check your CPU's single-thread performance; 4.0+ GHz is strongly recommended for high counts
- Profile heavy resources (a single badly written script can tank a whole server)
Keeping FXServer Updated
CFX.re publishes new artifacts frequently. Updating is a manual process because the binary lives outside your data folder.
Update Procedure
- Stop your FiveM service: ``
powershell Stop-Service FXServer`` (Or stop it from txAdmin.) - Download the new artifact build from
runtime.fivem.net/artifacts/fivem/build_server_windows/master/. - Back up your current
C:\FXServer\folder first if you want a rollback option. - Extract the new
server.7zoverC:\FXServer\. - Start the service again: ``
powershell Start-Service FXServer``
Your data folder (C:\FXServer-data) is not touched by artifact updates. That separation is intentional and is why you can update the binary freely without risking your config, resources, or world.
Which Build to Choose
- Recommended builds are stable and tested. Use these for production.
- Latest builds are newer but less proven.
- Optional/bleeding-edge builds are for testing only. Do not run these on a live server.
Frameworks and resources sometimes lag behind the newest artifact. If you update and a resource breaks, roll back to the previous artifact (this is why you backed up C:\FXServer\).
Backups
Back up C:\FXServer-data and your database regularly. The most important things:
server.cfg(your config)resources/(all installed resources, especially anything you have customized)- MariaDB database dumps (player data, characters, money, inventories all live here)
Automated Nightly Backup Script
Create a PowerShell script and schedule it via Windows Task Scheduler to run nightly:
$date = Get-Date -Format "yyyy-MM-dd" Compress-Archive -Path "C:\FXServer-data" -DestinationPath "D:\backups\fivem-$date.zip" & "C:\Program Files\MariaDB 10.11\bin\mysqldump.exe" -u root -pYOUR_PW fivem > "D:\backups\fivem-db-$date.sql"
(Adjust the MariaDB path to match your installed version.)
What to Back Up and How Often
| Data | Frequency | Method |
|---|---|---|
| Database (player data) | Nightly | mysqldump |
| server.cfg and resources | Nightly or on change | Compress-Archive |
| Full FXServer-data folder | Weekly | Compress-Archive |
| Off-machine copy | Weekly | Copy backups to another drive or cloud |
The database is the most important thing to back up. If it is lost, every player loses their character, money, and progress. A nightly mysqldump is non-negotiable for a roleplay server.
Rotating Old Backups
Add a cleanup step to your script to delete backups older than, say, 14 days:
Get-ChildItem "D:\backups" -Filter "fivem-*.zip" |
Where-Object { $_.LastWriteTime -lt (Get-Date).AddDays(-14) } |
Remove-ItemTroubleshooting
- "Could not connect to server": Firewall ports closed. See Configuration firewall section.
- "Couldn't load resource X": Check the console for the actual error, usually a missing dependency or a syntax error in the resource's
fxmanifest.lua. - License key error: The key is tied to the IP it was generated for. If you moved IPs, regenerate the key on keymaster.
- Lag spikes with 60+ players: OneSync is off, or single-thread CPU performance is the bottleneck. Confirm OneSync is on and check CPU clock speed.
- Server crashes after an artifact update: A resource is incompatible with the new build. Roll back to the previous artifact from your backup.
- Database connection lost after MariaDB update: The connection string or user permissions may have reset. Verify both.
Getting Help
- The official Cfx.re docs at
docs.fivem.netare excellent and frequently updated - ESX Legacy docs at
docs.esx-framework.org - QBCore docs at
docs.qbcore.org - Cfx.re forums at
forum.cfx.refor community resources and troubleshooting
For help from us specifically, open a ticket. We can assist with firewall, networking, and Windows-side issues even though FXServer itself is community-managed.
What to Read Next
- Setup and Configuration to revisit the basics
- Database and Frameworks for the database your backups protect
- Running as a Service for the service management your restarts depend on