M mgame.gg

Grand Theft Auto V

Home Guides Log in

Language

All games

Fortnite Pokemon Minecraft Roblox Counter-Strike 2 Grand Theft Auto V Grand Theft Auto VI League of Legends Valorant Dota 2 Battlefield 6 Arc Raiders The Sims 4 Apex Legends Overwatch Marvel Rivals World of Warcraft PUBG: Battlegrounds EA Sports FC Rocket League Rainbow Six Siege Elden Ring Clair Obscur: Expedition 33 Baldur's Gate 3 Cyberpunk 2077 Red Dead Redemption 2 Genshin Impact Path of Exile 2 Helldivers 2 Split Fiction PEAK Terraria Stardew Valley Counter-Strike: Source Counter-Strike 1.6
← Grand Theft Auto V guides

How to Make a FiveM Server: Step-by-Step Setup Guide

November 9, 2026 · 7 min read

On this page

To make a FiveM server, you need a free Cfx.re account and license key, the FXServer files from the official FiveM docs, and a PC or rented server that stays online. The easiest route is txAdmin, the web panel that comes with the server: it installs a working setup from a template in a few minutes. This guide follows Cfx.re's own documentation.

Last checked: November 9, 2026.

What you need before you start

Item Details
Cfx.re account Free; sign up on the Cfx.re forum and confirm your email
License key Free; generate it on the Cfx.re Portal (portal.cfx.re)
Hardware A 64-bit (x86-64) Windows or Linux machine with a good upload speed; a multi-core CPU is recommended
Tools 7-Zip to unpack the server files; Visual Studio Code is handy for editing scripts
Enhanced servers only The Microsoft Visual C++ 2017 Redistributable
Network Port 30120 open for TCP and UDP if you host at home

Every player who joins still needs their own legal copy of GTA 5 on PC and the FiveM client. Our guide on how to play GTA RP covers the player side.

Legacy or Enhanced server?

FiveM now runs on both PC versions of GTA 5. A regular FiveM server is for players on GTA V Legacy. A FiveM for GTAV Enhanced server is for players on GTA V Enhanced and is still in early access. The setup is nearly identical, but some file names differ, as noted in the steps below.

Option 1: Rent a server

If you don't want to keep a PC running, rent one from an authorized FiveM hosting partner. FiveM's hosting page lists GPORTAL, Shockbyte, Nitrado, Nodecraft, xREALM and ZAP-Hosting. The host takes care of the hardware and network, and you configure the server through their control panel. The settings in the server.cfg section below still apply.

Option 2: Set up a server on Windows with txAdmin

This is Cfx.re's recommended "ultimate easy setup".

  1. Get your license key. Log in to the Cfx.re Portal and create a server license key. Keep it handy.
  2. Download the server. Open the Server Download page in the FiveM docs and download the recommended Windows build. It comes as server.7z, or cfx-server_win_x64 for an Enhanced server.
  3. Extract it. Open the archive with 7-Zip or WinRAR and extract it to a folder such as C:\FXServer\server.
  4. Start it. Double-click FXServer.exe, or cfx-server.exe for an Enhanced server. txAdmin opens in your web browser.
  5. Link your account. Check that a PIN is filled in, click Link Account, log in with your Cfx.re account and click Yes, Allow.
  6. Create an admin password for the txAdmin panel, then click Next.
  7. Name your server and click Next.
  8. Choose a recipe. Select Popular Recipes and pick CFX Default FiveM for your first server. Other templates exist, but some need a separate database server.
  9. Pick a folder for the server data and click Save, then open the Recipe Deployer.
  10. Run the recipe. Click Next, paste the license key from step 1 and click Run Recipe.
  11. Finish. Click Next, then Save & Run Server.

Your server is now running, and txAdmin works as its control panel from here on.

Option 3: A manual (vanilla) server

Advanced users can skip txAdmin. On Windows, the documented steps are:

  1. Create a folder for the server binaries, such as C:\FXServer\server, and extract the recommended build into it.
  2. Install Git and clone the base server data into a separate folder: git clone https://github.com/citizenfx/cfx-server-data.git server-data.
  3. Create a server.cfg file in the server-data folder and add your key with sv_licenseKey "yourkey".
  4. Start the server from the server-data folder with C:\FXServer\server\FXServer.exe +exec server.cfg.

On Linux, the steps are similar: you need Git and the xz-utils package, you extract fx.tar.xz (cfx-server-linux_x64 for Enhanced), and you start the server with the included run.sh script. Cfx.re calls the Linux build a courtesy port and says issues are more likely to get fixed on Windows.

The server.cfg settings that matter most

Setting What it does
endpoint_add_tcp "0.0.0.0:30120" and endpoint_add_udp "0.0.0.0:30120" The port players connect on. 30120 is the default
sv_licenseKey Your Cfx.re license key. The server won't start properly without it
sv_maxclients 48 The player slot limit. 48 is the free maximum
set onesync on Turns on OneSync, needed for server-side game logic and higher player counts
sv_scriptHookAllowed 0 Keeps ScriptHook-based plugins disabled. Setting 1 allows them
add_principal identifier.fivem:1 group.admin Makes an account an admin. Replace 1 with your own FiveM identifier
ensure resourcename Starts a resource (script) when the server boots

Lines starting with # are comments. The example config also has a commented-out sv_master1 "" line; removing the # lists your server as private in the server browser.

Opening your server to players

  • Test it yourself first. Open FiveM, press F8 and type connect 127.0.0.1:30120 on the same PC.
  • Forward the port. If you host at home, forward port 30120 for both TCP and UDP on your router to the PC running the server, and allow FXServer through Windows Firewall.
  • Share the address. Friends can connect through the server browser or by typing connect and your address in the F8 console.

How many players can a FiveM server have?

The free limit is 48 players with OneSync. More slots need a paid FiveM Element Club subscription from the Cfx.re Portal. These were the prices on FiveM's hosting page, plus VAT:

Tier Price Player slots
Free $0 Up to 48
Element Club Argentum $15 a month Up to 64
Element Club Aurum $25 a month Up to 64 with OneSync, up to 128 with OneSync Infinity
Element Club Platinum $50 a month Up to 128 with OneSync, up to 2,048 with OneSync Infinity

FiveM says new perks can take up to 6 hours to activate after you subscribe.

Turning it into an RP server

A blank server has no jobs, money or inventory. RP servers add these with a framework, a base set of scripts that other resources build on. The Cfx.re docs list ESX, ND, Qbox and vRP as common Lua frameworks, and recommend installing them through txAdmin recipes. Some framework recipes need a database, so read the framework's own setup guide first.

If you want to write your own scripts, FiveM supports Lua, C# and JavaScript.

Common problems

  • "Failed to start resource" or no resources found: the server was started from the wrong folder. Start it from the folder that contains server.cfg.
  • "No license key was specified": the key is missing from server.cfg, or the server didn't load the config. Check for the +exec server.cfg part of the start command.
  • Players time out or are refused: port 30120 isn't open for both TCP and UDP, or the server didn't load its config.

Frequently asked questions

Is it free to make a FiveM server?

Yes. The server software and license key are free, and you can host up to 48 players at no cost on your own PC. You only pay if you rent hosting or want more slots through an Element Club subscription.

What port does a FiveM server use?

FiveM servers use port 30120 by default, for both TCP and UDP. If you host at home, forward that port on your router so other players can connect.

Do you need to own GTA 5 to host a FiveM server?

The server itself only needs the FXServer files and a Cfx.re license key. Everyone who plays on it, including you, needs a legal copy of GTA 5 on PC and the FiveM client.

How many players can join a FiveM server for free?

Up to 48. To go higher you need a paid Element Club tier, which raises the limit to 64, 128 or as many as 2,048 players with OneSync Infinity.

Where do I get a FiveM license key?

From the Cfx.re Portal at portal.cfx.re. Log in with your Cfx.re account, create a key and paste it into txAdmin or into your server.cfg with sv_licenseKey.

Can I run a FiveM server on Linux?

Yes. Cfx.re provides a Linux build of FXServer, but calls it a courtesy port and says problems are more likely to be fixed on the Windows build.

More Grand Theft Auto V guides