How to Set Up a FiveM Server: Complete Guide
Step-by-step guide to setting up a FiveM server on a Windows VPS — artifacts, license key, server.cfg, txAdmin, port forwarding, and first connection.
On this page
Setting up your own FiveM server is the first step toward building a thriving GTA V roleplay community. Whether you are launching a small private server for friends or a full serious-RP server with custom maps and scripts, the foundation is the same — and getting it right from the start saves hours of headaches later.
This guide walks you through every step: downloading the correct server artifacts, generating your license key, writing a working server.cfg, booting the server through txAdmin, opening the right firewall ports, and making your first connection. Follow along in order and you will have a live FiveM server running in under an hour.
Step 1: Provision Your Windows VPS
FiveM's main simulation loop runs on a single CPU thread, so raw single-core clock speed matters more than core count. For a starter server, a VPS with a modern high-frequency CPU (3.5 GHz+), at least 8 GB of RAM, and an NVMe SSD is the minimum comfortable setup. Windows Server 2019 or 2022 is the most common OS choice for FiveM hosting. Make sure you have RDP or direct console access before proceeding.
Step 2: Download Server Artifacts
Server artifacts are the compiled FiveM server binaries. Download the latest Windows build from runtime.fivem.net/artifacts/fivem/build_server_windows/master/. You will see two options on the page: 'Recommended' (stable, tested build) and 'Latest' (newest features, may have bugs). For production servers always choose Recommended.
- Navigate to runtime.fivem.net/artifacts/fivem/build_server_windows/master/
- Click the 'Recommended' build to download the zip archive
- Extract the archive to a folder such as C:\FiveMServer\server
Step 3: Create the Server Folder Structure
Your server needs a clear directory layout. The artifacts folder holds the FXServer executable; a separate data folder holds your server.cfg, resources, and cache. A typical layout looks like this:
C:\FiveMServer\
├── server\ (extracted artifacts - FXServer.exe lives here)
└── data\
├── server.cfg
├── icon.png (96x96 PNG server icon)
└── resources\
└── [system]
└── chat\Step 4: Get Your License Key from Keymaster
Every FiveM server requires a unique license key to authenticate with the Cfx.re network. Visit keymaster.fivem.net, sign in with your Cfx.re or FiveM Forum account, click 'New Server', fill in a name and the public IP of your VPS, then copy the generated key. Store it safely — you will paste it into server.cfg in the next step.
One key per server IP
A license key is tied to the public IP address you entered at Keymaster. If you change your VPS IP or move to a different machine, you must generate a new key.
Step 5: Write Your First server.cfg
The server.cfg is the heart of your server configuration. Create it inside the data folder. Below is a minimal but complete starting configuration covering all essential settings:
# Network endpoints
endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"
# Server identity
sv_hostname "My FiveM Server | CRM Development"
sv_projectName "My FiveM Server"
sv_projectDesc "A fresh FiveM server"
# License key from keymaster.fivem.net
sv_licenseKey "cfxk_xxxxxxxxxxxxxxxxxxxxxxxxxxxx"
# Slots — requires OneSync for >32
sv_maxclients 48
# OneSync (required for >32 players and modern scripts)
set onesync on
# Default resources
ensure mapmanager
ensure chat
ensure spawnmanager
ensure sessionmanager
ensure basic-gamemode
ensure hardcap
# Admin rcon password (change this)
rcon_password "changeme123"Replace the license key
The placeholder 'cfxk_xxx...' must be replaced with your actual key from Keymaster. The server will refuse to start with an invalid key.
Step 6: Add a Server Icon
Place a 96x96 pixel PNG file named icon.png in the same folder as your server.cfg. This image appears in the FiveM server browser next to your server name. It is optional but strongly recommended for branding.
Step 7: Launch the Server with txAdmin
txAdmin is bundled with every server artifact — you do not need to install it separately. Run FXServer.exe from your artifacts folder and it will automatically start the txAdmin panel. On first run it launches a setup wizard accessible at http://your-vps-ip:40120 in your browser.
- Run FXServer.exe in your server\artifacts folder
- Open a browser and navigate to http://your-vps-ip:40120
- Complete the txAdmin setup wizard (link your Cfx.re account, set an admin PIN)
- In the wizard, choose 'Custom Template' and point txAdmin at your data folder and server.cfg
- Click 'Start Server' from the txAdmin dashboard
Step 8: Open Firewall Ports
Your server will not be reachable until the correct ports are open. You need to open ports in both the Windows Firewall and, if applicable, your VPS provider's network firewall or security group.
| Port | Protocol | Purpose |
|---|---|---|
| 30120 | TCP + UDP | FiveM game traffic — players connect here |
| 40120 | TCP | txAdmin web panel — admin access only |
| 30110 | TCP + UDP | Used internally by some artifact versions (open as a precaution) |
# Run in PowerShell as Administrator on your Windows VPS
New-NetFirewallRule -DisplayName "FiveM Game" -Direction Inbound -Protocol TCP -LocalPort 30120 -Action Allow
New-NetFirewallRule -DisplayName "FiveM Game UDP" -Direction Inbound -Protocol UDP -LocalPort 30120 -Action Allow
New-NetFirewallRule -DisplayName "txAdmin" -Direction Inbound -Protocol TCP -LocalPort 40120 -Action AllowStep 9: Connect and Test
Open the FiveM client on your PC, press F8 to open the console, and type 'connect your-vps-ip:30120'. Alternatively use the Direct Connect option in the FiveM main menu. If everything is configured correctly you will load into the server within seconds.
Quick Reference: Essential Setup Steps
| Step | Action | Where |
|---|---|---|
| 1 | Provision a Windows VPS | Your hosting provider |
| 2 | Download Recommended artifacts | runtime.fivem.net/artifacts/fivem/build_server_windows/master/ |
| 3 | Create server folder structure | C:\FiveMServer\ |
| 4 | Generate license key | keymaster.fivem.net |
| 5 | Write server.cfg | data\server.cfg |
| 6 | Add 96x96 icon.png | data\icon.png |
| 7 | Launch FXServer.exe + txAdmin wizard | server\FXServer.exe |
| 8 | Open ports 30120 (TCP+UDP) and 40120 (TCP) | Windows Firewall + VPS firewall |
| 9 | Connect via FiveM client F8 console | FiveM client |
Next Steps After Launch
Once your bare server is running, the real work begins: installing a framework (ESX, QBCore, or Qbox), adding resources, configuring ox_inventory, building a player economy, and customizing your map. Each of those is its own project — but they all build on the solid foundation you just created.
Need a head start?
CRM Development offers fully configured server packs — complete ESX or QBCore setups with maps, scripts, and UI already wired together — so you can skip weeks of integration work and go straight to building your community.
Conclusion
Setting up a FiveM server correctly from the start — right artifacts, valid license key, clean server.cfg, and proper port configuration — prevents the majority of beginner issues. Follow the steps above and you will have a stable, connectable server ready for resources and players. If you want to skip the setup grind entirely, CRM Development's ready-made server packs come pre-configured and tested, letting you focus on your community from day one.
Frequently asked questions
What port does a FiveM server use?+
FiveM servers use port 30120 for both TCP and UDP by default. You must open this port in your firewall and forward it if you are behind NAT. txAdmin's web panel uses port 40120.
Where do I get a FiveM server license key?+
License keys are generated at keymaster.fivem.net. You log in with your Cfx.re account, register a new server, and copy the generated key into your server.cfg as sv_licenseKey.
Do I need OneSync enabled on my FiveM server?+
OneSync is required if you want more than 32 player slots and is strongly recommended for any serious RP server. Enable it by adding 'set onesync on' to your server.cfg.
What is txAdmin and do I need it?+
txAdmin is a management panel bundled with every FiveM server artifact. It provides a web UI for starting/stopping the server, a live console, player management, and scheduled restarts. It is highly recommended, especially for beginners.
How many players can a FiveM server hold?+
Without OneSync the hard limit is 32 players. With 'set onesync on' you can raise sv_maxclients up to 2048, though most RP servers run 48–128 slots in practice.
