How to Make a FiveM Server: Complete 2026 Guide
To make a FiveM server you need a free license key from the Cfx.re Portal, a computer or VPS that can run the FiveM server files, and txAdmin to set up the server from a recipe such as QBCore or ESX. Then you open port 30120 on TCP and UDP and connect from FiveM. On a Linux VPS you can do the steps by hand or use one command with the FiveMRides installer.
Affiliate disclosure. Some links are affiliate links: if you buy through them we may earn a commission at no extra cost to you. Contabo is our hosting partner and our first pick; we say so openly.
- Get a free server license key at portal.cfx.re (older guides call it Keymaster).
- Choose where it runs: your own PC for testing, or a VPS for a public server.
- Download the FiveM server files (artifacts) and start them, which starts txAdmin.
- Deploy a recipe in txAdmin (QBCore, ESX or the default FiveM setup) and enter your key and database details.
- Open port 30120 (TCP and UDP) and connect from the FiveM client.
What you need before you start
- A copy of GTA V on the PC you play from. The server does not include the game.
- The FiveM client installed from the official site.
- A Cfx.re account to log in to txAdmin and the Portal.
- A machine for the server: your PC for a private test, or a rented VPS for a server friends can reach all day.
Step 1: get a license key
Every FiveM server needs a license key tied to your Cfx.re account. Create one for free in the Cfx.re Portal and keep it private, because anyone who has it can run a server under your name. In the server config it is set with sv_licenseKey. Never post the key in screenshots or support requests.
Step 2: choose where the server runs
Your own PC (testing)
Fine to learn and test. Friends outside your home network cannot join unless you forward ports on your router, and your home IP becomes public. Not recommended for a public server.
A VPS or dedicated server (public server)
A VPS has its own public address and is on all day. For a framework server (QBCore, ESX) with a database, a VPS with root access is usually a better fit than a slot-based game hosting plan. Our best VPS for FiveM guide covers specs, locations and hosts. A server is Windows or Linux; if you are unsure, read Windows vs Linux. The rest of this guide uses Linux.
A Contabo Performance VPS gives you plenty of RAM for scripts, maps and cars, recent AMD EPYC CPUs with NVMe storage, always-on DDoS protection included, and monthly terms. Pick the location closest to your players.
See Contabo VPS plans Why we pick Contabo
Contabo is our hosting partner: we may earn a commission at no extra cost to you.
Step 3: install the server
Option A: by hand
Summary of the manual path (full commands in the Linux install guide):
- Update the system and install the tools you need (
xz-utils,wget,git, a database server). - Create a normal user for the game server.
- Download the Linux FiveM server build from the official artifacts page and extract it.
- Start
run.shwithout a config so txAdmin starts, then open txAdmin in a browser. - Deploy a recipe and create the database.
- Open the firewall for the game port.
- Run the server as a service so it restarts after reboot, and set up backups and updates yourself.
Option B: one command with the FiveMRides installer
On a fresh Debian 12 or 13 (or Ubuntu 22.04 and newer) VPS, as root:
apt-get update && apt-get install -y curl && bash <(curl -fsSL https://fivemrides.com/installer/setup.sh)
A guided wizard asks for your language (English, French or Spanish), a profile, your framework and a few details. It then installs the FiveM server, txAdmin, a tuned MariaDB database, a firewall, services that restart on boot, automatic updates and backups, and the web panel. The installer asks for a FiveMRides Server Panel license key before it starts; see the panel page.
The FiveMRides Server Panel installs a FiveM server on your own Linux VPS with one command, then gives you a web panel for updates, backups and protection. One lifetime license, and it is also included with Studio Max and Unlimited. FiveMRides is independent software and is not affiliated with Cfx.re or Rockstar Games.
Step 4: set up the server in txAdmin
txAdmin is the web interface that comes with the FiveM server files. When the server starts without a +exec server.cfg argument, txAdmin starts and prints a link in the console, normally on port 40120. Open it, link your Cfx.re account and follow the setup. Our txAdmin on Linux guide covers the steps and common errors.
Choose a recipe
A recipe is a ready-made list of steps that downloads a base server and resources. In the deployer you pick one of the available recipes. The default Cfx.re recipe gives a basic server. Framework recipes for roleplay, such as QBCore and ESX, add a roleplay framework and a set of resources, and they need a database. Names and availability of recipes change, so use the list shown in your txAdmin.
Database details
Framework recipes ask for a MariaDB or MySQL connection. Create a database and a dedicated user (not root) and enter the details in the deployer. Examples use a documentation address like 203.0.113.10; use your own.
Step 5: connect to your server
- Start the server from txAdmin and wait for it to finish loading.
- Open FiveM. In the F8 console, type
connect 203.0.113.10:30120using your server’s address, or use direct connect. - If you cannot connect, check the ports below first.
Ports to open
| Port | Protocol | Purpose | Open to |
|---|---|---|---|
| 30120 | TCP and UDP | Players connect here | Everyone |
| 40120 | TCP | txAdmin (default) | Only your IP, or use a tunnel |
| 22 | TCP | SSH | Only your IP, key login |
The official setup page shows the server binding TCP and UDP on 30120. Both must be reachable. Check the host firewall too, since many providers also have a firewall in their dashboard.
After it works
- Set the server name and slots in txAdmin, and set
onesync onfor 32 slots and above. - Add admins in txAdmin, not by sharing the owner login.
- Set up daily backups and keep one copy offsite.
- Read our DDoS protection guide before you go public.
- Only use resources you have the right to use, and follow the Cfx.re and Rockstar rules for servers.
Questions about making a FiveM server
Is it free to make a FiveM server?
The license key and server software are free. You pay for the computer or VPS that runs it, and for any paid scripts or add-ons you choose.
Do I need a VPS to make a FiveM server?
For testing at home, no. For a public server that stays online, a VPS or dedicated server is the usual choice.
How do I get a FiveM server license key?
Create it for free in the Cfx.re Portal at portal.cfx.re, with your Cfx.re account, then put it in sv_licenseKey or enter it in the txAdmin setup.
QBCore or ESX, which should I choose?
Both are popular roleplay frameworks. Pick the one whose scripts and community you want to use; the choice is about resources and your team, and you can change it only by rebuilding.
Why can nobody connect to my server?
Usually port 30120 is not open on TCP and UDP, either in the operating system firewall or in the host’s firewall. Check both, and check that the server is running.
Can I make a FiveM server on Windows?
Yes, Cfx.re provides Windows server files. Our panel is Linux only; see Windows vs Linux.
How many players can a FiveM server hold?
That depends on your hardware, scripts and OneSync. The setting is sv_maxClients. Values of 32 and up need OneSync set to on (or legacy up to 64), and values above 64 need on.