Back to blog
16 min read

FiveM Server Setup A-Z: ESX, QBCore, Custom Scripts Guide

How to set up a FiveM server. ESX vs QBCore comparison, custom script development, performance tuning — comprehensive guide for roleplay server owners.

fivemesxqbcoreroleplaygame server

Setting up a FiveM server sounds like a single-click job, but for a serious roleplay community proper setup takes weeks, not hours. This guide covers everything you need — picking hardware, the ESX vs QBCore comparison, custom script development, anti-cheat tuning. Applies whether you're aiming at a 50-player niche RP or a 200+ player public server.

What is FiveM and why is it so popular?

FiveM is the multiplayer modification for GTA V. Independent of official GTA Online — you run your own server, with your own rules. Used for roleplay (RP), drift, freeroam and many game modes. RP servers in particular have massive Turkish and European communities; a well-built server can sustain thousands of active players.

Prerequisites: what you need

  • Server (VPS/VDS): CPU matters — FiveM leans on a single thread. High single-thread performance (Ryzen 5/7, Xeon E5). Minimum 4 vCPU + 8 GB RAM for 50 players; 6-8 vCPU + 16 GB RAM for 100+.
  • Location: close to your players. TR for Turkish base, DE/NL for European. Ping is critical.
  • cfx.re account: for the server license key.
  • An initial player base: empty servers don't pull players; full ones pull more. A handful of test players on Discord + social media on day one is critical.

If you'd rather not deal with the server side, our FiveM-optimized VPS packages get you running in hours with free tech support.

Framework choice: ESX vs QBCore

For a roleplay server, you don't start from zero — you use a framework that gives you players, economy, jobs, vehicles out of the box. Your job is to layer custom scripts on top.

ESX (Extended Roleplay Framework)

The veteran. Years of community development, a huge free script ecosystem. Downsides: aging codebase; even ESX Legacy isn't as clean as native QBCore.

QBCore (Quasar Base Core)

The modern alternative. Cleaner codebase, more active development, modular. The majority of new RP servers run QBCore. Easier to extend with custom scripts than ESX.

Which to pick?

  • New server: QBCore. More future-proof.
  • Existing ESX server: Migration is worth it; players feel the difference. We've done zero-loss migrations (testimonial #4).
  • Hybrid: Many popular ESX scripts can be ported to QBCore.

Base setup steps

  1. Install the FiveM server software: pull cfx-server-data and binaries.
  2. Install MySQL/MariaDB: for player data. mariadb-server + phpmyadmin is the standard.
  3. Install txAdmin: the management panel. Restart, ban, log review via web UI.
  4. Install the framework: latest stable ESX or QBCore in resources/.
  5. Add base scripts: jobs, inventory, vehicles, banking, phone, garage, housing.
  6. Customize HUD and menus: default HUD is everywhere; if you want a brand, custom UI is required.
  7. Enter your cfx.re key and list the server: players find it via the server browser.

Custom script development

Stock scripts only take you so far. What makes your community different: unique job systems, mafia hierarchy, economic balance, entertainment systems (betting, racing, events). Written in Lua + JavaScript.

Four things to watch:

  • Performance: a bad script freezes the whole server. Server thread is single; client thread per-player. Heavy loops are forbidden.
  • Anti-exploit: never trust client data. Server-side validation is mandatory.
  • Database I/O: writing to DB on every player action — disaster. Use batching + caching.
  • Logging: every important action (money transfer, item use, death) must be logged. Essential for resolving disputes.

For custom scripts or a full custom build, see our FiveM development service.

Anti-cheat and moderation

FiveM is a cheat-heavy ecosystem. The bigger you grow, the more cheaters you'll see. Three-layer approach:

  • Built-in FiveM AC: CitizenFX's own. Must be enabled.
  • Community anti-cheats: wasabi_antic, txAdmin AC, ELS protection.
  • Server-side validation: verify every client action makes sense server-side. 10 actions in one second — not legitimate.

Anti-cheat without an active moderation team isn't enough. Clean ban process + responsive staff or players leave.

Performance optimization

Beyond 60 players you start seeing FPS drops. Three areas to check:

1. Resource performance

Use resmon to inspect per-resource CPU. Anything over 1.0 ms on its own is a problem.

2. Database queries

Enable the slow query log. Anything over 100 ms needs optimization (index, cache, batching).

3. Network optimization

onesync on. Tune streaming distance and vehicle sync.

Typical cost ranges

  • Server (VPS): $25-$100/month (by spec)
  • Base setup (ESX/QBCore + core scripts): $500-$1.5k one-off
  • Custom job/script (each): $100-$600
  • Full custom server (HUD + UI + systems): $2k-$8k
  • Monthly maintenance: $100-$400

Wrap-up

A great FiveM server isn't just technical setup — it's community management, content production and continuous improvement combined. Healthiest combo we see: we handle the technical, you focus on community + content.

For RP server setup, custom scripts, or a full custom build, send us a note and we'll scope it.

Have a project in this area?

Tell us about it, we'll clarify the scope. We respond the same day.

Tell us about your project