To make a FiveM server you need three things: the free FXServer files (Cfx.re calls them server artifacts), a free server registration key from the Cfx.re Portal, and a machine that keeps port 30120 open on TCP and UDP. The fastest route is txAdmin, the web panel that ships inside FXServer: start it, link your Cfx.re account, pick a template, paste your key and your GTA 5 server is running in minutes. Below is that route and the manual one, then requirements, ports, frameworks, getting listed, artifact updates and the errors players actually hit.
What is a FiveM server?
A FiveM server is a GTA V multiplayer server that a community runs itself on Cfx.re’s FiveM platform, with its own map, rules and scripts. The server software is called FXServer. Everything players see on top of the base game, from a roleplay framework to a car pack, is a resource: a folder of scripts and files the server starts and sends to players when they join.
Roleplay is the best-known kind, but it isn’t the only one. Cfx.re’s own list of common server types covers roleplay (RP), drift, racing, PvP and combat, freeroam, zombie survival and hardcore economy servers. Size varies just as much: a friends-only race server runs fine with a handful of players, while the biggest FiveM servers handle more than 1,000 people at once on OneSync Infinity.
A few ground rules before you build:
- FiveM is run by Rockstar Games. Running a server means accepting Rockstar’s Creator Platform License Agreement, and every player needs their own copy of GTA V.
- It’s PC only. The FiveM client doesn’t run on PlayStation or Xbox. The server itself runs on Windows or Linux.
- There are two platforms now. Classic FiveM runs on GTA V Legacy. FiveM for GTAV Enhanced is in early access, uses its own server files, and its players need GTA V Enhanced. Pick one before you start, because resources built for one don’t automatically work on the other.
FiveM server requirements
FXServer runs on any 64-bit (x86-64) Windows or Linux machine with decent upload speed, and Cfx.re prefers a multi-core processor. Plan on 4–8 GB of RAM: a fresh server uses little, while a full roleplay framework with a long resource list and an active database sits at the top of that range. On top of the hardware you need a free Cfx.re account and key.
| Requirement | What you need |
|---|---|
| Operating system | Windows or Linux. Cfx.re calls the Linux build a “courtesy port” and fixes Windows issues faster. FiveM for GTAV Enhanced on Windows needs the Microsoft Visual C++ 2017 Redistributable. |
| CPU | x86-64, multi-core preferred |
| RAM | 4 GB for a fresh or test server, 6–8 GB once a framework and database are in |
| Network | Good upload, with TCP and UDP 30120 reachable from the internet |
| Cfx.re account | Free, created on the Cfx.re forum. Each account can hold three active server keys. |
| Database | MySQL or MariaDB, only if you run a framework such as ESX or QBCore |
| Players | A PC copy of GTA V that matches your platform (Legacy or Enhanced) and the FiveM client |
If you’d rather not host a FiveM server at home, GTA 5 server hosting gives you the same server on a machine that is already online.
How to make a FiveM server with txAdmin
txAdmin is the easiest way to set up a FiveM server and the one Cfx.re’s own guide uses. It is built into every recent FXServer download, opens in your browser, and deploys a ready-made “recipe” (template) for you. These are the Windows steps; the flow is the same on Linux once txAdmin is running.
- Create a Cfx.re account on the Cfx.re forum (Sign up, then confirm the email).
- Download the server. Open the Server Download page and get the latest Recommended build:
server.7zfor classic FiveM,cfx-server_win_x64for FiveM for GTAV Enhanced. - Extract it with 7-Zip into a folder of its own, for example
C:\FXServer\server. - Start it. Double-click
FXServer.exe(cfx-server.exeon Enhanced). txAdmin opens in your browser; if it doesn’t, go tohttp://localhost:40120and enter the 4-digit PIN shown in the console. - Link your account. Click Link account, sign in with Cfx.re, set a backup password, accept the Creator Platform License Agreement and txAdmin licence, and register.
- Pick a template. Name the server, choose Popular Recipes and pick FiveM Basic Server (CFX Default). Framework recipes such as ESX Legacy, QBCore and Qbox are in the same list; the ESX and QBCore ones need a MySQL or MariaDB database.
- Get your key. In the Recipe Deployer, follow the Portal link, click + to register a new server, then Generate Key and Copy Key. Paste it into txAdmin and click Run Recipe.
- Save and Run Server. Your FiveM server is up.
To test it, open the FiveM client and click Connect to [your PC name] on LAN. Once in, press F8, type tx and press Enter to open the txAdmin in-game menu (noclip, vehicle spawning, player tools).
Setting up a FiveM server without txAdmin
The vanilla setup keeps the server files and your server data in two separate folders, and you start FXServer with your config yourself. It takes a few more minutes than txAdmin and gives you a cleaner picture of what runs where, which helps when something breaks later.
Windows
- Create
C:\FXServer\serverand extract the Recommended build into it. - Clone the default server data next to it (needs Git):
cd C:\FXServer git clone https://github.com/citizenfx/cfx-server-data.git server-data - Create
server.cfginserver-data(see the next section) and setsv_licenseKey. - Start the server from the data folder:
cd /d C:\FXServer\server-data C:\FXServer\server\FXServer.exe +exec server.cfg
Linux
mkdir -p ~/FXServer/server && cd ~/FXServer/server
wget <URL of the Recommended Linux build>
tar xf fx.tar.xz
git clone https://github.com/citizenfx/cfx-server-data.git ~/FXServer/server-data
cd ~/FXServer/server-data && bash ~/FXServer/server/run.sh +exec server.cfg
Install xz-utils first on Debian or Ubuntu. On Enhanced the archive is named cfx-server-linux_x64 instead of fx.tar.xz.
Three mistakes cover most first starts: no resources found means you didn’t cd into the data folder; nothing starts and nobody can connect means you forgot +exec server.cfg; and “no license key was specified” usually comes from one of those two.
The server.cfg lines you need
Your FiveM server cfg file, server.cfg, is a list of commands FXServer runs top to bottom at startup: which ports to listen on, which resources to start, how many slots to open and which key to use. A working minimum is short. The server name, description, tags, icon and banners are no longer set here: they moved to the Cfx.re Portal.
endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"
ensure mapmanager
ensure chat
ensure spawnmanager
ensure sessionmanager
ensure basic-gamemode
ensure hardcap
sv_scriptHookAllowed 0
add_ace group.admin command allow
add_ace group.admin command.quit deny
add_principal identifier.fivem:1 group.admin
set onesync on
sv_maxclients 48
sv_licenseKey "your-key-here"
Swap identifier.fivem:1 for your own identifier to make yourself admin. Every line, plus whitelists, private mode and naming rules, is explained in FiveM server config explained.
FiveM server ports and port forwarding
FiveM uses one port for players, 30120, and it has to be open on both TCP and UDP. TCP carries the server info and file downloads; UDP carries the game itself. Forwarding only one of them is the classic reason a server works on your LAN and fails for everyone else. txAdmin’s web panel uses a second port, 40120, which only you need.
| Port | Protocol | Used for |
|---|---|---|
| 30120 | TCP + UDP | Players connecting (default game port) |
| 40120 | TCP | txAdmin web panel (default) |
- Forward 30120 on both TCP and UDP from your router to the server PC.
- Allow it through the Windows firewall (administrator Command Prompt):
netsh advfirewall firewall add rule name="FiveM TCP" dir=in action=allow protocol=TCP localport=30120 netsh advfirewall firewall add rule name="FiveM UDP" dir=in action=allow protocol=UDP localport=30120 - Test from outside: open
http://your-public-ip:30120/info.jsonin a browser. A block of JSON means the server is reachable. canyouseeme.org can check the port too. - If you run strict firewall or DDoS rules, allow every address in Cfx.re’s
https://static.cfx.re/ips.txt, or the server list can’t poll your server and you’ll see “could not contact the server browser” in the console.
A new server can take up to eight minutes to appear in the list. Some routers mask UDP source ports, which also keeps a server off the list; that one is fixed in the router, not in FiveM.
Add a framework, scripts and cars
A fresh FiveM server is an empty map with a chat box. Frameworks give it jobs, money, inventories and characters; scripts add features; streamed resources add cars, maps, clothing and sounds. Every one of them is a resource folder with an fxmanifest.lua file, placed in resources/ and started with an ensure line in server.cfg.
- Frameworks: Cfx.re lists ESX, ND, QBCore, Qbox and vRP and doesn’t back any of them. ESX and QBCore servers both run on a MySQL or MariaDB database through
oxmysqland needonesync on. Their txAdmin recipes set all of that up if you give txAdmin database credentials. - vMenu: a server-side menu for FiveM with permission support. It has its own txAdmin recipe; installed by hand, it’s an
ensure vMenuline plusexec @vMenu/config/permissions.cfg. - Scripts: drop the folder into
resources/(or a[category]folder), check what it depends on, and addensure scriptnameafter its dependencies. - Cars, clothes and sounds: these go in a resource’s
streamfolder with a fewdata_filelines, and players download them when joining. Custom clothing is an Element Club perk on your Cfx.re account. Server-sided sirens, gun sounds and graphics (timecycle) packs are resources loaded the same way.
Step-by-step instructions for each type, plus where to find safe downloads, are in how to add mods to a FiveM server.
How players join (and leave) your FiveM server
Players need GTA V on PC and the FiveM client from fivem.net, which installs into %localappdata%\FiveM by default. From there they can find your server in Browse Servers or connect directly: press F8 for the console and type connect with your address, for example connect 203.0.113.25:30120. Cfx.re join links work too (connect cfx.re/join/abc123).
- Your server’s IP: for players outside your home it is your public IP plus
:30120. On a hosted server, copy it from the control panel. - To leave a FiveM server: press F8 and type
disconnect, which drops you back to the main menu.quitcloses the game. - Open or allowlisted: open servers let anyone in; allowlisted ones show a lock and make players apply first, sometimes by getting a role in the community’s Discord. For a new community, starting open is the best way to get beginners through the door.
- Player count and slots: the server list shows how many players are online. You get 48 slots free with OneSync; more needs an Element Club tier (64, 128 or up to 2048), and you still raise
sv_maxclientsyourself afterwards.
Getting listed: name, logo, banner and Discord
The details that make a server stand out in the FiveM server list are now managed in the Cfx.re Portal (portal.cfx.re/servers), not in server.cfg. The default txAdmin templates now say so at the top: sv_projectName, sv_projectDesc, sv_hostname, locale, tags, banner_connecting, banner_detail and load_server_icon can’t be set in the file anymore.
- Logo: the old
load_server_iconcommand needed a 96×96 PNG; check the Portal’s upload screen for the current size. An animated icon is a Platinum Element Club perk. - Banner: the detail and connecting banners (
banner_detail,banner_connecting) moved to the Portal as well. - Discord: add
sets Discord "https://discord.gg/yourinvite"toserver.cfgand the link shows on your server’s info page. - Visibility: Upvotes, bought through Cfx.re as Recurring or Burst, move a server up the list. The featured servers on the right are handpicked by Cfx.re (non-roleplay, joinable without a Discord or allowlist step), and applications are closed.
- Naming: Rockstar’s agreement bans its trademarks, logos and game elements from server names and branding, and any server website needs a contact email and a “not approved, sponsored or endorsed by Rockstar Games” disclaimer.
Keep your FiveM server artifacts up to date
Server artifacts are FXServer builds, published on two branches: Recommended (stable) and Latest. Cfx.re supports a Recommended artifact until six weeks after the next one ships and a Latest artifact for two weeks. Old artifacts keep running, but once a build is unsupported and older than three months, players can’t join it from the server browser at all.
Players see this as a grey end-of-support warning (still joinable) or a red end-of-life one, often with “Server artifact version is outdated”. The fix is always on the owner’s side:
- Stop the server and back up your server data folder.
- Download the current Recommended build for your platform and OS.
- Extract it over the server binaries folder (the one with
FXServer.exeorrun.sh), not over your server data. - Start the server and check the console for resources that fail on the new version.
A “Client/Server game build revision mismatch” error right after a GTA V update is different: it usually clears once both sides update, and players can switch their FiveM update channel (Release, Beta or Latest) in the client’s game settings meanwhile.
Make a FiveM test server
A FiveM test server lets you try a new script or framework update without breaking the live city. The simplest version runs on your own PC with sv_lan true, which keeps it off the public list and skips the license key check. On Enhanced you can also set sv_devMode true, which turns on developer mode for joining clients and caps the server at 8 players; never use it in production.
If testers need to join from outside, run a second server with its own key (you can hold three active keys per account) and a copy of the live server.cfg and resources.
Troubleshooting common FiveM server errors
| Error or symptom | Most likely cause | Fix |
|---|---|---|
| “Failed to fetch server variables” or stuck on “Requesting server variables” | The player can’t reach the server’s TCP port (CURL error 28 means it timed out) | If other servers work, it’s the server: check TCP 30120 forwarding and firewall, then info.json |
| “Failed to connect to server after 3 attempts” / “Connecting to server: attempt 3” | TCP forwarded but UDP 30120 isn’t, or a firewall blocks UDP | Forward and allow UDP 30120 as well |
| Players can’t connect to the FiveM server at all | Server down, crashed or still starting | Open http://ip:30120/info.json; no answer means the server isn’t up |
| Server missing from the list or shown as private | sv_master1 "" is active, or ports aren’t reachable |
Comment the line out with #, fix forwarding, wait up to 8 minutes |
| “Server artifact version is outdated” or a red end-of-life warning | Artifacts too old | Update to the current Recommended build |
| Server stuck at 48 slots | No Element Club tier, or sv_maxclients not raised |
Subscribe, use the latest artifact, raise sv_maxclients, restart |
| “You lack the required entitlement to use…” | A paid resource bought on another Cfx.re account, or the wrong key | Check the key; transfer the asset in the Portal |
| FiveM keeps crashing when joining one server (or hangs on a black screen) | Usually that server’s resources, not the player’s PC | Players: try Cfx.re’s test server (cfx.re/join/y4lg95); owners: check the newest resource first |
| Very slow server start on Windows | Microsoft Defender scanning FXServer files | Add an exclusion: Add-MpPreference -ExclusionPath 'C:\FXServer\' |
How to clear the FiveM cache
If one server’s cars or clothing load wrong, players can clear the cache: close FiveM, open the FiveM folder (Win+R, %localappdata%/FiveM), go to FiveM Application Data → data and delete server-cache-priv. The next join re-downloads everything custom on that server, so the first load is slow.
Premade servers, leaks and the rules
You’ll find premade and pre-built FiveM servers for sale, and Discord servers full of “leaks”. Both are risky. Paid resources should only come through the Cfx.re Marketplace or Tebex, and Rockstar’s agreement forbids storefronts that bundle and sell other people’s server content, so a pre-built pack of someone else’s paid scripts is a red flag.
- Leaked resources often don’t work. Escrowed assets only start on a server whose Cfx.re account owns them.
- They can be dangerous. Cfx.re warns about “prohibited logic”: code that infects your other resources.
- Monetization has one route. Server stores must use Tebex. Loot boxes, gambling, cash-outs and selling in-game currency for real money are banned.
- How to report a FiveM server: in FiveM, open Browse Servers, select the server and click Report Server, or use the form on support.cfx.re. If you’ve been banned from a server, that’s between you and its owners; Cfx.re doesn’t handle server bans.
Skip the setup: rent a FiveM server
Making a FiveM server yourself means a PC that never sleeps, two ports forwarded, artifacts to update before they expire, and a server.cfg that grows with every script. GTA 5 server hosting on GameTeam skips the machine part: you bring your Cfx.re key, pay per GB of RAM (from $0.49/GB a week, never per slot), and there’s nothing to forward. The built-in AI copilot handles the fiddly parts. Tell it “I uploaded a car pack, add it after qb-core and restart” and it edits server.cfg for you, or ask “why won’t the city start?” and it reads the console and names the resource that failed. Already set up? Compare plans on our FiveM server hosting page.
FAQ
How much does it cost to make a FiveM server?
Nothing for the software: FXServer, txAdmin and the server key are free. You pay for the machine, either your own PC and electricity or hosting (on GameTeam, a 4 GB server is $1.96 a week). More than 48 players also needs a paid Element Club subscription from Cfx.re.
Is FiveM RP free to play?
FiveM itself is free, but every player needs their own PC copy of GTA V. Individual roleplay servers can sell perks through Tebex; joining is free on most.
Is GTA FiveM legal?
Yes. FiveM is operated by Rockstar Games under its Creator Platform License Agreement. Using pirated copies of GTA V, leaked resources or banned monetization is what breaks the rules.
Is FiveM shutting down?
No. Rockstar runs FiveM and launched FiveM for GTAV Enhanced in early access. The red “end-of-life” message players sometimes see means that one server runs artifacts too old to join.
Is a FiveM server the same as a GTA V Online server?
No. GTA Online sessions run on Rockstar’s own servers with Rockstar’s content. A FiveM server is run by a community with its own map, rules and scripts, and you join it through the FiveM client instead of GTA Online.
Can I play FiveM on PS5 or Xbox?
No. FiveM is made only for the PC version of GTA V, and Cfx.re has no plans for console support.
