Log in Add Server

2023 FiveM tutorials break your server in 2026. Artifacts have changed, frameworks have evolved (QBox is gradually replacing QBCore), license rules have been updated, and half of the guides point to obsolete builds. This guide is up to date with the FiveM ecosystem of September 2026 and follows the official Cfx.re procedure for each step.

Key takeaways

  • The FiveM server (FXServer) is free. The license key is free for a non-commercial server up to 32 players.
  • txAdmin is the management panel built into FXServer. It handles deployment, restarts, players and resources from a web interface.
  • Port to open: TCP + UDP 30120 (game). txAdmin listens on port 40120 (web panel, local or secured access only).
  • GTA V is not required on the server machine. Only clients (players) must own the game.

Prerequisites

  • A Cfx.re account (free registration at forum.cfx.re)
  • A server license key (generated at portal.cfx.re)
  • Windows or Linux (64-bit). Linux recommended for a production server.
  • CPU: 4 high-frequency cores (3.5 GHz+). FiveM is mostly single-threaded: frequency per core matters more than the number of cores.
  • RAM: 4 GB minimum for a vanilla server, 8 GB for an RP server with a framework, 16-32 GB for a heavy RP server (200+ resources, custom vehicles and MLOs)
  • Storage: NVMe SSD recommended. Script packs, vehicles and maps grow quickly on an RP server (50 to 100 GB for a big server).
  • MariaDB or MySQL if you use an RP framework (management of characters, vehicles, money, inventories)

Generating the license key

Every FiveM server needs its own license key. The procedure takes two minutes.

  • Log in at portal.cfx.re with your Cfx.re account.
  • Go to "Server Registration Keys" and click "Create a key".
  • Enter a display name and click "Generate".
  • Copy the generated key. You will paste it into txAdmin during deployment.

The free key allows up to 32 players. Beyond that, you need to subscribe to an Element Club plan directly at Cfx.re (Argentum at €15/month for 48-64 slots, Aurum and Platinum to go up to 2,048 players). Streaming of custom assets (clothing, vehicles, interiors) is free up to 10 players. Beyond 10, the Element Club is required too.

Installing FXServer and txAdmin

Download the server artifacts from the official Cfx.re download page. Click "Latest recommended" to get the most recent stable build. Download the archive matching your OS (Windows or Linux).

Extract the archive into a dedicated folder:

Windows: unzip into a folder (for example C:\\fivem-server\\) and launch FXServer.exe.

Linux:

mkdir -p ~/fxserver && cd ~/fxserver
tar xf fx.tar.xz
./run.sh

txAdmin starts automatically and displays a 4-digit PIN in the console. Your browser opens at http://localhost:40120.

Initial txAdmin configuration

The procedure follows 8 steps, in accordance with the official Cfx.re documentation:

  • Enter the 4-digit PIN displayed in the console
  • Click "Link account" and authorize txAdmin to access your Cfx.re account
  • Set a backup password (write it down carefully, it protects access to your panel)
  • Accept the terms of use (Creator Platform License Agreement + txAdmin License)
  • Enter a server name, click Next
  • Deployment Type: choose "Popular Recipes"
  • Select Template: choose "FiveM Basic Server (CFX Default)" for a vanilla server, or an RP framework template (ESX, QBCore)
  • Click "Go to Recipe Deployer", follow the steps. At step 2, txAdmin asks you to paste your license key. Paste it and click "Run Recipe".

Wait for the deployment to finish. The server.cfg file appears. Click "Save and Run Server" to launch your server.

One point many people forget: on Windows, Microsoft Defender considerably slows down the first startup by scanning all FXServer files in real time. Exclude the server folder from antivirus scanning for normal performance.

Configuring server.cfg

The server.cfg file is generated by the recipe but you will need to edit it. Never share this file publicly: it contains your license key. The key parameters:

Parameter Description Example
sv_licenseKey Cfx.re license key (mandatory, without it the server refuses to start) sv_licenseKey "cfxk_xxxxxxxxxxxx"
sv_hostname Server name displayed in the list sv_hostname "My RP Server"
sv_maxclients Max number of players (32 free, up to 2,048 with Element Club) sv_maxclients 32
endpoint_add_tcp TCP listening address endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp UDP listening address endpoint_add_udp "0.0.0.0:30120"
set onesync on Enables OneSync (mandatory for 32+ players) set onesync on
sets tags Server tags for the FiveM browser sets tags "roleplay, qbcore, serious-rp"
sets locale Server's main language (BCP 47 format) sets locale "en-US"
ensure Loads a resource at startup ensure chat

Two mistakes everyone makes at least once: leaving sets tags "default" and sets locale "root-AQ" (the recipe's placeholders). Replace them before making the server public, otherwise your server appears without tags and with an invalid locale in the FiveM browser.

The following base resources must be loaded for a functional server:

  • ensure mapmanager (map management)
  • ensure chat (in-game chat)
  • ensure spawnmanager (player spawn management)
  • ensure sessionmanager (session management)
  • ensure hardcap (player count limitation)

These resources are included by default in txAdmin recipes. If you configure your server.cfg manually, do not forget them.

Choosing an RP framework

If you want a roleplay FiveM server (and that is what 90% of FiveM servers are), you need a framework. It is the base that handles characters, jobs, economy, vehicles, inventory and all the RP mechanics.

QBCore is the most widespread framework in 2026. Huge script library, massive community, abundant documentation. It is the default choice for a first RP server. Most of the resources available online are compatible with QBCore.

QBox is the community fork of QBCore, rebuilt for performance and security. It keeps compatibility with most existing QBCore scripts but fixes accumulated security flaws, uses ox_lib and ox_inventory by default, and receives regular updates. The QBox documentation is notably clearer than QBCore's. For a new server in 2026, QBox is the technically strongest choice.

ESX is the historic framework (the first major FiveM RP framework). Still maintained, massive documentation, but most new resources target QBCore or QBox first. Relevant if you take over an existing ESX project or find a pack of ESX resources that matches your vision.

The framework is deployed as a txAdmin recipe. During the initial configuration, choose the matching recipe instead of "CFX Default". txAdmin downloads and configures the framework automatically. The recipe will ask for your MySQL/MariaDB database credentials.

For a first server with no prior experience, start from the CFX Default template (no database, functional server in a few minutes). You can migrate to ESX or QBCore once you are comfortable with the ecosystem.

Database

An RP server needs a database to store characters, inventories, vehicles, properties and money. Without a database, nothing persists between sessions.

  • Install MariaDB (recommended) or MySQL. Do not use XAMPP: it causes performance and stability problems with FiveM.
  • Create a dedicated database and a user with full rights on that database.
  • Add the oxmysql resource (the standard MySQL connector for FiveM) to your resources folder.
  • Configure the connection in server.cfg: set mysql_connection_string "mysql://user:password@localhost/fivem?charset=utf8mb4"

The database contains everything your players have built: characters, progression, vehicles, properties. It is the most precious file on your server. Set up automatic daily backups from day one.

Adding resources

Resources are the Lua/JavaScript scripts that add features to your server: jobs, vehicles, weapons, HUD, housing system, etc. The procedure is always the same:

  • Download the resource (GitHub, Cfx.re forum, Cfx Marketplace)
  • Place the folder in resources/ (group them in subfolders: [esx], [qbcore], [maps])
  • Add ensure resource_name in server.cfg
  • Restart the server (or start the resource from txAdmin)

Add resources one by one and test after each addition. Stacking 50 scripts at once then looking for which one causes a crash is a guaranteed waste of time. Each added resource must have a clear manifest, documented dependencies, and a defined startup order.

Only download resources from reliable sources (Cfx.re forum, the frameworks' official GitHub repositories, Cfx Marketplace). "Leaked" or pirated scripts are a major source of backdoors and bans by Cfx.re. A free script found on an obscure Discord can give admin access to a stranger on your server.

Network configuration

FiveM uses port 30120 over TCP and UDP. Both protocols are required.

Port Protocol Usage
30120 TCP + UDP Game port (player connections)
40120 TCP txAdmin web panel (do not expose publicly)

Windows firewall:

New-NetFirewallRule -DisplayName "FiveM Server" -Direction Inbound -Protocol TCP -LocalPort 30120 -Action Allow
New-NetFirewallRule -DisplayName "FiveM Server UDP" -Direction Inbound -Protocol UDP -LocalPort 30120 -Action Allow

Linux firewall (ufw): sudo ufw allow 30120

Linux firewall (iptables):
sudo iptables -A INPUT -p tcp --dport 30120 -j ACCEPT
sudo iptables -A INPUT -p udp --dport 30120 -j ACCEPT

If you host at home, forward TCP + UDP 30120 on your router to the local IP of the server machine. Do not forward port 40120 (txAdmin) to the outside without protection: it is your administration panel, it must remain accessible only locally or via a VPN.

FiveM servers are heavily targeted by DDoS attacks, particularly competitive RP servers. Hosting at home has no DDoS protection. If you plan a public server with a community, a host with DDoS mitigation is the recommended choice.

Administration and backups

txAdmin centralizes all administration from the browser: management of connected players (kick, ban, warning), live console, scheduled restarts, performance monitoring, and crash protection.

Create several levels of administrators in txAdmin rather than sharing the main account. Each admin has their own access with specific permissions, and you keep track of who does what. It is the basis of security on a community server with several moderators.

  • Backups: regularly back up your MySQL database and your resources/ folder off the machine. Automate with a cron (Linux) or the Task Scheduler (Windows). A manual backup always ends up forgotten.
  • Updates: regularly replace the artifacts with a more recent "Recommended" version. Also keep your resources up to date to fix flaws and bugs.

Performance optimization

  • Monitor each resource's load with the resmon command in the console (or F8 in game). It displays the CPU time consumed by each script in real time. A single poorly optimized resource can drop the performance of the whole server.
  • Limit the number of active resources. Each script consumes CPU time on the main thread. Add them gradually and test after each addition.
  • Optimize database queries. Use oxmysql (asynchronous) and avoid synchronous queries in loops. Poorly managed database access is the number one cause of lag on RP servers.
  • Host on a high-frequency CPU and NVMe storage. FiveM is single-threaded: one fast core is worth more than 8 slow cores.
  • Schedule regular restarts through txAdmin (every 6 to 12 hours) to start again from a healthy memory baseline.

Hosting: at home vs host

Self-hosted: works for testing and developing with 2-3 friends. The machine must stay on 24/7, port 30120 must be forwarded, your public IP is exposed, and you have no DDoS protection. For a development server, it is fine. For a public server, it is strongly discouraged.

Server host: dedicated IP, DDoS protection, preinstalled txAdmin, included database, automatic backups. Most hosts offer one-click installs with the framework of your choice. It is the standard choice for any server aiming for more than 10 regular players. Cfx.re publishes a list of approved hosting partners: check that your host appears there to avoid compliance problems with FiveM's terms of use.

Frequently Asked Questions

Do I need to buy GTA V to host a FiveM server?

No. The FXServer server does not require GTA V. Only the players who connect must own the game (Legacy or Enhanced) and have the FiveM client installed. You can host a FiveM server on a Linux VPS that has never seen GTA V.

Is the license key free?

Yes, for a non-commercial server with up to 32 players. Beyond 32 slots, or for custom asset streaming (clothing, vehicles) with more than 10 players, an Element Club subscription is required (from €15/month at Cfx.re). The maximum technical limit is 2,048 players with Element Club Platinum.

QBCore, QBox or ESX in 2026?

For a new server, QBox is the most recommended choice in 2026. It keeps compatibility with the majority of QBCore scripts while offering better security and improved performance. QBCore remains the most widespread with the largest script library. ESX is viable for taking over an existing project. For a very first server with no experience, start with CFX Default (no framework) and migrate afterward.

How many resources can a server support?

It depends on script quality and hardware. A server with 50-80 well-optimized resources runs comfortably on 8 GB of RAM. A server with 200+ resources including custom MLOs and vehicle streaming needs 16-32 GB. The limiting factor is single-threaded CPU, not RAM. Use resmon to identify the resources that consume the most CPU time.

How do players connect?

Players open the FiveM client, search for your server by name in the server browser, or connect directly via the F8 console with connect your-ip:30120. The server appears in the FiveM browser once it is online with a valid license key, configured tags, and a correct locale.

Is txAdmin mandatory?

No, but there is no reason to go without it. txAdmin is built into FXServer, used by more than 29,000 servers worldwide, and offers recipe deployment, player management (ban, kick, warn), performance monitoring, scheduled restarts, crash protection, and a full in-game admin menu. Launching a FiveM server without txAdmin in 2026 means making your life needlessly complicated.

Can you host FiveM on Linux?

Yes. FXServer natively supports Linux. Download the Linux artifacts from the official page, unzip and run ./run.sh. Configuration is identical to Windows. Docker is also a viable option, with community-maintained images.

Reviews

No comments yet.

Comment

To comment, you must be logged in.