Le guide complet de l'hébergement de serveur FiveM
Par Benjamin D. · PDG
· Mis à jour le August 2, 2026 · Lecture 7 min
Contents
FiveM server hosting is the foundation of any serious GTA V roleplay or racing community, and getting it right means the difference between a smooth 64-slot server and a laggy mess. This tutorial walks through setup, configuration, resource management and performance tuning so your server stays stable, secure and ready for players in 2026.
What FiveM server hosting really requires
FiveM runs on the CFX server framework, a modified GTA V multiplayer backend that loads community resources (scripts, maps, frameworks) on top of the base game. Unlike a vanilla Minecraft server, FiveM is CPU-hungry: each connected player, each running script and each vehicle in the world adds load to a single-threaded main loop. That is why raw clock speed matters far more than core count.
Hardware priorities
- High-frequency CPU — FiveM leans heavily on single-thread performance. A Ryzen with high clocks handles more players and heavier frameworks than a low-frequency server-grade chip.
- NVMe SSD storage — resource loading, streamed assets and MySQL queries all benefit from fast disk I/O. Classic HDD or SATA SSD storage creates stutters on join and during heavy asset streaming.
- RAM — a light server runs fine on 4 GB, but ESX/QBcore builds with many scripts, MySQL and a mapped city easily need 8 GB or more.
- Anti-DDoS — public FiveM servers are frequent targets. Volumetric protection at the infrastructure level should be included, not an afterthought.
On Serveur FiveM hosting from Fly-Serv, you get Ryzen CPUs, NVMe storage and anti-DDoS included by default, which covers the three biggest bottlenecks before you even touch a config file.
Setting up your FiveM server step by step
Whether you deploy through a game panel or self-host on a VPS, the logical steps are the same. Here is the practical order.
1. Deploy the server
With a managed panel, installation is instant: pick FiveM, choose your slots and location for low latency, and the CFX server is provisioned automatically. If you prefer full control, a VPS Linux lets you build the environment yourself.
On a fresh Debian/Ubuntu VPS, prepare the base:
sudo apt update && sudo apt upgrade -y
sudo apt install -y git xz-utils curl unzip
# Create a dedicated user (never run FiveM as root)
sudo adduser fivem
sudo su - fivem
# Fetch the latest recommended FXServer artifact
mkdir -p ~/fxserver && cd ~/fxserver
wget https://runtime.fivem.net/artifacts/fivem/build_proot_linux/master/LATEST/fx.tar.xz
tar xf fx.tar.xz
2. Get your license key
Every FiveM server needs a free key generated on the CFX keymaster portal. You bind it to your server IP or leave it flexible for a managed host. Keep this key private — it is tied to your account.
3. Prepare the server data
cd ~
git clone https://github.com/citizenfx/cfx-server-data.git server-data
cd server-data
The server-data folder holds your resources/ directory and the main server.cfg. This is where every script, framework and map lives.
4. Write server.cfg
The config file controls slots, endpoints, resources and permissions. A minimal working example:
# Network endpoints
endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"
# Core resources
ensure mapmanager
ensure chat
ensure spawnmanager
ensure sessionmanager
ensure fivem
ensure hardcap
# Server identity
sv_hostname "My Roleplay Server | Powered by Fly-Serv"
sv_maxclients 48
sets locale "en-US"
# Steam / OneSync
set onesync on
set sv_enforceGameBuild 3095
# License key (keep private)
sv_licenseKey "YOUR_KEY_HERE"
# RCON — use a long, random password
rcon_password "CHANGE_ME_TO_A_STRONG_SECRET"
# Admin principals
add_ace group.admin command allow
add_principal identifier.fivem:1 group.admin
5. Launch the server
cd ~/server-data
bash ~/fxserver/run.sh +exec server.cfg
To keep it alive after you disconnect, run it under a service manager. A simple systemd unit:
# /etc/systemd/system/fivem.service
[Unit]
Description=FiveM Server
After=network.target
[Service]
Type=simple
User=fivem
WorkingDirectory=/home/fivem/server-data
ExecStart=/bin/bash /home/fivem/fxserver/run.sh +exec server.cfg
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable --now fivem
sudo systemctl status fivem
Frameworks, resources and database management
Vanilla FiveM is just a sandbox. The gameplay comes from a framework and its ecosystem of resources.
Choosing a framework
| Framework | Best for | Notes |
|---|---|---|
| ESX | Classic roleplay | Huge script library, well documented, beginner friendly. |
| QBcore | Modern roleplay | Modular, active community, more built-in features. |
| Standalone | Racing / minigame / freeroam | Lightweight, no database dependency for many scripts. |
Setting up the database
Most roleplay frameworks require MySQL/MariaDB and the oxmysql resource. On a VPS:
sudo apt install -y mariadb-server
sudo mysql_secure_installation
# Create the database and a dedicated user
sudo mysql -u root -p
CREATE DATABASE fivem;
CREATE USER 'fivemuser'@'localhost' IDENTIFIED BY 'a_strong_password';
GRANT ALL PRIVILEGES ON fivem.* TO 'fivemuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Then declare the connection string in server.cfg:
set mysql_connection_string "mysql://fivemuser:a_strong_password@localhost/fivem?charset=utf8mb4"
ensure oxmysql
Adding resources cleanly
- Drop each resource into
resources/[category]/resource-name. - Add
ensure resource-nametoserver.cfgin the correct load order (framework first, dependencies next, scripts last). - Never blindly install obfuscated or leaked scripts — they are the most common source of backdoors and performance drains.
With a managed panel, uploading resources, editing server.cfg and restarting is done from the file manager and live console — no SSH required. This makes iteration much faster when you are testing new scripts.
Performance, security and backups
A FiveM server that runs at 10 players might collapse at 40 if resources are not optimized. Monitoring and hygiene keep it stable.
Monitoring server tick rate
Use the built-in resmon command (F8 console in-game, admin only) to see which resources consume CPU per tick. Anything consistently above 1–2 ms per tick on the server thread deserves attention. Common culprits are poorly written loops, excessive database queries and heavy map streaming.
# In the F8 client console
resmon
# Or profile a specific frame from the server console
profiler record 500
profiler save myprofile.json
OneSync and slots
OneSync unlocks higher player counts (48, 64 and beyond) and server-side entity control, but it also increases the load per player. Scale your slots to your hardware — pushing 64 slots on an underpowered instance produces rubber-banding and desync. Choosing a host with high-frequency Ryzen CPUs and low-latency locations directly improves how many players you can realistically hold.
Security checklist
- Use a long random
rcon_password, or disable RCON entirely if unused. - Restrict admin via
add_principalto real identifiers, never to everyone. - Audit every third-party script before deploying it.
- Keep your artifact version and framework updated.
- Volumetric anti-DDoS is handled at the infrastructure level by Fly-Serv, so you focus on application-level hardening.
If you self-host on a VPS, add standard system hardening:
# SSH key auth instead of passwords
ssh-keygen -t ed25519 -C "admin@myserver"
# Basic firewall
sudo apt install -y ufw fail2ban
sudo ufw allow 22/tcp
sudo ufw allow 30120/tcp
sudo ufw allow 30120/udp
sudo ufw enable
sudo systemctl enable --now fail2ban
Backups that actually save you
Two things must be backed up: the server-data directory (resources and config) and the MySQL database. A managed host with automatic backups handles this for you. On a VPS, script it:
#!/bin/bash
DATE=$(date +%F_%H-%M)
mkdir -p /home/fivem/backups
# Database
mysqldump -u fivemuser -p'a_strong_password' fivem > /home/fivem/backups/db_$DATE.sql
# Server data
tar czf /home/fivem/backups/data_$DATE.tar.gz /home/fivem/server-data
# Keep only last 7 days
find /home/fivem/backups -type f -mtime +7 -delete
Schedule it with cron so a broken update or a bad script never wipes weeks of progress:
crontab -e
# Daily at 4 AM
0 4 * * * /home/fivem/backup.sh
For those who want the freedom of self-hosting without the raw Linux administration, a VPS Pterodactyl gives you a panel-managed environment. You can review official CFX behavior and artifact notes on the Source documentation before major upgrades.
Conclusion
Solid FiveM server hosting comes down to fast single-thread CPU, NVMe storage, clean resource management and disciplined backups. Start minimal, add scripts one at a time, watch your tick times with resmon, and keep RCON and admin access locked down. Do that and your server stays stable whether you run a small freeroam or a full 64-slot roleplay city.
FAQ
How much RAM and CPU do I need for a 48-slot FiveM roleplay server?A busy ESX or QBcore server with 48 slots typically wants at least 8 GB of RAM and a high-frequency CPU, because FiveM relies on single-thread performance. Clock speed and NVMe storage matter more than core count. If you run heavy maps and many scripts, plan for more RAM and profile with resmon to catch resource-heavy scripts early.
Why does my FiveM server lag even with few players?Low player counts with lag usually point to a badly optimized resource, not hardware. Open the F8 console, run resmon and look for scripts consuming several milliseconds per tick or spamming database queries. Remove or replace the worst offenders, keep your artifact updated, and make sure storage is NVMe so asset streaming and MySQL queries stay fast.
Do I need a VPS or a managed panel for FiveM hosting?A managed game panel gives instant installation, live console, file manager and automatic backups without touching Linux — ideal for most communities. A VPS Linux or VPS Pterodactyl suits admins who want full control over the OS, custom firewall rules and multiple services. Both work; choose based on how much system administration you want to handle yourself.