ClouduxeDocs

Running a FiveM server

What a FiveM server is made of, the ports it needs on TCP and UDP 30120, and which guide to read next.

A FiveM server is the Cfx.re server binary, FXServer, running on a machine you have root on. It loads a folder of resources, reads a server.cfg, authenticates against Cfx.re with a licence key, and listens on TCP and UDP 30120 by default.

Nothing about it is specific to a host. A Clouduxe VPS or dedicated server is a normal Linux machine with root access, so you install FiveM on it the same way you would anywhere else. The pages below are the walkthrough.

The pieces

Five things make up a running server. These names are used consistently across every FiveM page here.

Artifacts are the server build itself. Cfx.re compiles FXServer and publishes each build as a versioned archive; you download one, unpack it, and run it. You never compile anything. Updating the server means replacing this folder, and nothing else. See Updating FiveM artifacts.

Resources are everything that runs on top of the server: the gamemode, a framework such as ESX or QBCore, maps, vehicles, and every script you add. A resource is a folder containing an fxmanifest.lua, placed under resources/. Folders whose names are in square brackets, such as [gamemodes], group resources on disk and are not resources themselves.

server.cfg is the configuration file the server reads at startup. It sets the ports, the server name, the player cap, the licence key, and the list of resources to start. See Configuring server.cfg.

txAdmin is the web admin panel that ships inside the artifacts. It starts, stops, and restarts the server, streams the console, edits server.cfg, and handles bans and admin accounts. It listens on TCP 40120 and is a separate thing from the game server it supervises.

The keymaster licence key is a per-server key you create at keymaster.fivem.net. It goes in sv_licenseKey. Without a valid key the server starts, fails authentication, and shuts down.

Most servers add a sixth piece: a database. Frameworks such as ESX and QBCore store players, characters, and inventories in MySQL or MariaDB, usually installed on the same machine. A bare FXServer with the default resources needs no database at all.

What it needs from a machine

FiveM's server workload is dominated by one thread. The main game thread handles the tick for every resource, so single-core clock speed decides how many players and scripts a server carries before it starts to hitch. More cores help with everything around that thread, including the database and streaming, but they do not raise the ceiling on the game thread itself.

Memory and disk scale with what you install rather than with player count. The base server and default resources are small. A roleplay server with custom vehicles, clothing, and map assets can be tens of gigabytes of streamed files and a much larger resident footprint. Size the machine against the resource set you actually intend to run, not against a player number.

You can measure all of it on your own server once it is up: txAdmin's dashboard charts server performance and shows where the tick time is going, and htop and free -h on the host show what the process is actually using.

The artifacts run on Debian and Ubuntu without any language runtime or library stack of your own. The Linux build ships a small Alpine root filesystem and runs under proot, so the distribution packages on the host barely matter.

The ports it uses

PortProtocolWhat uses it
30120UDPGameplay traffic. Every connected player.
30120TCPThe HTTP endpoint: join handshake, resource downloads, and the info.json, players.json and dynamic.json replies the server list reads.
40120TCPtxAdmin's web interface. Administrative, not player traffic.
443TCP, outboundLicence authentication and server list heartbeats to Cfx.re.

Both 30120 entries are the default and they are set separately, with endpoint_add_tcp and endpoint_add_udp. If you move the server to another port, move both.

The TCP side is not optional. A join begins over the HTTP endpoint before any gameplay packet is sent, and the server list fetches your server's name, player count, and tags from that same endpoint. With UDP 30120 open and TCP 30120 blocked, the listing goes blank and nobody can complete a join, which looks nothing like a firewall problem from the inside.

That endpoint answers those requests without authentication, from anywhere. Two consequences worth knowing: anything you publish through sets convars is public by design, and the server icon is served in that reply, so an oversized image makes every one of those replies large. Keep the icon at the small PNG size the server list expects.

Opening the ports on Clouduxe

The FiveM (GTA RP) preset on the Firewall tab opens TCP and UDP 30120 in one step. See Game presets for what it writes, or Port rules to add the rules by hand. Leave 40120 closed to the internet and reach txAdmin over an SSH tunnel instead.