← Blog
Host Your Own FiveM Server

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.

Why your own server instead of a game hosting panel?

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.

What specs do you need?

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

  • 4 CPU cores
  • 8 GB RAM
  • 50 GB SSD (NVMe preferred)
  • 1 Gbps unlimited bandwidth
  • Budget: around $15-30/month

Medium server (32-64 players, moderate framework) → VPS or entry dedicated

  • 4-6 CPU cores
  • 16 GB RAM
  • 80 GB SSD/NVMe
  • 1 Gbps unlimited bandwidth
  • Budget: around $30-60/month

Large server (64-128 players, heavy RP framework) → Dedicated server

  • 6-8 CPU cores
  • 32 GB RAM
  • 120 GB+ NVMe
  • 1 Gbps unlimited bandwidth
  • Budget: around $60-120/month

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.

Step 1: Get a server

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

Step 2: Create a FiveM user

Don't run FiveM as root. Create a dedicated user:

sudo adduser fivem
sudo usermod -aG sudo fivem
su - fivem

Step 3: Get a Cfx.re license key

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.

Step 4: Download and extract the server

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

Step 5: Configure the server

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.

Step 6: Open the firewall

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.

Step 7: Start the server

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.

Step 8: Keep it running with systemd

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.

Common mistakes

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.

Framework: ESX or QBCore?

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).

Performance tips

  • Use MariaDB/MySQL on the same server for lowest latency. Install with sudo apt install mariadb-server.
  • Disable resources you're not using. Every loaded resource consumes RAM.
  • Monitor with htop and journalctl -u fivem -f to watch logs in real time.
  • OneSync is mandatory for 32+ players. Enable it in your config: set onesync on.
  • Pick a server close to your players. If your community is mostly in Europe, get a European VPS. Ping matters in RP — nobody wants to see other players teleporting.

What it costs

All Dedimax plans — Cloud, VPS, and Dedicated — include unlimited bandwidth and DDoS protection, which matters for FiveM more than most use cases.

  • Starting out? A Cloud server at $3.90/month or a VPS from $9.99/month handles small communities.
  • Growing? A VPS with 8 GB RAM and 4 cores around $25/month covers medium servers.
  • Serious RP community? A dedicated server gives you full hardware performance with no virtualization overhead, starting at $9.99/month.

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.

Continue reading

Le coin des experts

Un sujet bloquant ?
Une expertise à partager ?

On vous attend sur notre forum collaboratif. Déjà plus de 70 tutoriels en ligne (sysadmin, gaming, devops...) !

ça m'interesse
DEDIMAX DEDIMAX DEDIMAX DEDIMAX
DEDIMAX

Une question

À votre service !

Contactez-nous

Prendre contact