GUIDE • UPDATED

How To Host A FiveM Server

Set up a FiveM (GTA V roleplay and multiplayer) server: the free license key, txAdmin or a vanilla FXServer, server.cfg, port 30120, OneSync, admins and private listing.

Checked against the official documentation on .

Byte, the TopServer.Network robot mascot, launching a game server like a rocket

A FiveM server runs your own Grand Theft Auto V multiplayer world, from a small group to a full roleplay community. FiveM servers come from Cfx.re, not Steam, and every server needs a free license key. This guide follows the official Cfx.re documentation, checked on 4 October 2026. Unlike our other hosting guides, we did not run a test server for this one: a FiveM server needs a key from a Cfx account, so every step here is from the official docs.

What You Need

  • A Cfx account and a license key. Register the free key on the Cfx Portal before you start; the server will not run without it.
  • Windows or Linux. Cfx.re supports Windows fully, and calls the Linux server a "courtesy port": problems are more likely to be fixed on Windows.
  • Players need GTA V and the FiveM client.
  • For a FiveM for GTAV Enhanced server, the Microsoft Visual C++ 2017 Redistributable must be installed, and the server files have different names (cfx-server instead of FXServer).

Install The Server

FiveM servers are not on Steam. Download the recommended build from the official Server Download page on the Cfx.re docs:

  • Windows: a server.7z archive. Extract it with 7-Zip or WinRAR into a folder such as C:\FXServer\server.
  • Linux: an fx.tar.xz archive. Extract it with tar xf fx.tar.xz (Debian and Ubuntu need the xz-utils package).

To update, download a newer recommended build and extract it over the old one.

Ports And Firewall

Port Protocol Used for
30120 TCP and UDP Players connecting, set in server.cfg
40120 TCP The txAdmin web panel

Forward 30120 TCP and UDP to the server. The txAdmin panel is for you, not players.

Set Up With txAdmin (Easiest)

txAdmin comes with the server and walks you through setup in your browser:

  1. Run FXServer.exe. A setup page opens in your browser.
  2. Check the PIN is filled in and click Link Account, then log in to your Cfx account and allow it.
  3. Create a password for your server's admin page.
  4. Name your server, choose Popular Recipes, and pick the CFX Default FiveM template. Other templates may need a database server.
  5. Save, open the Recipe Deployer, enter your license key from the Portal, and run the recipe.
  6. Click Save & Run Server.

Set Up A Vanilla Server (Without txAdmin)

  1. Extract the server build into C:\FXServer\server.
  2. Clone the base server data outside that folder: git clone https://github.com/citizenfx/cfx-server-data.git server-data.
  3. Make a server.cfg in the server-data folder (see below) and set your key with sv_licenseKey.
  4. Start it from the server-data folder:
cd /d C:\FXServer\server-data
C:\FXServer\server\FXServer.exe +exec server.cfg

On Linux the last step is cd ~/FXServer/server-data && bash ~/FXServer/server/run.sh +exec server.cfg.

Configure The Server

Settings live in server.cfg. The parts of the official example to change first:

Line What it does
endpoint_add_tcp "0.0.0.0:30120", endpoint_add_udp "0.0.0.0:30120" The port; change the port only, unless the machine has several network cards
sv_licenseKey Your key from the Cfx Portal
sv_hostname The server's name (the docs note it is not usually shown in listings)
sets sv_projectName, sets sv_projectDesc The name and description players see
sv_maxclients 48 The player slot limit
set onesync on Turns on OneSync, needed for server-side state awareness
sets tags, sets locale Tags and the main language, such as en-GB
ensure <resource> Starts a resource
set steam_webApiKey A Steam Web API key, if you want Steam authentication
#set rcon_password "" Remove the # and set a password to turn on RCON

Keeping the server private

Add the line sv_master1 "" to server.cfg to list the server as private in the server browser.

Admins

The example server.cfg makes a group of admins with add_ace and adds players to it with add_principal, for example add_principal identifier.fivem:1 group.admin. Replace the identifier with your own.

Join Your Server

Players find it in the FiveM server browser, or connect directly with its IP address and port 30120.

Common Problems

From Cfx.re's own list:

No resources are found and "Failed to start resource"

You did not start the server from the server-data folder. cd there first.

No resources start and players time out

You left out +exec server.cfg when starting the server.

"No license key was specified"

One of the two problems above is usually the cause; also check sv_licenseKey is set.

The server starts slowly on Windows

Cfx.re has a separate page on slow server startups linked from its setup guides.

Or Rent A Server Instead

A FiveM community usually grows into a database, a framework and dozens of resources, all needing a machine that stays on. A rented FiveM server runs on the host's hardware, and you add your license key and resources from its panel. Compare what each host includes before you buy.

Compare FiveM server hosts on price, locations and support.

Frequently Asked Questions

Do I need a license key to run a FiveM server?

Yes. Every FiveM server needs a key, which is free from the Cfx Portal.

Which port does a FiveM server use?

30120, both TCP and UDP. txAdmin's web panel uses 40120.

What is txAdmin?

The web panel that comes with the FiveM server. It sets up the server from a recipe, runs it and lets you manage it from your browser.

Can I run a FiveM server on Linux?

Yes, but Cfx.re calls the Linux build a courtesy port and recommends Windows if you hit problems.

How do I make my FiveM server private?

Add sv_master1 "" to server.cfg so the server is listed as private.

How many players can a FiveM server hold?

The example server.cfg sets sv_maxclients 48; Cfx.re points to its hosting page for the limits.

Sources

Checked on 4 October 2026 against:

PREFER A READY-MADE SERVER?

Compare FiveM (GTA RP) Hosting

See providers side by side on price, performance, features and support, and check for a current discount before you buy.