How a FiveM server works
A FiveM server is FXServer — the Cfx.re server program — running a folder of resources and a server.cfg. Knowing which part does what makes every later chapter easier.
| Part | What it is | Where it lives |
|---|---|---|
| Artifacts | The FXServer build itself, published by Cfx.re | C:\FXServer\server or ~/FXServer/server |
| Server data | Your resources, server.cfg and cache | server-data/ (with txAdmin: the folder you choose) |
| Resources | Folders with an fxmanifest.lua: scripts, maps, vehicles, UI | server-data/resources/ |
| server.cfg | Startup commands: endpoints, name, slots, resources, permissions | server-data/server.cfg |
| txAdmin | Web panel bundled with the artifacts | Port 40120, data in txData/ |
| Server key | Links the server to your Cfx.re account | sv_licenseKey in server.cfg |
| Database | Where frameworks store players, money and items | MariaDB/MySQL through oxmysql |
Players connect to your IP on port 30120. The server tells each client which resources to download — scripts, streamed models and textures, UI files — then runs server scripts on the server and client scripts on every player’s PC. The server also sends a heartbeat to the Cfx.re server list, which is how players find you.
Scripts come in halves. Server scripts are authoritative: they can read the database, secrets and every player. Client scripts run on each player’s PC: they draw the world, read input and show UI. Anything that runs on a player’s PC can be modified, so money, items and permissions are always decided on the server — see security hardening.