Short answer. You can host a FiveM server yourself for free: download the recommended Linux FXServer build from Cfx.re, clone cfx-server-data, create a free licence key at portal.cfx.re, put it in server.cfg as sv_licenseKey, and open port 30120 for both TCP and UDP. Or rent a FiveM server and skip the setup.
Players join by finding your server in the in-game server list, or by pressing F8 in FiveM and typing connect your-ip:30120.
Build numbers checked in the Cfx.re feed on 5 November 2026: 38317 is the recommended Linux build and 38343 the latest.
This guide uses the Cfx.re documentation and the way our own FiveM servers are set up. To go straight to the rental route, see Option 2. Once you are running, How to join your FiveM server covers the player side.
What you need
A Cfx.re licence key. It is free, you register it with your own Cfx.re account on the Cfx.re Portal, and it goes in server.cfg as sv_licenseKey. A LAN-only server (sv_lan true) skips the licence key check, but it does not appear in the public server list.
A machine: Cfx.re's documentation covers both Linux and Windows and notes that the Linux build is only a courtesy port: issues are more likely to be fixed on the Windows version. Cfx.re does not publish hardware requirements on that page.
Git and xz: on Linux you need xz or xz-utils, plus Git if you clone the base server data.
Network: port 30120 over TCP and UDP, reachable from the internet. It comes from the endpoint_add_tcp and endpoint_add_udp lines in server.cfg.
The game: every player needs GTA V, installed and updated, plus the FiveM client.
The server software is free. You pay for the machine, power and bandwidth.
Option 1: host it yourself
Linux
Create the folders and download the server. Pick the recommended master Linux build on the Cfx.re server download page, copy its link, then:
mkdir -p ~/FXServer/server
cd ~/FXServer/server
wget <the link you copied>
tar xf fx.tar.xz
Clone the base server data outside the binaries folder.
Create server.cfg in ~/FXServer/server-data from the example config in the Cfx.re documentation, and put your key in it, in place of licenseKeyGoesHere. These lines matter most:
Cfx.re now marks sv_hostname as deprecated: set the name your server shows in the list on the Cfx.re Portal instead.
Start from the server-data folder. The folder and the +exec matter:
cd ~/FXServer/server-data && bash ~/FXServer/server/run.sh +exec server.cfg
Cfx.re lists the usual mistakes: "Failed to start resource" or no resources found means you did not run it from the right folder, a timeout or connection refused with no resources started means you left out +exec, and "no license key was specified" is usually one of those two.
Open the port. Allow 30120 for TCP and UDP in the firewall, and forward both on your router to this machine.
Windows
Download the recommended build (server.7z) from the Cfx.re server download page and extract it with 7-Zip or WinRAR, for example to C:\FXServer\server.
Double-click FXServer.exe. A setup page opens in your browser (this is txAdmin, FiveM's admin panel).
Make sure the PIN is filled in and click Link Account, log in to your Cfx account and click Yes, Allow, then create a password for the admin page and name the server.
Choose Popular Recipes and the CFX Default FiveM template. Other templates may need a database server.
Click Save, go to the Recipe Deployer and click Next. Enter your licence key in the Before you begin step, click Run Recipe, then Next again and finally Save & Run Server.
Allow port 30120 for TCP and UDP in Windows Firewall and forward it on your router.
Adding resources
A resource is a folder under resources, and it does nothing until something starts it, usually an ensure line in server.cfg. The example config already ensures mapmanager, chat, spawnmanager, sessionmanager, basic-gamemode, hardcap and rconlog. For more, see How to add mods to your FiveM server.
Option 2: host it on PlayNHost
Renting removes the downloads, the firewall and the update routine. The ports and the key lines in server.cfg are set up for you.
Pick a plan. Open the FiveM server hosting page and compare PATROL CAR, MUSCLE CAR and SUPERCAR, for 12, 25 and 48 players. Press Create Server on a plan (on SUPERCAR the button says Customize Plan) and finish the order. Prices change, so check them on that page.
Create your free licence key. Sign in at portal.cfx.re and create a key for your server. Keys are free and issued against your own Cfx.re account.
Paste it into Settings. When the server is ready (you get an email and it appears at panel.playnhost.com), open the Settings tab and paste the key into Cfx.re License Key. Server Hostname fills the sv_hostname line, which Cfx.re now marks as deprecated, so also set your server's name on the Cfx.re Portal.
Start. The panel shows the server as running once the console prints succeeded. Welcome!.
Join. Find your server by name in the FiveM server list, or press F8 in the client and use connect with your server address and game port.
What the panel does for you
Licence check before start. With no key set, the server does not try to boot. The console prints a notice telling you to create a key and paste it into Cfx.re License Key, then press Start again. So a new FiveM server stays stopped until the key is in.
Keys it writes at every start. The panel writes your game port into the endpoint_add_tcp and endpoint_add_udp lines of server.cfg, plus sv_hostname, sv_licenseKey and sv_maxclients. Hand edits to these lines are replaced at the next start, so change the hostname and key on the Settings tab. Max Players follows your plan.
Updates. Cfx.re stop supporting old server builds after a set window, and an unsupported build older than three months is no longer joinable from the server browser. Auto-update server is on by default (under Show advanced on the Settings tab). With it on, the panel checks the Cfx.re feed at every start and replaces only the server binaries (the alpine folder). Your resources, server.cfg and txData are not touched. It follows the fivem version channel, which is recommended by default. A pinned build number is left alone.
Resources.Resources to start takes a comma separated list of folder names under resources. At every start the panel writes an ensure line for each into server.cfg, and the console names any resource folder that nothing starts, because uploading a folder alone does not run it.
txAdmin.Enable txadmin is off by default. With it on, the server boots into txAdmin, which keeps its own config, so you add resources there instead of in Resources to start. txAdmin's browser page needs a port of its own, so open a ticket before you switch it on.
Self-hosting or renting: an honest comparison
Cost. Self-hosted: the software is free, and you pay for hardware, power and bandwidth. Rented: a recurring fee set by plan. See the current plans.
Availability. Self-hosted: as reliable as your machine and home internet, and it must stay on when players join. Rented: runs on the host's hardware.
Network exposure. Self-hosted: players connect to your public IP, and you manage the firewall and router. Rented: your home IP is not involved.
Skill needed. Self-hosted: command line or txAdmin, port forwarding, config editing. Rented: a web panel with form fields.
Updates. Self-hosted: download a new build and replace the old one yourself. Rented: Auto-update server handles it at every start.
Self-hosting suits you if a machine already runs all day and you like tinkering. Renting suits you if you would rather not look after hardware. When something goes wrong, see FiveM server problems and fixes.
We use cookies to keep the site working, to understand how it is used, and to measure our marketing. You can accept all, accept essential cookies only, or choose per category.We use cookies to keep the site working, to understand how it is used, and to measure our marketing. They are on by default here. You can switch off anything you do not want.Read our privacy policy