Guide

How to Set Up a FiveM Server

A clear walkthrough for launching your own FiveM roleplay server — get your Cfx.re server key, install the server artifacts, configure server.cfg and add a framework. Plus the managed route if you'd rather skip the Linux work.

8 min read Intermediate Anti-DDoS hosting

FiveM is the multiplayer framework for Grand Theft Auto V, run by Cfx.re (a Rockstar Games company). To host a server you need a legitimate copy of GTA V, a free Cfx.re account, and a server key. ESAGAMES provides the protected server hardware; you bring the game and your content.

You can run the server yourself on a VDS/dedicated box, or use managed FiveM hosting with a panel that handles the artifacts and updates for you.

Before you start

What you'll need

A quick checklist before you begin — have these ready and the rest is easy.

  • A legitimate copy of Grand Theft Auto V (you and your players each need one).
  • A free Cfx.re account and a server key from the keymaster.
  • A Linux or Windows server with a strong CPU (FiveM is CPU-bound).
  • The latest FXServer artifacts, and (for RP) a framework like ESX or QBCore plus a MySQL database.
  • Port 30120 (TCP & UDP) open and reachable.
Step by step

Launch a FiveM server, step by step

1

Get a Cfx.re server key

Create a free account at the Cfx.re portal and generate a server key (license key) from the keymaster. You'll put it in your server.cfg. Each key is tied to your account — keep it private.

2

Install the FXServer artifacts

Download the latest recommended FXServer build (the "artifacts") for Linux or Windows from the official Cfx.re source, and extract them on your server. On managed hosting this is handled for you.

3

Configure server.cfg

Set your endpoints, server name, max clients, your license key and the resources to start. Never share your sv_licenseKey publicly.

endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"
sv_maxclients 48
sv_hostname "My ESAGAMES RP Server"
sv_licenseKey "your_cfx_key_here"
4

Add a framework (optional)

Most roleplay servers run a framework like ESX or QBCore plus a database (MySQL via oxmysql). Add the framework resources and ensure them in server.cfg, then import its SQL.

ensure oxmysql
ensure es_extended
5

Start the server

Launch FXServer pointing at your server.cfg. It connects to Cfx.re, validates your key and registers your server.

./run.sh +exec server.cfg
6

Connect and go live

Open the FiveM client, press F8 and use connect your-ip:30120, or find your server in the list. Share your connect address with your community.

connect your-server-ip:30120
Run it right

FiveM best practices

CPU is everything

FiveM is heavily single-thread bound. High CPU clock keeps a busy ESX/QBCore city smooth.

Anti-DDoS

RP communities are heavily attacked. Always-on filtering keeps your city online during raids.

Stay compliant

Use only legitimate GTA V copies and follow the FiveM & Rockstar terms — don't sell the game or use leaked paid resources.

Troubleshooting

Common problems & fixes

Hit a snag? These are the issues people run into most — and how to solve them.

Server doesn't appear in the list

Your sv_licenseKey is missing, invalid, or already in use elsewhere. Generate a fresh key in the keymaster and make sure only one server uses it.

Players can't connect

Check that port 30120 is open on both TCP and UDP and that your endpoints in server.cfg are correct.

Resources fail to start

A resource is missing a dependency or has the wrong name. Read the console — it names the failing resource and reason.

Database errors on a framework

oxmysql isn't configured or the MySQL connection string is wrong. Set your connection string and ensure oxmysql before the framework.

Skip the setup — host it with ESAGAMES

Skip the artifacts and Linux work. Our FiveM hosting gives you txAdmin, high-clock CPUs and MySQL behind a multi-Tbps Frankfurt network — your city online in minutes.

FiveM hosting
FAQ

Frequently asked questions

Do I need to own GTA V to host a FiveM server?

You need a legitimate copy of Grand Theft Auto V to play on FiveM, and so do your players. You also need a free Cfx.re account and a server key.

Where do I get a FiveM server key?

From the official Cfx.re keymaster portal after creating a free account. Put the key in your server.cfg as sv_licenseKey and keep it private.

What port does FiveM use?

FiveM uses port 30120 by default (TCP and UDP). Make sure it's open and reachable.

How much CPU/RAM does a FiveM server need?

FiveM is CPU-bound, so high single-core clock matters most. A small server runs on 4–6 GB RAM; a busy ESX/QBCore city wants 8 GB+ and a strong CPU.

ESX or QBCore — which framework?

Both are popular. QBCore is modern and modular; ESX is mature with a huge resource ecosystem. Pick the one your developers know best.

Is FiveM legal?

Yes — FiveM is operated by Cfx.re, a Rockstar Games company, and is legitimate to use with a legal copy of GTA V. Always follow the FiveM and Rockstar terms of service.

More guides

Keep reading

Ready to launch?

Protected, low-latency game hosting in Frankfurt — online in minutes with 24/7 support.

Payments Secure checkout with cards, banking apps and digital wallets.

Choose the payment flow that fits your stack and region without leaving the platform.

Pay by Zen Visa Mastercard Paysafecard PaysafeCash Skrill Trustly Bancontact UnionPay iDeal WebMoney