In short
To set up a FiveM server you need a machine to run FXServer, a free license key from the Cfx.re portal, a txAdmin recipe (ESX, QBCore, QBox or a blank template) and port 30120 open. With a managed FiveM server, FXServer is installed automatically: you log in to txAdmin with the PIN, run a recipe, add your license key and join from the F8 console with the connect command.
In this guide
To set up a FiveM server you need four things: a machine to run FXServer, a free license key from the Cfx.re portal, a recipe selected in txAdmin, and port 30120 open so players can connect. When you rent a managed FiveM server, FXServer is installed for you and all that's left is the txAdmin setup wizard. On your own VDS, you download and launch FXServer manually. This guide walks through the whole flow, from placing the order to your first connection.
Before you start: 6 key terms
- FXServer: The official FiveM server software from Cfx.re. Players connect to it.
- Artifact: A compiled FXServer build. Separate builds are published for Windows and Linux; the one tagged "recommended" is considered stable.
- txAdmin: The web admin panel bundled with FXServer. By default it runs on port 40120.
- Recipe: A setup file txAdmin uses to install a framework, core scripts and database tables automatically.
- server.cfg: The main config file that holds the server name, slot count, license key and the list of scripts to load.
- License key: The key that registers your server with the Cfx.re platform. FXServer won't start without one.
Managed FiveM server or VDS?
How long setup takes depends mostly on this choice. If you're new or don't want to manage an operating system, a managed game server takes fewer steps.
| Criteria | Managed FiveM server | Install on a VDS |
|---|---|---|
| FXServer install | Automatic | Manual (download the artifact) |
| OS maintenance | Not needed | Your responsibility |
| Firewall and ports | Preconfigured | You open them |
| Flexibility | FiveM-focused | Can run other services on the same machine |
All OyunBulut FiveM server plans include DDR5 RAM, NVMe storage, DDoS protection and automatic setup. The servers run in an Istanbul data center, which is geographically close for players in Türkiye.
How much RAM and CPU do you need?
The figures below aren't hard limits, just rough guidance based on what's common in practice. What really decides it is how many scripts, addon vehicles and MLO maps you load.
- 2 GB RAM: Blank CFX template, testing and script development.
- 4 GB RAM: A small roleplay server with a framework (ESX, QBCore, QBox) and a moderate number of scripts.
- 6-8 GB RAM: A roleplay server with addon vehicle, clothing and map packs and a regular player base.
The FiveM server does most of its work on the main thread, so single-core performance matters more than core count. For a roleplay server that will install a framework and build its first community, the OB-FIVEM-3 FiveM server plan with 4 CPUs and 6 GB DDR5 RAM is a balanced starting point. For a detailed breakdown, see the guide to how much RAM and CPU a FiveM server needs.
Step-by-step FiveM server setup
1. Get your Cfx.re license key
- Go to portal.cfx.re and sign in with your Cfx.re account (create one for free if you don't have it).
- Create a new key in the server registration keys section.
- Enter a server name and your server's public IP address.
- Copy the generated key and store it somewhere safe. Don't share it with anyone.
For a field-by-field walkthrough and a fix for the "invalid license key" error, read the FiveM license key guide.
2. Place your order and wait for automatic setup
Once you pick a plan and complete your order, FXServer is installed automatically. Your server IP and admin details appear in the service details of your client area. You don't need to upload any files at this stage.
3. First txAdmin login with the PIN
- Open the server console. On first launch, txAdmin prints a 4-digit setup PIN to the console.
- In your browser, go to
http://SUNUCU_IP:40120(the port may differ depending on your provider's configuration). - Enter the PIN and create the master account. You'll be asked to link your Cfx.re account or set a username and password.
The master account has the highest privileges on the server. Use a strong password and add other admins later with their own separate accounts.
4. Choose a recipe and run the deployer
The txAdmin setup wizard offers a list of ready-made recipes. Your choice sets the foundation of your server:
- CFX Default: A blank server with no framework. For testing or writing your own system from scratch.
- ESX Legacy: A long-established roleplay framework with a large script ecosystem.
- QBCore: A popular roleplay framework that ships with built-in job and inventory systems.
- QBox: A QBCore-based framework modernized with the ox libraries.
If you're not sure which to pick, read the ESX vs QBCore vs QBox comparison first; switching frameworks later is much more work.
The deployer asks for the following, in order:
- License key: Paste the key you got in step one.
- Database details: Framework recipes require MySQL or MariaDB. Enter the host, username, password and database name. If you're not sure where your plan's database details are, open a support ticket.
- Run the recipe: txAdmin downloads the files, creates the database tables and writes server.cfg. When it finishes, start the server with "Save & Run Server".
5. Check server.cfg
After the recipe finishes, make sure these lines in server.cfg are correct:
endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"
sv_hostname "^5Sunucu Adınız ^7| Türkçe Roleplay"
sets sv_projectName "Sunucu Adınız"
sets sv_projectDesc "Türkçe roleplay sunucusu"
sets locale "tr-TR"
sets tags "roleplay, turkish"
sv_maxclients 48
set onesync on
sv_licenseKey "LISANS_ANAHTARINIZ"
Codes like ^5 and ^7 in sv_hostname set colors. Lines starting with sets are visible to everyone in the server list, so never put secrets such as passwords or database credentials in a sets line. Note: with OneSync enabled you can go up to 48 slots for free; higher slot counts require Cfx.re's paid Element Club subscription.
6. Connect to your server for the first time
- Open the FiveM client and press F8 to open the console.
- Type
connect SUNUCU_IP:30120and press Enter. - On the first join, the client downloads the server's resources; the more addon vehicles and maps you have, the longer this takes.
It can take a few minutes for your server to show up in the public server list. If you can connect but don't see it in the list, check that the sv_master1 line isn't set to empty; if it is, the server won't register with the list.
Installing on your own VDS: the short version
If you chose a VDS, you install FXServer manually. The basic flow on Linux:
sudo adduser --disabled-password fivem
sudo -iu fivem
mkdir -p ~/server && cd ~/server
wget ARTIFACT_INDIRME_LINKI -O fx.tar.xz
tar xf fx.tar.xz
./run.sh
Copy the artifact link for the "recommended" build from the Linux list on Cfx.re's official artifacts page. Then open the required ports in the firewall:
sudo ufw allow 30120/tcp
sudo ufw allow 30120/udp
sudo ufw allow 40120/tcp
On a Windows VDS, extract the artifact zip and run FXServer.exe. To open the ports, run this in an elevated PowerShell:
New-NetFirewallRule -DisplayName "FiveM TCP" -Direction Inbound -Protocol TCP -LocalPort 30120,40120 -Action Allow
New-NetFirewallRule -DisplayName "FiveM UDP" -Direction Inbound -Protocol UDP -LocalPort 30120 -Action Allow
Rather than leaving port 40120 open to everyone, allow only your own IP address if you can. From here on, the process is the same as steps 3-6 for a managed server.
The 5 most common setup problems
- License key rejected: Make sure the key is in quotes with no leading or trailing spaces. If the same key is in use on another server, they may conflict.
- Recipe stalls at the database step: The database username, password or host is wrong. Re-enter the details and run the recipe again.
- Players can't connect: Confirm that port 30120 is open for both TCP and UDP and that the
endpoint_addlines are correct. - A script won't start: Dependencies (for example oxmysql) must be
ensured before the framework. Load-order mistakes are the most common reason scripts fail to start. - sv_maxclients above 48: Without an Element Club subscription, the server won't accept this value; lower it to 48 or below.
Your first 24 hours after setup
The server is up and you can connect. Before inviting players, finish these steps:
- Separate admin accounts. Create a separate txAdmin account for each staff member and don't share the master account.
- Schedule restarts. Set one or two daily restarts during off-peak hours.
- Take your first backup. Back up the database and the
resourcesfolder so you have a clean restore point before you start adding scripts. - Add scripts one at a time. After each new script, check the console for errors. Bulk installs make it harder to find the script causing problems.
- Monitor resource usage. Type
resmon 1in the in-game F8 console to see how much load each script adds.
Next step: get your server ready
The longest part of setup is preparing FXServer and the ports; on a managed server that's done for you and you go straight to the txAdmin wizard. You can start with a small test server and move to a plan with more RAM as your community grows. Compare all options on the OyunBulut FiveM server page; if you're launching a roleplay server with a framework, check out the OB-FIVEM-3 plan with 4 CPUs and 6 GB RAM. If you get stuck on any step during setup, you can open a support ticket in Turkish.
Frequently asked questions
Does it cost money to set up a FiveM server?
The FXServer software and the Cfx.re license key are free. You only pay for the hardware that runs the server; if you want more than 48 slots, you need Cfx.re's paid Element Club subscription.
What ports does a FiveM server use?
The default port for player connections is 30120, and it must be open for both TCP and UDP. The txAdmin web panel uses TCP port 40120 by default.
Can I host a FiveM server on my own PC?
Technically yes, but the server goes offline whenever your computer is off, and your home upload speed and router port forwarding can cause problems. For a community server that stays online around the clock, a rented server is more practical.
Where do I find the txAdmin PIN?
When txAdmin runs for the first time, it prints a 4-digit PIN to the server console. Just open the console from your panel and check the last few lines.
Should I choose ESX, QBCore or QBox?
ESX stands out if you want a large library of ready-made scripts, QBCore if you want a quick start with built-in job systems, and QBox if you want a more modern setup built on the ox libraries. Base your choice on which framework the scripts you plan to use support.