How to make a FiveM server

Make a FiveM server for GTA V on a rented server, your own PC or Linux: the steps, which recipe to pick, ports, server.cfg and common errors, with a hosting discount.

Tutorial

12 min read

Updated

Servers

Making a FiveM server takes less than most people expect: a place to run it, a free license key and a recipe that sets up the rest. This guide shows how to make a FiveM server for GTA V on a rented server or your own PC, which recipe to pick, how to open it to players, how to fix the first errors, and how to get your first custom clothing onto it.

What you need to make a FiveM server

To make a FiveM server you need three things: a machine that stays on to run the server program (FXServer), a free Cfx.re license key from the Cfx Portal, and a recipe that txAdmin installs for you. Your players need GTA V and the FiveM client.

A machine that stays on
The server program (FXServer) has to run all day. Your own PC works for testing. A real server needs hosting.
A Cfx.re license key
A free key from the Cfx Portal that every FiveM server must have. Your plan there sets your player slots, and which features you get.
A recipe
A ready-made setup that txAdmin installs for you, like a QBCore or ESX base, so you start with jobs, money and a clothing menu.

The server doesn't need the game: it runs FXServer, and your players' game does the rest.

Where to host a FiveM server

Most people starting out rent a FiveM server from a host: it is ready in minutes, with a web panel, txAdmin and backups. Your own PC is fine for testing, and a VPS is for owners who maintain everything themselves. Our hosting guide compares the options, the sizes and the prices.

Read FiveM server hosting 2026: How to choose and what it costs to pick a host. The next section uses ZAP-Hosting's coupon alivegames-a-2693 for 20% off.

How to make a FiveM server, step by step

To make a FiveM server, get a free Cfx.re license key, order a server, open txAdmin and link your Cfx.re account, deploy a recipe such as QBCore, then join on port 30120 and add your first resources. Each step below says what to do, and the steps that need it show the code.

Sign in to the Cfx Portal (opens in a new tab) and create a key for your server. You will paste it into txAdmin in a moment, and it ends up in your config as sv_licenseKey.

server.cfg
## server.cfgsv_licenseKey "cfxk_xxxxxxxxxxxxxxxxxxxx_yyyyy"   # from the Cfx Portalsv_hostname "My FiveM Server"sv_maxclients 32

Prefer to test on your own computer first? The next section covers it.

Next, read How to add custom clothing to your FiveM server, and How to make custom clothing for FiveM if you still need a pack. To keep the server current, read FiveM server artifacts: which version and how to update.

How to make a FiveM server on your own PC

To make a FiveM server on your own PC, download the recommended server build from Cfx.re, extract it, run FXServer.exe and follow the txAdmin setup in your browser. It costs nothing and suits testing, but the server is only online while your PC is on. To test clothing on a free key, set sv_maxclients to 8 or less: community and hosting guides report that small test servers can stream it without a paid plan, though Cfx.re\'s docs don\'t state this.

Open the Server Download page (opens in a new tab) and get the recommended Windows build. Extract it with 7-Zip or WinRAR into a folder such as C:\FXServer\server.

Cfx.re's txAdmin guide (opens in a new tab) has these steps with screenshots. On GTA V Enhanced, the build is named cfx-server_win_x64, the program is cfx-server.exe, and you need the Microsoft Visual C++ 2017 Redistributable first.

How to make a FiveM server on Linux

To make a FiveM server on Linux, download the recommended Linux build, extract it with tar and start run.sh. Cfx.re\'s docs call the Linux build a courtesy port and say issues are more likely to be fixed on Windows, so choose it only if you are comfortable running a Linux machine.

Terminal
# Copy the link of the recommended Linux build from the Server Download pagemkdir -p ~/FXServer/server && cd ~/FXServer/serverwget <the link you copied>tar xf fx.tar.xz
# Start it without +exec, and txAdmin shows its setup addressbash ~/FXServer/server/run.sh

Get the link from the Server Download page (opens in a new tab). On GTA V Enhanced the build is named cfx-server-linux_x64. Extracting needs xz or xz-utils. On a machine with no browser, open txAdmin from your own computer at http://your.server.ip:40120, its default port. The Cfx.re setup docs (opens in a new tab) also show the manual way, with cfx-server-data and +exec server.cfg.

Which FiveM recipe should you pick?

Pick CFX Default FiveM to test a clothing pack, because it works as provided. Pick QBCore, Qbox or ESX for a roleplay server. Those need a database, so have its details ready before you deploy.

RecipePick it forNeeds a database
CFX Default FiveMTesting a clothing pack or learning the serverNo
QBCoreA roleplay server with jobs and moneyYes
QboxA roleplay server built on QBCoreYes
ESXA roleplay server on the ESX frameworkYes

On a rented server, look for the database details in your host's panel. On your own PC, install the database yourself. Our guide How to integrate custom clothing with QBCore, Qbox and ESX shows how each one handles clothing.

What goes in server.cfg

server.cfg sets your server's ports, name, player limit, license key and the resources it starts. A recipe writes it for you, and you edit it later in txAdmin or through FTP. These are the lines you will touch most.

server.cfg
## server.cfgendpoint_add_tcp "0.0.0.0:30120"   # the port players connect toendpoint_add_udp "0.0.0.0:30120"
sv_hostname "My FiveM Server"sv_maxclients 32                   # most players at once; 48 without a paid plansv_licenseKey "cfxk_xxxxxxxxxxxxxxxxxxxx_yyyyy"
ensure mapmanager                  # each ensure line starts a resourceensure chatensure spawnmanagerensure sessionmanager

How to let players join your server

Players join through your public address on port 30120, either with connect in the F8 console or from the server list. A rented server is reachable already. On your own PC, forward port 30120 over TCP and UDP on your router, and allow it through your firewall.

Check from outside your network by opening info.json. A JSON reply means the server is reachable. If it fails, the port isn't open yet.

Browser
# In a browser on another network, with your public IPhttp://your.public.ip:30120/info.json

Common problems when making a FiveM server

Most first-start problems come from the wrong folder, a missing +exec, or a closed port. This table lists what Cfx.re's docs give for each. For anything else, see their server issues (opens in a new tab) page.

What you seeWhat to do
Failed to start resource, no resources foundYou started the server from the wrong folder. Start it from the folder that holds server.cfg.
Timeouts or refused connections, and no resources startedYou left out +exec server.cfg when starting a server without txAdmin.
no license key was specifiedEither of the two causes above, so check the folder and +exec first.
Players can't connectUsually port forwarding or a firewall. Open 30120 over TCP and UDP, and check info.json from outside your network.
The server isn't in the server listIt can take up to 8 minutes after starting. Also check that sv_master1 "" isn't active in server.cfg.
Only 48 slots are availableMore needs Element Club Argentum or above, the latest server artifact, and a higher sv_maxclients, then a restart.
The server starts slowly on WindowsMicrosoft Defender may be scanning FXServer. Add your FXServer folder as an exclusion. More resources also mean a longer start.

Questions about making a FiveM server

These answers cover whether the Cfx.re license is free, whether you can host on your own PC, whether the server needs GTA V, which port it uses, whether it runs on Linux, and which framework to pick for your first server. For prices, see our hosting guide, because plans change and the host's page has the current ones.

Alive Games

Server ready? Make clothes for it

Pick a GTA V item, paint it in 3D and download an addon pack for your new server.

TopsTops
VestsVests
PantsPants
MiscellaneousMiscellaneous
Right BraceletsRight Bracelets
TopsTops
VestsVests
PantsPants
MiscellaneousMiscellaneous
Right BraceletsRight Bracelets
TopsTops
VestsVests
PantsPants
MiscellaneousMiscellaneous
Left BraceletsLeft Bracelets
PendantsPendants
ShoesShoes
BagsBags
GlassesGlasses
Left BraceletsLeft Bracelets
PendantsPendants
ShoesShoes
BagsBags
GlassesGlasses
Left BraceletsLeft Bracelets
PendantsPendants
ShoesShoes
BagsBags