If you've ever played on a GTA V roleplay server and thought "I could run one of these," you're probably right. The barrier to entry is lower than most people think. The hardest part isn't the technical setup — it's managing a community. But that's a different article.
Here's how to get a FiveM server running on a VPS, what specs you actually need, and the mistakes that trip up most first-time server owners.
Game hosting panels (the ones that charge per slot) are convenient, but they come with trade-offs. You're limited to what the panel lets you configure. You can't install custom scripts the way you want. And the pricing usually doesn't scale well — 32 slots on a managed panel can cost more than a full server where you control everything and can host 64+ players.
With your own server — whether it's a VPS, a cloud instance, or a dedicated machine — you get root access. Install what you want, configure how you want, restart when you want. The downside is that you're responsible for maintenance. But if you're the kind of person reading this article, that's probably fine with you.
For smaller communities (under 32 players), a cloud server or VPS does the job. For larger RP servers with heavy frameworks and 64+ players, a dedicated server gives you raw hardware performance with no virtualization overhead.
This is the question everyone asks, and the answer is frustrating: it depends on your scripts.
A vanilla FiveM server with 32 players and minimal scripts can run on 4 GB of RAM and 2 CPU cores. But nobody runs a vanilla server. The moment you add EssentialMode, a custom framework like ESX or QBCore, a dozen vehicles, some MLOs, and a full economy system, your resource requirements jump.
Here's what I'd recommend based on real-world usage:
Small server (up to 32 players, light scripts) → Cloud server or VPS
Medium server (32-64 players, moderate framework) → VPS or entry dedicated
Large server (64-128 players, heavy RP framework) → Dedicated server
The key takeaway: FiveM is single-threaded for most operations, so clock speed matters more than core count. An Intel Xeon E-2388G at 3.6 GHz will outperform a dual Xeon with 32 cores at 2.1 GHz for FiveM. Keep that in mind when picking a server. Dedicated servers give you full access to the bare metal CPU — no hypervisor eating into your clock cycles.
Also, bandwidth matters more than people realize. FiveM streams assets to players — custom cars, maps, textures. With unlimited bandwidth, you don't have to worry about 40 players downloading a 500 MB resource pack simultaneously eating into a monthly cap.
You need a Linux server with root access — a VPS, Cloud server, or dedicated server all work. Ubuntu 22.04 or 24.04 LTS is the safest choice — most FiveM tutorials assume Ubuntu, and it's what the community supports best.
Order your server with the specs above, SSH into it, and update everything:
sudo apt update && sudo apt upgrade -y
Don't run FiveM as root. Create a dedicated user:
sudo adduser fivem
sudo usermod -aG sudo fivem
su - fivem
Go to https://keymaster.fivem.net/ and register a server key. You'll need a Cfx.re account and the IP address of your VPS. This is free.
Copy the key — you'll need it in the config.
mkdir -p ~/fxserver && cd ~/fxserver
# Download the latest Linux build
wget <https://runtime.fivem.net/artifacts/fivem/build_proot_linux/master/LATEST_URL> -O latest_url.txt
wget $(cat latest_url.txt) -O fx.tar.xz
# Extract
tar xf fx.tar.xz
rm fx.tar.xz latest_url.txt
Create a data directory and a basic config:
mkdir -p ~/fxserver/server-data && cd ~/fxserver/server-data
# Download the default cfx-server-data
git clone <https://github.com/citizenfx/cfx-server-data.git> .
Now create your server.cfg:
nano ~/fxserver/server-data/server.cfg
Here's a minimal working config:
# Server name
sv_hostname "My FiveM Server"
# License key from keymaster.fivem.net
sv_licenseKey YOUR_KEY_HERE
# Max players
sv_maxclients 32
# Game type and map
gametype "roleplay"
mapname "Los Santos"
# RCON password (change this!)
rcon_password "change_me_immediately"
# Resources to start
ensure mapmanager
ensure chat
ensure spawnmanager
ensure sessionmanager
ensure basic-gamemode
ensure hardcap
# Voice chat
ensure pma-voice
# Server endpoint
endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"
Replace YOUR_KEY_HERE with your actual license key and change the RCON password.
FiveM uses port 30120 for both TCP and UDP:
sudo ufw allow 30120/tcp
sudo ufw allow 30120/udp
If you haven't set up UFW yet, check our firewall guide first.
cd ~/fxserver
bash run.sh +exec server-data/server.cfg
You should see the server boot up and eventually display "Server license key authentication succeeded." That means you're live.
Connect from FiveM by pressing F8 and typing connect YOUR_VPS_IP:30120.
You don't want the server to die when you close your SSH session. Create a systemd service:
sudo nano /etc/systemd/system/fivem.service
[Unit]
Description=FiveM Server
After=network.target
[Service]
Type=simple
User=fivem
WorkingDirectory=/home/fivem/fxserver
ExecStart=/bin/bash /home/fivem/fxserver/run.sh +exec server-data/server.cfg
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target
Enable and start it:
sudo systemctl daemon-reload
sudo systemctl enable fivem
sudo systemctl start fivem
Now your server starts automatically on boot and restarts if it crashes.
Running as root. Don't. If a vulnerability is found in one of your scripts, an attacker gets root access to your entire server. Run FiveM under its own user.
Ignoring RAM usage. FiveM itself uses 2-3 GB, but heavy scripts (especially those with lots of vehicles and MLOs) can push that to 8-12 GB. Monitor with htop and upgrade before you start swapping to disk.
Not setting up automatic restarts. Servers crash. Scripts have memory leaks. A scheduled restart every 6-8 hours is standard practice in the FiveM community:
# Add to crontab: restart every 6 hours
0 */6 * * * systemctl restart fivem
Skipping backups. Your server data — player inventories, properties, vehicles — lives in a database. Back it up daily:
mysqldump -u root -p your_database > ~/backups/fivem-$(date +\\%Y\\%m\\%d).sql
Using a server with bandwidth caps. FiveM streams a lot of assets. Custom vehicles, MLOs, clothing packs — players download all of this when they connect. On a 4 TB bandwidth cap, 40 players joining daily can eat through that in a couple of weeks, especially if you have a big content pack. Go with unlimited bandwidth.
This deserves its own article, but briefly:
ESX is the older, more established framework. Huge library of scripts, well-documented, most tutorials use it. Can feel bloated.
QBCore is newer, cleaner codebase, better performance in most cases. Growing community, but fewer ready-made scripts than ESX.
Both work fine on a VPS. Pick the one with the community and scripts that match your vision. You can always switch later (it's painful, but doable).
sudo apt install mariadb-server.htop and journalctl -u fivem -f to watch logs in real time.set onesync on.All Dedimax plans — Cloud, VPS, and Dedicated — include unlimited bandwidth and DDoS protection, which matters for FiveM more than most use cases.
The important part: no commitment on any plan. You can run a server for two months to test your concept and cancel if it doesn't work out. You're not locked into a 24-month contract.
Take control of your dedicated server (settings, data ...) sans limites dans l'installation de vos applications.
What are you waiting for ?
We are waiting you on community zone. More than 70 guides (sysadmin, gaming, devops...) !
Let me check