Tutorial
How to Set Up a FiveM Roleplay Server: Complete Beginner's Guide
ThaC

Setting up a FiveM roleplay server for the first time is one of those things that looks simple until you're three hours deep, staring at a console error with no idea what went wrong. This guide cuts through the noise. Whether you're building a serious RP community or just want a private server to play with friends, here's exactly what you need to do — and what to avoid.
What Is FiveM and How Does It Work?
FiveM is a modification framework for GTA V that lets you run custom multiplayer servers with their own rules, scripts, and economy. It sits on top of the base game and uses a resource system to load custom Lua, JavaScript, and HTML code on both the server and client side.
When a player connects to your server, FiveM downloads your resources to their client and runs them alongside the game. Everything you add — jobs, vehicles, HUDs, UI menus — is delivered this way. The server itself runs on a dedicated machine or VPS and communicates with connected clients in real time.
Understanding this basic architecture matters because it explains why script performance, server hardware, and resource management all directly affect the player experience.
Step 1: Choose Your Hosting
Before you install anything, you need somewhere to run the server. You have three options.
Self-hosting means running the server on your own machine or a dedicated PC at home. It's free, but your internet upload speed becomes the bottleneck, and the machine needs to stay on as long as the server is running. Fine for testing, not ideal for a public server.
VPS hosting is the most common choice for serious servers. You rent a virtual private server from a provider, get root access, and install FiveM yourself. Look for at minimum 4GB RAM, 4 CPU cores, and a location close to your player base.
FiveM game server hosting — some providers offer pre-configured FiveM hosting with one-click installs and a control panel. It costs more than a raw VPS but saves setup time. Good for beginners who want to skip the Linux terminal entirely.
For a serious RP server with 32+ concurrent players, a dedicated VPS with at least 8GB RAM is recommended. FiveM's server process is single-threaded, so clock speed matters more than core count.
Step 2: Install the FiveM Server Artifact
Once you have your hosting ready, download the FiveM server artifact from the official Cfx.re builds page. The artifact is the core server executable — everything else runs on top of it.
On a Linux VPS, the basic process looks like this: create a server directory, download and extract the artifact, then create your server.cfg configuration file. On Windows hosting, the process is similar but uses the Windows executable instead.
Your server.cfg is where you set your server name, maximum player count, your license key from the Cfx.re keymaster, and the list of resources to load. Every script you add later gets an ensure line in this file.
Get a license key from keymaster.fivem.net before starting — the server won't run without one, and it's free to obtain.
Step 3: Pick Your Framework — ESX or QBCore
This is the most important decision you'll make, and it affects every script you buy or install going forward. A framework is the backbone of your server — it handles player data, jobs, inventory, economy, and the events that scripts use to communicate with each other.
QBCore is where the FiveM ecosystem is actively moving. It has a cleaner, more modern codebase, better native inventory handling, and the majority of new script development in 2025 is QBCore-first. If you're starting a server from scratch today, QBCore is the recommended choice — you'll spend less time fighting outdated patterns and more time actually building.
ESX Legacy is the older framework and still has a larger total script catalog due to its longer history. If you have a specific commercial script you absolutely need that only supports ESX, that's a valid reason to stay on it. But for a brand new server with no legacy constraints, ESX offers no meaningful advantage over QBCore today.
The practical advice: start with QBCore. The documentation is solid, the community is active, and most new commercial scripts — including the Codem catalog — support it natively. And whatever you pick, commit to it fully. Almost every compatibility problem beginners run into comes from mixing scripts built for different frameworks.
Step 4: Install Your Framework and Database
Both ESX and QBCore require a MySQL database to store player data — characters, money, inventory, jobs, and everything else that needs to persist between sessions.
Install oxmysql as your database connector — it's the current standard and what most modern scripts expect. Set up a MySQL database on your server, add the connection string to your server.cfg, and import the framework's SQL file to create the necessary tables.
This is the step where most beginners hit their first major error. If your console shows database connection errors on startup, double-check your connection string format and make sure MySQL is actually running on the correct port.
Step 5: Add Your Essential Scripts
With your framework running, you're ready to start adding scripts. Don't add everything at once — install one resource at a time, test it, confirm it works, then move to the next. Debugging ten new scripts simultaneously is a nightmare.
Here's the order that makes sense for most servers:
Spawn and character creation — players need to be able to log in and create a character before anything else works. Most frameworks include a basic spawn script, but a dedicated character creation resource gives a much better first impression. You can use the CodeM's Venice Multichar & Spawn resource for better impression.
HUD — the player interface for health, hunger, money, and status. This goes in early because almost everything else depends on players being able to see their status at a glance. Check a complete all in one HUD that covers multiple scripts in to one singular resource. Take a look at CodeM's Supreme HUD AIO.
Inventory — ox_inventory is the current community standard and works with both frameworks. Set this up before any job or economy scripts. If you want advanced inventory you can use CodeM's mInventory Remake resource but if this your first rodeo on FiveM i recommend to ox_inventory at first.
Chat — FiveM includes a basic chat, but a custom chat script gives you proper RP commands, formatting, and moderation tools from day one. mChat is built specifically for RP servers with proximity chat, OOC channels, and full command customization out of the box.
Notifications — your scripts will fire notifications constantly. A clean notification system that matches your server's visual style makes the whole experience feel more polished. You can use CodeM's mNotification but again if this your first time stick with the default notification comes with your framework
Economy basics — banking, billing, and payment scripts tie into almost every job and business script. Getting these right early saves refactoring later.CodeM's mBilling V2 handles invoicing, business transactions, and payment history with a clean UI that works natively with ESX,QBCore and QBox.
Step 6: Set Up Jobs and Economy
Once your core scripts are stable, jobs are what actually give players something to do. Start with one or two legal jobs — most servers begin with a trucking or delivery job and a basic civilian job — before adding police, EMS, or complex business jobs. If you want arcade and simple yet effective job resources you can check CodeM's Jobs however if you want detailed prop and MLO base jobs you can check Tworst's Jobs. Both option can make your jobs in the server unique and keeps the players in your server.
For police and emergency services, an MDT (Mobile Data Terminal) is essential. It gives officers access to player records, warrants, incidents, and dispatch information — all the tools a serious police RP department needs. A good MDT script transforms police RP from chaotic to structured. CodeM's BLVCK MDT is built for this, with different feature sets depending on how detailed your police RP needs to be.
Don't overload your server with jobs in the first week. Ten shallow job scripts is worse than two deep, well-configured ones.
Step 7: Configure Permissions and Admin Tools
You need a way to manage your server without jumping into the console every time. Install a framework-compatible admin menu that lets you teleport, manage players, give items, and ban troublemakers from in-game.
Set up permission groups in your framework — at minimum, a superadmin group for yourself, a moderator group for staff, and a default group for regular players. Every admin action script will use these groups to determine who can do what.
Also configure your server's whitelist setting early if you're planning an allowlist server. It's much easier to set up access controls before players arrive than to retrofit them later.
You can use txAdmin which is native admin control for FiveM platform but if you want something more effective check out CodeM's mAdmin Panel.
Step 8: Test Everything Before Going Public
Before you open your server to players, spend at least a full session testing every core system yourself — log in, create a character, check that your HUD displays correctly, test job menus, make a purchase, send an invoice, and trigger a notification. Check your resmon (F8 → resmon) and make sure no single resource is sitting above 0.10ms at idle.
Common things to test that people forget: what happens when a player dies, whether the respawn system works, and whether disconnecting mid-action causes any database errors.
Common Beginner Mistakes
Adding too many scripts too fast. Every resource you add is a potential conflict. Build slowly, test constantly.
Ignoring the resmon. Performance problems are invisible until your server has thirty players online and everyone's FPS drops. Check your resource monitor regularly during testing.
Mixing framework versions. If you're on ESX Legacy, every script should be built for ESX Legacy. Running scripts built for ESX 1.2 or older will cause subtle bugs that are very hard to trace.
Skipping database backups. Set up automated daily backups of your MySQL database from day one. Player data loss is the fastest way to kill a community's trust.
Not reading script documentation. Most installation errors are solved in the first paragraph of the README. Read it before asking for support.
What to Expect in Your First Month
Realistically, getting a server to a stable, playable state takes two to four weeks of focused work if you're new to FiveM development. The first week is infrastructure — hosting, framework, core scripts. The second week is jobs and economy. The third week is polish, testing, and fixing the things that broke during testing.
Don't rush opening day. A server that opens early with broken systems loses players permanently. Players who leave disappointed rarely come back.
If you're building on ESX and QBCore and want a strong foundation of scripts that are actively maintained and built to work together, the CodeM's script catalog covers most of what you need — from HUD and chat to billing, MDT, and beyond.
FAQ
Do I need to know how to code to run a FiveM server? Not to get started. Most commercial scripts are install-and-configure. But basic Lua knowledge helps enormously when things break — and things will break. Even understanding how to read an error message speeds up troubleshooting dramatically.
How much does it cost to run a FiveM server? A basic VPS starts around $10–20/month. Scripts vary widely — free community scripts exist for almost everything, but commercial scripts typically offer better support and more reliable updates. Budget $50–150 for an initial script setup if you're buying essentials.
Can I run a FiveM server on my gaming PC? Yes, for testing and private play. For a public server with consistent uptime, a VPS is a better choice — your home internet upload speed and machine reliability become limiting factors quickly.
What's the difference between ESX and ESX Legacy? ESX Legacy is the current, actively maintained version of the ESX framework. The original ESX versions (1.1, 1.2) are outdated and have known issues. Always use ESX Legacy for new servers.
How many players can a FiveM server handle? The default slot limit on a free Cfx.re license is 48 players. A paid Patreon subscription increases this to 64, 128, or unlimited depending on tier. Server hardware becomes the real constraint at higher player counts — most VPS setups comfortably handle 32–64 players.


