Wiki
Server Setup

Running a FiveM cluster

9 min readUpdated 2026-04-19

FiveM clusters require more orchestration than single-game servers. This guide covers txAdmin setup, database configuration, resource organization, and scaling beyond 64 players.

txAdmin architecture

Run txAdmin in a dedicated process separate from your main server.

  • Set txAdminPort to a fixed value so you can bookmark the web panel
  • Enable the built-in Discord bot for real-time alerts
  • Configure scheduled restarts during low-population hours
  • Use txAdmin's player database to track bans across server wipes

Database setup

FiveM servers rely heavily on MySQL/MariaDB. We provide one-click MySQL from the panel.

  • Create the database before starting the server for the first time
  • Use oxmysql or ghmattimysql as your connector resource
  • Store connection strings in environment variables, never hardcode them in Lua files
  • Enable daily automated backups from the panel

OneSync and player slots

  • OneSync Legacy — Up to 64 slots. Stable but limited.
  • OneSync Infinity — 128+ slots with improved sync. Required for large communities.

Switch to Infinity once you exceed 64 slots. Monitor sv_mainThread and sv_syncThread in the F8 profiler.

Resource organization

Recommended folder structure:

  • [core] — Essential resources: oxmysql, ox_lib, es_extended or QBCore
  • [jobs] — Job scripts: police, ambulance, mechanic, etc.
  • [vehicles] — Car packs and handling mods
  • [maps] — MLOs and map resources
  • [ui] — HUD, inventory, phone, menus

Prefix folders with [ ] so they sort to the top. Use ensure statements in server.cfg grouped by folder.

Security hardening

  • Use sv_licenseKey validation — leaked keys are a common attack vector
  • Restrict txAdmin to your staff IP range via the panel firewall
  • Never expose MySQL port 3306 to the public internet