Workload · Hosting a FiveM roleplay city

FiveM server hosting for your roleplay community

To host a FiveM server you run FXServer, the free server from Cfx.re, on your own rented machine, give it a free key you create on the Cfx.re Portal, and let players in on port 30120. The friendliest route is the one Cfx.re itself suggests: Windows plus txAdmin, the web panel that ships inside FXServer and deploys your framework from a recipe. Here is that route on a whole server you rent by the month, step by step.

The short version
  1. Cfx.re recommends its Windows build
  2. txAdmin sets up the server from a recipe
  3. Players connect on 30120, TCP and UDP
  4. 48 slots free, more with a Cfx.re tier
  5. Monthly, no contract, nobody else on the box

Before you order anything

  1. Make a Cfx account. Sign up on the Cfx.re forum and confirm the email. You will link it to txAdmin later.
  2. Create a key on the Portal. It is free, and without it FXServer complains that it has no license key.
  3. Read the Platform License Agreement. Cfx.re's download page says that downloading a server build means you accept it.
  4. Decide on a framework. ESX, QBCore, Qbox, ND and vRP are the FiveM ones Cfx.re lists. It doesn't support any of them itself, so their own docs are where you go for help.

One thing you won't find anywhere official is a hardware list. Cfx.re doesn't publish CPU or memory requirements for FXServer, so the honest answer to "how big a server?" is: it depends on your scripts, your custom cars and maps, and how many people log in at once. Start sensibly and watch it on a busy night.

Why Windows makes sense here

Most games run just as well on Linux. FiveM is the exception worth knowing about: Cfx.re calls its Linux server a courtesy port, and says bugs are more likely to get fixed if you're on Windows. So if you want the path with the fewest surprises, choose Windows Server when you order. The licence is added on the order form and costs the same each month, even when you pay for several months ahead.

Prefer Linux and comfortable with a terminal? That works too; the Linux steps are further down, and our Linux servers page lists the systems you can install.

Up and running in an evening

  1. Sign in to the new server's desktop as Administrator.
  2. Install 7-Zip (Cfx.re suggests it for the .7z download).
  3. On the Server Download page at Cfx.re, take the Recommended build for Windows and extract it to C:\FXServer\server.
  4. Open PowerShell as Administrator and paste the block below. It checks that Windows Firewall is on, turns off its first-start pop-up, and opens the game port. It must print ok.
  5. Double-click FXServer.exe. A browser tab opens on the server with a PIN already filled in; click Link Account and approve it with your Cfx account.
  6. Create the password for your admin panel, give the server a name, and pick a recipe (Cfx.re's own walkthrough picks CFX Default FiveM; framework recipes may want a database).
  7. Paste your license key when the deployer asks, check the recipe, and click Save & Run Server.
# PowerShell as Administrator
# every profile must be on, and must not allow inbound traffic by default
# (NotConfigured means the built-in default, which is Block)
$bad = Get-NetFirewallProfile | Where-Object { $_.Enabled -ne 'True' -or $_.DefaultInboundAction -eq 'Allow' }
if ($bad) { 'STOP: check the firewall on: ' + ($bad.Name -join ', ') } else {
  # no pop-up when FXServer first listens, so no rule is made for it by accident
  Set-NetFirewallProfile -All -NotifyOnListen False
  New-NetFirewallRule -DisplayName 'FiveM game TCP 30120' -Direction Inbound -Protocol TCP -LocalPort 30120 -Action Allow
  New-NetFirewallRule -DisplayName 'FiveM game UDP 30120' -Direction Inbound -Protocol UDP -LocalPort 30120 -Action Allow
  'ok'
}

txAdmin's panel listens on port 40120, and whoever types the PIN first becomes its master admin. Windows Firewall blocks any inbound connection that no rule allows, which is what keeps 40120 private.

Why switch the pop-up off? Microsoft's firewall rules article says that cancelling it or answering no creates block rules for the program, and a block rule beats your allow rules, so players would be shut out of 30120. Allowing it instead opens every port FXServer listens on, 40120 included. With the pop-up off, neither happens. Later, reach the panel from the server's own desktop at http://localhost:40120.

What txAdmin writes into server.cfg

The recipe deployer writes a server.cfg for you, and txAdmin has an editor for it. These are the lines worth recognising, as they appear in Cfx.re's own sample file, which is also what you would write by hand on a server set up without txAdmin:

# players connect here, over TCP and UDP
endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"
set onesync on
sv_maxclients 48
sv_licenseKey "your-key-from-the-portal"
# keep the # in front of this one, or the server lists as private
#sv_master1 ""

Because the file holds your key, treat it like a password: don't paste it into a support chat or a public repository.

If you'd rather run it on Linux

Cfx.re offers a Linux build too, as a courtesy port. The panel works the same way; the difference is that you reach it from home through an SSH tunnel, so port 40120 never has to face the internet. On Ubuntu, as root, switch the firewall on before the server ever starts:

# IPv6 rules too, then SSH, then on; 40120 never gets a rule
sed -i 's/^IPV6=.*/IPV6=yes/' /etc/default/ufw
ufw allow OpenSSH
ufw --force enable
ufw allow 30120/tcp
ufw allow 30120/udp

Unpack the Linux Recommended build as an ordinary user rather than root and start it with bash run.sh; with no +exec it starts txAdmin and prints the PIN in its console. Then, on your own PC, run ssh -L 40120:localhost:40120 you@server-ip, open http://localhost:40120 in your browser, and carry on from the PIN step above.

Keeping your city online

  • Disconnect, don't sign out. FXServer runs in its console window. If you use Remote Desktop, close the window with its X to disconnect and the server keeps running; signing out of Windows closes every program you started, the server included. After a reboot, start FXServer.exe again.
  • Use txAdmin's schedule for daily restarts; it warns players in game before each one.
  • Slow first start? Cfx.re's support pages blame Microsoft Defender scanning the server files, and suggest Add-MpPreference -ExclusionPath 'C:\FXServer\' in an Administrator PowerShell. That stops Defender checking anything in the folder, so only add resources you trust.
  • Update by extracting the newer Recommended build into a new folder, stopping the server, and swapping the folders. txData sits outside the server folder, so it stays put.

Growing past 48 players

FiveM's OneSync system, which keeps everyone's world in sync on the server, costs nothing for up to 48 slots. To go higher, Cfx.re asks for a subscription at the Element Club Argentum tier or above, bought on the Portal; then you use the latest server build, raise sv_maxclients up to the slot count your tier allows, and restart. The setting itself accepts 1 to 2048.

Want to build quietly before you open the doors? Cfx.re's sample config shows that un-commenting sv_master1 "" lists the server as private; put the # back when you launch. Friends can still join straight away by pressing F8 in FiveM and typing connect followed by your IP and :30120.

The server that fits

Our game server table ranks every processor we sell whose single-core PassMark score is at least 2,000, fastest first. That 2,000 mark comes from Satisfactory's server guide; Cfx.re doesn't name a score for FiveM. For a single roleplay city, look first at Intel's Xeon E3-1585L v5 build: it comes with an NVMe drive and is sold in all five of our cities. If you'll also run a test copy of your city, a database and a Discord bot beside it, look at the processors with more cores and room for more memory.

A server we've already racked is yours about 30 minutes after your order is approved (the payment check comes first and is the part that varies); a machine built to your spec needs 4 to 24 hours when we hold the parts, and longer when one has to be bought in. The port isn't shared with another customer at the access switch and nothing meters it, which helps when every newcomer downloads your custom resources the moment they join. Check the ready-to-go list if you want to start tonight.

A database, and keeping copies

Framework recipes usually ask for a database host, user, password and name while they deploy. Install a MySQL-compatible database such as MariaDB on the same Windows server, give the recipe its own user, and don't add a firewall rule for the database port: the game connects from the same machine. If the installer offers to allow remote root access or to open its port in the firewall, leave both off.

You manage the server; we keep the hardware and the network running. So the copies are yours to make: txAdmin's txData folder (on Windows it sits next to your server folder, so C:\FXServer\txData) holds the deployed server, its server.cfg and txAdmin's admins. Copy it, along with a dump of the database, to somewhere that isn't this server. The server.cfg holds your license key, so keep those copies private.

Questions people ask

Is FiveM free to host?
The server software and the license key are free from Cfx.re. You pay for the hardware underneath, and for a Cfx.re subscription only if you want more than 48 player slots. Framework scripts and paid resources are separate, from whoever makes them.
Why isn't my city showing in the server browser?
Usually it's the firewall. Try a direct connect from the F8 console, and open http://your-ip:30120/info.json in a browser on your own computer, not on the server: if it shows server details, the port is open. Make sure the sv_master1 line still starts with #. Cfx.re says a freshly started server may need as long as 8 minutes before it shows.
Can I run a test server next to my live one?
Yes. txAdmin strongly encourages a separate txData folder for each server, so their admin files don't clash. Its documentation does this with environment variables set before FXServer starts, for example a .bat file that runs set TXHOST_DATA_PATH=C:\FXServer\txData-test, set TXHOST_TXA_PORT=40125 and set TXHOST_FXS_PORT=30125, then starts FXServer.exe. In the firewall, open only that second game port, for both TCP and UDP.
Do you install FiveM or my framework for me?
No. You get the whole machine with Administrator access and set up FiveM the way you like. If you get stuck, our chat answers in seconds and a person takes over whenever you ask.
Is Linux cheaper for a FiveM server?
Linux needs no Windows licence, so the monthly cost is lower. The trade-off is that Cfx.re treats its Linux build as a courtesy port and fixes Windows problems first. If you know Linux well, it is a reasonable choice.

Give your city a server of its own

Pick a fast processor and a city close to the people who'll play, then install FXServer the moment it is handed over. Monthly, no contract.

Start your FiveM server

Read next