Client Area
Guide

How to Set Up a FiveM Server

GTA··4 min read
GTA: FiveM server hosting

FiveM turned GTA V into the biggest roleplay platform around. A dedicated FiveM server lets you build a custom RP city with your own framework, resources and rules. Here is how to start.

RAM and player slots

A light server runs on 4 GB; a busy RP city with many resources wants 8–16 GB. FiveM scales with the number and weight of your resources more than raw player count.

Get your license key and use txAdmin

You need a free FiveM license key from the Cfx.re portal. txAdmin — included on GGameHost — gives you a web panel to deploy, configure and manage the server and resources without the command line.

ESX vs QBCore

Most RP servers build on a framework: ESX (mature, huge resource library) or QBCore (modern, popular for new servers). Pick one, then add jobs, economy and custom resources on top.

Set it up in 4 steps

  1. Choose a FiveM plan sized to your resource load.
  2. Deploy — online in under 60 seconds with txAdmin access.
  3. Add your license key, pick ESX or QBCore, and install resources.
  4. Edit server.cfg, then share your connect address.

Deploy a FiveM server →

Related guides

Share:Twitter / XFacebookRedditWhatsApp
Reference

Ports, config and common failures

Default ports: 30120 for the game, 40120 for txAdmin

Cfx.re's example server.cfg binds the same port number twice, once per protocol, while txAdmin listens on its own port:

PortProtocolSet byRole
30120TCPendpoint_add_tcp "0.0.0.0:30120"Documented as creating a multiplexable TCP server instance; the support guide checks external reachability at http://ip:port/info.json
30120UDPendpoint_add_udp "0.0.0.0:30120"Documented as creating a UDP host instance; the address and port must be valid and not already in use
40120TCPTXHOST_TXA_PORTtxAdmin web panel; 40120 is its documented default

The comment beside those two lines in the example config tells you to change only the port, and to change the IP only if the machine has multiple network interfaces. RCON stays disabled as long as rcon_password is unset, and the command reference notes that FXServer RCON runs over UDP. To prevent confusion between the two ports, txAdmin's configuration docs reject 30120 as the panel port and 40120 as the enforced game port.

License key and the slot settings in server.cfg

Setting up a server starts with registering a free license key on the Cfx Portal and setting it through sv_licenseKey. The command reference notes that when sv_lan is set to true, the server does not appear in the public server list and license key checks are skipped.

sv_maxClients accepts an integer from 1 to 2048, subject to two documented conditions: values from 32 upward require onesync set to on or legacy, and values above 64 require onesync set to on. The example config ships with sv_maxclients 48 and set onesync on.

Downloading the server artifact and base resources

Server binaries are distributed as build artifacts. The vanilla setup guide has you download server.7z on Windows or fx.tar.xz on Linux; for FiveM for GTAV Enhanced, the corresponding files are cfx-server_win_x64 and cfx-server-linux_x64. The Windows artifact index marks one build LATEST RECOMMENDED and another LATEST OPTIONAL.

Base resources come from a separate cfx-server-data clone, placed in a folder outside the server binaries folder.

Tooling needed alongside the download:

  • Windows — Git and an archiving tool such as 7-Zip or WinRAR.
  • Linux — Git and the xz or xz-utils package.

How long a build stays supported

Support for artifacts is time-boxed. Recommended artifacts are supported until six weeks after the next release in line, and latest artifacts until two weeks after it. Unsupported server artifacts older than three months cannot be joined from the server browser, so an untouched installation will eventually stop accepting connections until the artifact is replaced.

Startup and listing failures the docs name

The Cfx.re guides name these startup failures:

  • No resources found, plus a “Failed to start resource” message — the binary was launched from the wrong folder; run it from the server-data folder.
  • Nothing starts and clients get a timeout or connection refused+exec server.cfg was left off the command line.
  • “no license key was specified” — the docs note that either of the two mistakes above may apply here, so the message does not necessarily mean the key itself is missing.
  • The server runs but is missing from the browser — usually bad port forwarding or firewall configuration. Also check that the sv_master1 line stays commented out, since a missing # can make the server appear private and disable the connect button; make sure sets sv_projectName and sets sv_projectDesc are present; and allow up to 8 minutes after launch for the server to be listed. Firewalls or gateways that mask UDP source ports can also keep the server hidden. Use http://ip:port/info.json to test reachability from outside.
  • Slow startup on Windows — Microsoft Defender Antivirus scanning FXServer files can slow server startup; the docs suggest adding an exclusion with Add-MpPreference -ExclusionPath from an administrator PowerShell prompt.

Ready to play?

Deploy your server in under 60 seconds — 7-day money-back guarantee.

Browse games