%
ISTANBUL'a taşınmamıza özel Oyun Sunucularında %10 İNDİRİM (sadece yeni müşterilere özel)
Game Servers

How to Set Up a FiveM Server: Step-by-Step txAdmin Guide

TheCrewHost TeamUpdated: 13 min read

Quick answer

To set up a FiveM server, create a free license key on the Cfx.re Portal, download the recommended FXServer build and launch it without +exec. The console prints a PIN and the address of txAdmin on port 40120. In txAdmin, link your Cfx.re account, pick a recipe (the frameworkless FiveM Basic Server, ESX Legacy, QBCore or Qbox), enter your license key and, if the recipe needs one, your MariaDB details, then deploy. Players connect on port 30120 by default, and OneSync is free up to 48 slots.

What do you need to run a FiveM server?

You need a Cfx.re account, a free license key tied to that account, the FXServer server software and a machine that can stay online around the clock. FXServer is the server side of the Cfx.re multiplayer platform for GTA V, published as separate Windows and Linux builds. Your players need a legitimate copy of GTA V and the FiveM client on their own PCs. If you plan to run a roleplay framework, add a MySQL-compatible database to the list, which in practice means MariaDB.

On the hardware side, single-thread CPU performance matters most. The main server thread (svMain), where scripts run, lives on one core, so a single slow script drags down every player at once. RAM needs grow with the number of resources and players. Storage speed matters more than people expect: once you add vehicle, map and clothing packs, the server folder can grow to tens of gigabytes, and those files have to reach joining players quickly, which is where NVMe helps.

  • A Cfx.re account and a license key created on the Cfx.re Portal
  • The recommended build of the FXServer artifacts
  • Open ports: 30120 TCP and UDP for the game, 40120 TCP for txAdmin
  • MariaDB plus the oxmysql resource if you run a framework
  • SFTP or a panel file manager for uploading resources

How do you get a Cfx.re license key?

You get the license key for free from the Cfx.re Portal: sign in with your Cfx.re account, open the server registration keys section and generate a new key. Without a key, FXServer will not accept players. The key goes on the sv_licenseKey line of server.cfg; if you use txAdmin, the setup wizard asks for it and writes it into the file for you.

Treat the key like a password. Keep it out of screenshots, Discord messages and public GitHub repositories, and if you think it leaked, delete it on the Portal and generate a new one. One detail matters a lot if you plan to buy paid, escrow-protected scripts: they only run when they are granted to the same Cfx.re account that owns the server license key. Buy assets on the account that created the key.

How does the txAdmin setup work?

txAdmin is the web-based management panel bundled with FXServer, so there is nothing extra to install. Start FXServer without the +exec server.cfg argument and txAdmin takes over: the console shows the panel address and a one-time PIN. Open port 40120 on your server IP in a browser, enter the PIN, link your Cfx.re account and choose a password for the panel. On Windows you launch FXServer.exe; on Linux you run the run.sh script.

The wizard then asks for a server name and a deployment type. Popular Recipes lists ready-made templates, including the frameworkless FiveM Basic Server, ESX Legacy, QBCore and Qbox. After picking a recipe, you choose the folder for the server data, paste your license key and, when the template uses a database, enter your MariaDB connection details. The Recipe Deployer downloads the resources, prepares the database and writes server.cfg; you review the file on the last screen and start the server.

The real value of txAdmin shows up in day-to-day management: live console, player list, bans, warnings and whitelist, resource restarts, scheduled restarts with in-game announcements and an in-game admin menu, all in one place. On a managed game server, installation and the startup command are usually handled from the host's panel. If you want complete control over txAdmin and the database, a VPS with root access gives you the most flexible foundation.

What belongs in server.cfg?

server.cfg is the configuration file FXServer reads line by line at startup; it defines your server's identity, networking and the resources to start. The table below covers the lines you will find in almost every healthy server. Mind one distinction: variables set with sets are public and appear in the server list, while variables set with set are readable only by the server and its scripts. Never put passwords or API keys on a sets line.

Order matters. ensure lines run top to bottom, so dependencies such as oxmysql and ox_lib come first, then the framework core, then jobs, vehicles and maps. Splitting the file as it grows is a good habit; the exec command lets you pull in separate files like permissions.cfg or resources.cfg from the main server.cfg. Setting sv_master1 to an empty value marks the server private, so it can no longer be joined through the server browser.

LineWhat it doesNote
endpoint_add_tcp / endpoint_add_udpSets the IP and port the server listens onDefault 0.0.0.0:30120; both usually use the same port
sv_licenseKeyYour Cfx.re license keyNo key, no players
sv_hostnameName shown in the server listKeep it short and searchable
sets sv_projectName / sv_projectDescProject name and description in the listWrite the description as a sentence
sets tags / sets localeFilter tags and server languageFor example en-US or tr-TR
sv_maxclientsMaximum player countFree up to 48 with OneSync
set onesync onEnables OneSyncCurrent frameworks expect it
load_server_iconIcon shown in the server listMust be a 96x96 PNG
sv_enforceGameBuildSelects the GTA V game build (DLC level) clients useCan only be set at startup
set mysql_connection_stringoxmysql database connectionNever share it in public files
sv_scriptHookAllowed 0Blocks players using Script Hook VAllowing it raises cheating risk
sv_endpointPrivacy trueHides player IPs from public reportsRecommended for privacy

What is OneSync and should you enable it?

OneSync is Cfx.re's server-side state synchronization system, and virtually every new server should run with it enabled. Without OneSync a server is capped at 32 slots. With it, slot counts go up and the state of entities such as vehicles, peds and objects lives on the server, which gives you a much sturdier base for both anti-cheat and scripting.

OneSync is free up to 48 slots; a higher sv_maxclients value requires an Element Club Argentum or higher subscription from the Cfx.re Portal, and the technical ceiling is 2048 players. To enable it, add set onesync on to server.cfg. Under OneSync, players only see entities near them, and that culling can break old scripts that try to reach a distant player's ped from the client side. Current ESX Legacy, QBCore and Qbox resources are written for OneSync and rarely have this problem.

ESX vs QBCore vs Qbox: which framework fits your server?

A framework is the skeleton of a roleplay server: it provides characters, jobs, inventory, money and vehicle ownership, and every script you add is written against its API. All three major options are free, open source and deployable through a txAdmin recipe. The right pick depends on which framework the scripts you want actually support, because moving scripts between frameworks usually means porting work.

Whichever you choose, never run two frameworks on one server, and check each paid script's description for the frameworks it supports. Switching frameworks after launch also means migrating your database.

FrameworkCore resourceStrengthWatch out for
ESX Legacyes_extendedActively maintained branch of ESX, the longest-running framework with the largest script libraryScripts written for old ESX versions may need porting
QBCoreqb-coreClean structure, many free qb- scripts, large communityThird-party script quality varies widely
Qboxqbx_coreFork of QBCore built on Overextended's ox resources; backwards compatible with most QBCore scriptsRequires MariaDB 10.9 or newer; XAMPP is not supported
No framework (FiveM Basic Server)Default Cfx.re resourcesLightweight start for racing, drifting, freeroam and minigame serversYou add economy, inventory and jobs yourself

How do you connect MariaDB with oxmysql?

Frameworks store players, inventories, vehicles and bank balances in a MySQL-compatible database, and on the FiveM side the oxmysql resource handles that connection. The oxmysql documentation explicitly recommends MariaDB for compatibility and performance and advises against development bundles like XAMPP for a live server. Since Qbox needs at least MariaDB 10.9, installing a current LTS release is the safe choice for all three frameworks.

You configure the connection with the mysql_connection_string variable in server.cfg, which accepts two formats: a URI starting with mysql:// that contains the user, password, host, port and database name, or a semicolon-separated list of user, password, host, port and database fields. Semicolons, commas, slashes, question marks, colons, at signs, ampersands, equals and plus signs are reserved in one format or the other, so an alphanumeric database password saves you trouble; if one format refuses to connect, try the other.

Plan database backups separately from file backups, because copying the server folder does not save characters or inventories. Export regularly with mysqldump and store the dumps off the server. Running the database on the same machine as the game server keeps query latency minimal, and on large servers adding indexes to slow queries is one of the most common fixes for server-side hitches.

How do you add resources and streamed assets?

In FiveM every script, map or vehicle pack is a resource: a folder under resources containing a manifest file named fxmanifest.lua. The manifest starts with fx_version 'cerulean' and game 'gta5', then declares which client and server scripts the resource runs. Folders in square brackets, such as [qb] or [standalone], act as categories, and a single ensure [qb] line starts every resource inside one.

Custom content like vehicles, clothing, MLO interiors and maps arrives through streaming: any .ytd, .ydr, .yft, .ymap or .ytyp file placed in a resource's stream folder is sent to players automatically. Add-on vehicles also need their meta files, such as vehicles.meta, carvariations.meta and handling.meta, declared with data_file lines in the manifest. If the console prints an oversized asset warning, shrink that file's textures; oversized assets can cause texture loss and models that never load for players.

After uploading a resource via the file manager or SFTP, you do not need to shut the server down: the refresh command rescans the resource list and ensure followed by the resource name starts or restarts it. Large streaming packs lengthen every player's first join, so add vehicles and maps because you need them, not because you can. Stay away from leaked scripts; they can contain malicious code and they break Cfx.re's rules.

How do ACE permissions work for admins?

FiveM's built-in permission system is the ACE (Access Control Entry) list, driven by two commands: add_ace grants a permission to a group or identity, and add_principal makes an identity inherit from a group. The classic pair is add_ace group.admin command allow, which opens every command to the admin group, and add_principal identifier.fivem:123456 group.admin, which puts that Cfx.re account into the group. To restrict a single command, define its command.name object with deny.

You can use license, fivem, discord or steam identifiers; steam identifiers only resolve when steam_webApiKey is set on the server. The easiest way to grab a player's identifiers is the txAdmin player window. txAdmin's own admin manager is separate and controls panel and in-game menu access. Frameworks add their own roles on top: ESX stores a user group in the database, while QBCore and Qbox use ACE-based groups. That is why a staff member may need to be set up in the framework and in txAdmin.

How do you measure performance and keep the server updated and compliant?

Most performance problems come from scripts, not hardware, and resmon is your first diagnostic tool. Type resmon 1 into the F8 console in game to see each resource's client-side CPU time and memory; a resource that stays high while idle usually runs pointless loops with Wait(0). On the server, profiler record captures a few hundred frames and profiler view lets you inspect them, while the txAdmin performance chart plots the svMain, svNetwork and svSync threads against player count. Frequent server thread hitch warnings in the console point to a script or slow query blocking the main loop.

Cfx.re ships server artifacts often; on a live server use the recommended build rather than the newest bleeding-edge one, and txAdmin updates along with the artifacts. Track framework and script updates through their GitHub releases, take a file and database backup before every update and test changes on a staging copy when you can. Scheduled restarts in txAdmin also limit the damage from resources that leak memory. TheCrewHost runs FiveM servers on the Ryzen 9 9950X for strong single-core speed, but no hardware can rescue an unoptimized script on its own.

FiveM is a platform with rules: you are expected to run your server within Cfx.re's platform license agreement and terms of service. Monetization such as donations, VIP perks or in-game sales is only allowed through the methods and within the limits Cfx.re permits, and using unlicensed copyrighted content or leaked resources can get a server sanctioned. Read the current rules on the official Cfx.re website before launch; it is a prerequisite for a community that lasts.

Set up a FiveM server with txAdmin in 8 steps

  1. 1

    Create your license key

    Sign in to the Cfx.re Portal with your Cfx.re account, generate a new key in the server registration keys section and store it somewhere safe.

  2. 2

    Prepare the server

    Choose a managed game server or a VPS with root access, and make sure ports 30120 TCP and UDP for the game and 40120 TCP for txAdmin are open.

  3. 3

    Download FXServer

    Download the recommended FXServer build for Windows or Linux and extract it to an empty folder. If you plan to run a framework, install MariaDB now and create a database user.

  4. 4

    Launch txAdmin

    Run FXServer.exe, or run.sh on Linux, without the +exec argument, open the panel on port 40120 with the PIN from the console and link your Cfx.re account.

  5. 5

    Pick and deploy a recipe

    Under Popular Recipes choose the FiveM Basic Server, ESX Legacy, QBCore or Qbox, enter your license key and database details, and let the Recipe Deployer finish.

  6. 6

    Edit server.cfg

    Check the hostname, description, tags, sets locale, sv_maxclients and set onesync on lines, and add a 96x96 PNG as the server icon.

  7. 7

    Set up permissions

    Grant panel access in the txAdmin admin manager, add yourself to the ACE admin group with an add_principal line and assign the framework's own admin role.

  8. 8

    Test and back up

    Connect from the F8 console using connect with your IP and port 30120, check resources with resmon, take your first file and database backup, then add new resources one at a time.

Frequently Asked Questions

Does it cost money to run a FiveM server?

The software side is free: FXServer, txAdmin and the Cfx.re license key cost nothing, and OneSync is free up to 48 slots. Going beyond 48 slots requires an Element Club Argentum or higher subscription from the Cfx.re Portal. The real cost is the hardware or hosting that keeps the server online around the clock, plus any paid scripts, MLO interiors or vehicle packs you decide to buy.

How much RAM does a FiveM server need?

A small test or freeroam server without a framework runs comfortably on a few gigabytes. For a 32 to 64 player roleplay server on ESX, QBCore or Qbox with a moderate script list, 8 GB is a sensible starting point; hundreds of resources, heavy streaming and more than 100 players can push you to 12 to 16 GB or beyond. Add headroom for the database if it runs on the same machine. TheCrewHost FiveM plans range from 6 GB to 32 GB, and you can upgrade whenever you need to.

How do players join a FiveM server?

If the server is public, players find it by searching its name in the FiveM client's server browser. To connect directly, they open the F8 console and type connect followed by the server IP and port, which is 30120 by default. If it does not show up, check the license key and the open ports. For an invite-only community, turn on the whitelist in txAdmin.

Should I choose ESX, QBCore or Qbox?

Pick the framework your must-have scripts support. ESX Legacy and QBCore have the biggest catalogs of ready-made scripts; Qbox offers a more modern codebase built around ox_lib and the other Overextended resources while still running most QBCore scripts. Switching later means migrating the database and porting scripts, so decide before launch.

Why won't a script I bought start on my server?

The most common cause is escrow: paid resources only load when they are granted to the Cfx.re account that owns the server license key, so check on the Cfx.re Portal which account the script belongs to. The second cause is missing dependencies; ox_lib, oxmysql or the framework core must be ensured before the script. Finally, very old server artifacts may not run newer scripts, and updating to the recommended build usually fixes that.

Can a FiveM server run on Linux?

Yes. Cfx.re publishes FXServer as separate Windows and Linux builds; on Linux you start the server with the run.sh script and txAdmin works the same way. Most resources are written in Lua, JavaScript or C# and do not care about the operating system. The one gotcha is that Linux file names are case-sensitive, so a resource that works on Windows can fail with file-not-found errors on Linux because of a mismatched letter case in its manifest.

Connect with our community of gamers and developers

Get instant support, share experiences, and stay updated with the latest news

Join Discord