FiveM lets you run custom GTA V multiplayer servers for roleplay, racing, and more. Setting one up is straightforward once you know the steps. Here is how to make a FiveM server from scratch.
What You Need
- A copy of GTA V (players need it too)
- A server machine (a dedicated game server or VPS) running Windows or Linux
- A Cfx.re account for your server license key
- Basic comfort editing config files
Step 1: Get a Server Key
- Go to the Cfx.re / FiveM keymaster portal
- Create a server key (license) tied to your account
- Copy the key, you will paste it into your config
Each server needs its own key. Keep it private.
Step 2: Download the Server Artifacts
The "artifacts" are the FiveM server build:
- Download the latest recommended artifacts for your OS (Windows or Linux) from the Cfx.re artifacts page
- Extract them into a folder on your server (e.g.
server/) - Use a recommended/stable build for production, avoid bleeding-edge unless you need it
Step 3: Get the Server Data Files
- Clone or download the cfx-server-data repository
- This contains the default
resourcesfolder with core gamemodes and scripts - Place it where your server can find it
Step 4: Configure server.cfg
Create or edit server.cfg with the essentials:
endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"
sv_hostname "My FiveM Server"
sv_maxclients 32
# Start core resources
ensure mapmanager
ensure chat
ensure spawnmanager
ensure sessionmanager
ensure hardcap
# Your license key
sv_licenseKey "YOUR_KEY_HERE"
Adjust the hostname, max clients, and add your license key.
Step 5: Start the Server
- Windows: run
FXServer.exe +exec server.cfg - Linux: run the
run.shscript pointing to your server.cfg
Open the required ports (default 30120 TCP/UDP) on your firewall and router so players can connect.
Step 6: Add Resources
Drop resource folders into resources/ and add ensure resourcename lines to server.cfg. Popular additions:
- txAdmin for a web management panel
- A framework (ESX or QBCore) for roleplay
- Custom maps, vehicles, and scripts
Step 7: Go Live
Restart the server, confirm it appears in the server list, and share your connect IP. Use txAdmin to manage it more easily.
Tips
- Use stable artifacts for production
- Open port 30120 TCP and UDP
- Run txAdmin for easy management and recipes
- Pick good hardware, FiveM is CPU single-thread heavy, so strong per-core performance matters
FAQ
What do I need to make a FiveM server? GTA V, a server machine, server artifacts, the cfx-server-data files, and a Cfx.re license key.
What port does FiveM use? Default 30120, both TCP and UDP.
Do I need a framework? Only for roleplay. ESX or QBCore are common, but you can run a basic server without one.
Related: FiveM txAdmin setup, FiveM server artifacts build guide, FiveM artifact update and version mismatch fix