Guide complet pour héberger un serveur FiveM haute performance
Par Benjamin D. · PDG
· Mis à jour le August 4, 2026 · Lecture 7 min
Contents
Setting up a FiveM server is the first step toward building your own GTA V roleplay or freeroam community, but the process involves more than just clicking "install". This 2026 tutorial walks you through hosting, configuring, and securing your server, whether you run it on a managed game panel or a self-managed VPS. Let's get your city online.
What you need before hosting a FiveM server
A FiveM server runs the FXServer software developed by the Cfx.re team. It's a standalone build that connects to the Cfx.re backend and lets players join through the FiveM client. Before you deploy anything, you need a few prerequisites in place.
The essential requirements
- A license key from the Cfx.re Keymaster portal. It's free and tied to your server IP or a machine hash.
- A legitimate copy of GTA V owned by every player connecting.
- Solid hardware: FiveM is heavily single-thread dependent, so high-frequency CPU cores matter more than raw core count.
- Fast storage: NVMe SSD reduces resource load times and stream latency, especially with heavy mod packs.
- A stable, protected connection: roleplay servers are frequent DDoS targets, so volumetric protection is not optional.
Why CPU frequency matters so much
FiveM's main game loop is largely single-threaded. A server running on high-frequency Ryzen cores handles more entities, more scripts, and more concurrent players before you see the dreaded server thread hitch warnings. When you compare hosting options, prioritize dedicated CPU frequency over a large but slow shared vCPU allocation. This is exactly why our Serveur FiveM offers run on high-clock Ryzen with NVMe storage.
Estimating resources by player count
| Players | Typical profile | What to watch |
|---|---|---|
| 8–32 | Small freeroam / friends | CPU frequency, base resources |
| 32–64 | Growing RP community | Script optimization, RAM for MySQL |
| 64–128+ | Large RP city | Dedicated CPU threads, tuned database, streaming assets on NVMe |
Deploying a FiveM server through a managed panel
The fastest path to a live FiveM server is a managed panel like Pterodactyl. You skip the OS setup, dependency installation, and manual FXServer builds. With instant installation, your server is reachable within minutes.
Step 1 — Create and install the server
From the panel, select the FiveM egg and let the automatic installer pull the latest FXServer artifact. Once provisioned, you get a live console, a file manager, scheduled restarts, and automatic backups out of the box. Browse Tous nos serveurs de jeu if you also run other titles alongside your city.
Step 2 — Add your license key
Grab your key from the Source Keymaster and paste it into your server.cfg:
sv_licenseKey "cfxk_YOURKEYHERE_xxxxx"
Step 3 — Configure server.cfg
This file is the heart of your server. Here's a minimal, functional 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 RP City | powered by Fly-Serv"
sv_maxclients 64
sv_projectName "MyCity"
sv_projectDesc "Serious roleplay server"
# License
sv_licenseKey "cfxk_YOURKEYHERE_xxxxx"
# RCON — set a strong password or leave empty to disable
rcon_password "CHANGE_THIS_TO_A_LONG_RANDOM_STRING"
# Steam Web API (optional identifiers)
set steam_webApiKey "none"
Step 4 — Start and check the console
Hit start in the panel and watch the live console. You're looking for the line confirming the server registered with Cfx.re. If it fails, check your license key and that the port matches. Once it's up, your city appears in the FiveM server browser under the direct connect address cfx.re/join/xxxxxx.
Installing resources, scripts and frameworks
A bare FiveM server is just an empty map. The real work is building your gamemode with resources, scripts, and a framework. This is where roleplay servers differentiate themselves.
Choosing a framework
Most RP communities build on a framework that handles jobs, inventory, economy, and player data. The two most common approaches are ESX and QBCore. Both require a MySQL database, which is why RAM and database tuning matter for larger populations.
Setting up the database connection
Install the oxmysql resource and configure your connection string in server.cfg:
set mysql_connection_string "mysql://user:password@localhost/fivem?charset=utf8mb4"
ensure oxmysql
Adding a resource
Uploading resources through the panel file manager is straightforward:
- Upload the resource folder into
resources/(or a category like[custom]). - Add the SQL file to your database if the script requires tables.
- Add the start line to
server.cfg:
ensure my_custom_resource
Restart the server and check the console for load errors. Load order matters: frameworks and shared libraries must start before scripts that depend on them.
Keeping performance clean
- Use the
resmoncommand in the client console (F8) to spot resources eating CPU time. - Stream custom assets (cars, MLOs) from a dedicated
[stream]folder on NVMe storage for faster loading. - Avoid running dozens of unmaintained scripts — each one adds to your server thread load.
- Schedule automatic restarts (every 4–6 hours) to clear memory leaks common in long-running RP scripts.
Self-hosting FiveM on a VPS
If you want full control over the OS, cron jobs, and custom tooling, a VPS is the alternative to a managed panel. This suits admins comfortable with Linux administration. A VPS Linux gives you root access, while a VPS Pterodactyl lets you self-host the panel itself.
Preparing a Debian/Ubuntu VPS
sudo apt update && sudo apt upgrade -y
sudo apt install -y curl xz-utils screen git
# Create a dedicated user
sudo adduser fivem
sudo su - fivem
# Download the latest FXServer build
mkdir -p ~/server && cd ~/server
wget https://runtime.fivem.net/artifacts/fivem/build_proot_linux/master/LATEST/fx.tar.xz
tar xf fx.tar.xz
Running the server persistently
Use screen or a systemd service so the server survives disconnects. A simple systemd unit:
sudo tee /etc/systemd/system/fivem.service > /dev/null <<'EOF'
[Unit]
Description=FiveM Server
After=network.target
[Service]
User=fivem
WorkingDirectory=/home/fivem/server
ExecStart=/home/fivem/server/run.sh +exec server.cfg
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable --now fivem
Hardening your VPS
Volumetric DDoS filtering is handled at the infrastructure level, but you still need to secure the machine itself:
# SSH keys instead of passwords
ssh-keygen -t ed25519 -C "admin@mycity"
# Firewall — open only what you need
sudo apt install ufw -y
sudo ufw allow OpenSSH
sudo ufw allow 30120/tcp
sudo ufw allow 30120/udp
sudo ufw enable
# Brute-force protection
sudo apt install fail2ban -y
sudo systemctl enable --now fail2ban
Security checklist for any FiveM server
- Set a long, random
rcon_password— or disable RCON if you don't use it remotely. - Never expose your MySQL port publicly; keep it on
localhost. - Run regular backups of your database and
resources/folder. - Keep FXServer updated to the latest recommended artifact.
- Audit third-party scripts before installing — malicious resources are a real threat in the RP ecosystem.
Managed panel vs VPS: which to choose
| Criteria | Managed panel | VPS |
|---|---|---|
| Setup time | Instant install | Manual, longer |
| Technical skill | Beginner friendly | Linux knowledge required |
| Backups | Automatic | You configure them |
| DDoS protection | Included | Included at infra level |
| Control | Panel-scoped | Full root access |
Most communities start on a managed panel for speed and simplicity, then some migrate to a Fly-Serv VPS as their needs grow. Both benefit from Ryzen CPUs, NVMe storage, and built-in anti-DDoS.
Conclusion
Hosting a FiveM server comes down to three things: high-frequency CPU, clean resource management, and solid security. Whether you deploy through a managed panel in minutes or build on a VPS for full control, keep your server.cfg tidy, back up your database, and audit every script. Do that, and your city stays online and responsive as your community grows.
FAQ
How much RAM and CPU does a FiveM server actually need?For a small server up to 32 players, a couple of high-frequency cores and a few GB of RAM are enough. Large RP cities with a full framework and heavy scripts need dedicated CPU threads and more RAM for the MySQL database. Since FiveM leans on single-thread performance, CPU frequency matters more than core count.
Why is my FiveM server not showing up in the browser?The most common causes are an invalid or missing sv_licenseKey, a mismatched port between server.cfg and your firewall, or the server failing to register with Cfx.re. Check the live console for the registration line, verify your key in the Keymaster portal, and confirm ports 30120 TCP/UDP are open.
Yes. Export your database, download your resources/ folder and server.cfg, then redeploy on a VPS with the latest FXServer artifact. Update the MySQL connection string and license binding, restart, and your city runs the same. Keep backups before migrating in case you need to roll back.