How to setup a FiveM server - KuzQuality | FiveM Scripts

How to setup a FiveM server

How to Set Up a FiveM Server

Setting up a FiveM server is not as complicated as it used to be. txAdmin is now bundled directly with FiveM server builds, and it walks you through most of the setup automatically. This guide covers the full process from scratch.


What You Need Before Starting

  • A Cfx.re account (free). Register at forum.cfx.re if you do not have one.
  • A server license key. Generated for free at portal.cfx.re/servers/registration-keys. Each account can hold up to three active keys.
  • A server or VPS running Windows or Linux, or a game server hosting provider.

Note: Keymaster has been replaced by the Cfx.re Portal as of December 2025. License keys are now generated and managed exclusively through portal.cfx.re.


Option 1: Game Server Hosting Provider

If you want the fastest path to a running server, a hosting provider is the easiest option. Most FiveM-compatible providers come with FiveM pre-installed and txAdmin pre-configured. The official list of approved providers can be found at docs.fivem.net.

After ordering, you typically get access to txAdmin through the hosting panel. Log in, link your Cfx.re account, paste your license key, and the server is ready to configure.

The tradeoff is monthly cost and less control over the underlying machine.


Option 2: Self-Hosted (Windows or Linux)

This option gives full control over the server environment. It takes a bit more setup but is not difficult.

Step 1: Download the Server Build

Go to the FiveM artifacts page:

Download the latest recommended build. Extract the contents to a folder, for example C:\FXServer\server on Windows.

Step 2: Run FXServer

On Windows, double-click FXServer.exe. On Linux, run the appropriate start script.

When the server starts for the first time, it opens txAdmin automatically in your browser at http://localhost:40120.

Step 3: Link Your Cfx.re Account

txAdmin will show a PIN and prompt you to link your Cfx.re account. Click Link Account, log in at the Cfx.re portal, and authorize the connection.

Step 4: Create a txAdmin Admin Account

Set a password for the txAdmin admin account. This is separate from your Cfx.re account password and is specific to this server.

Step 5: Configure the Server in txAdmin

txAdmin will walk you through the initial setup wizard:

  1. Server name — this shows in the server browser.
  2. Deployment type — select Popular Recipes for the easiest setup.
  3. Template— pick one:
    • CFX Default FiveM — a basic server with no framework. Good for testing.
    • ESX Legacy — the most widely used RP framework.
    • QBCore — another popular RP framework.
    • QBox — a modern, optimized fork of QBCore with full backwards compatibility.
  4. Data location — where server files will be stored. The default path is fine for most setups.
  5. License key — paste the key generated from the Cfx.re Portal.

After filling in the details, click Run Recipe. txAdmin will download and configure everything automatically.

Step 6: Save and Start the Server

Review the server.cfg file txAdmin generates. If everything looks correct, click Save and Run Server.

The server will start. Players can connect via direct connect using the server's public IP and port 30120.


Ports to Forward

For the server to be visible outside the local network, forward these ports to the server's local IP:

PortProtocolPurpose
30120TCP + UDPMain game connection port
30110UDPOptional (peer-to-peer voice)

If the server does not appear in the server list after starting, port forwarding is usually the cause.


Picking a Framework

Most RP servers run on a framework. Here is a quick overview:

  • No framework — full control, build from scratch. Not recommended unless scripting from the ground up.
  • ESX Legacy — the most established framework. Large ecosystem of compatible scripts.
  • QBox — a modern, optimized fork of QBCore. Better performance and cleaner architecture. Fully backwards compatible with most QBCore scripts. The recommended choice if going the QBCore route.
  • QBCore — the original. Still widely used but QBox has largely superseded it for new servers.

Framework choice is mostly preference and depends on what scripts are planned for the server.


After the Server Is Running

Once the server is up, the next steps are:

  • Adding scripts to resources/ and registering them in server.cfg with ensure script-name
  • Configuring the framework (jobs, items, vehicles, permissions)
  • Setting up a database if the framework requires one (ESX and QBCore both do)
  • Adding a custom server icon by placing a 96x96 pixel server.png in the root server folder

Common Issues

IssueLikely Cause
Server does not appear in browserPort 30120 not forwarded, or firewall blocking it
txAdmin not loading in browserFXServer did not start correctly, check console output
License key rejectedKey not generated from Portal, or already in use on another server
Recipe fails during setupNetwork issue or missing permissions on the install path

Summary

  1. Create a Cfx.re account and generate a license key at portal.cfx.re.
  2. Download the latest FXServer build for Windows or Linux.
  3. Run FXServer and complete the txAdmin setup wizard.
  4. Choose a template, paste the license key, and run the recipe.
  5. Forward port 30120 and start the server.