Install a FiveM Server on Windows Server
Want to create your own GTA V multiplayer server with FiveM? This comprehensive guide walks you through the complete installation and configuration process on Windows Server.
๐ Before You Begin
โ A Windows Server VPS (Windows Server 2019/2022 recommended) โ At least 8 GB RAM (16 GB recommended for RP servers) โ RDP access to your server โ A CFX.re account to get your license โ Basic command line knowledge
Get Your FiveM License Key
Before installing anything, you need an official license from FiveM.
Create an Account and Generate the Key
- Go to keymaster.fivem.net
- Log in with your CFX.re account (or create one)
- Click "New Server"
- Choose "Server Key" type
- Fill in the information:
- Server name: Your server name
- Server IP: Your VPS IP address
- Click "Generate"
- Copy the generated license key
โ ๏ธ Important
NEVER share your license key publicly. It's tied to your server IP and can be revoked if misused.
Prepare Windows Server
Install Visual C++ Redistributables
FiveM requires Visual C++ Redistributables to function.
- Download Visual C++ 2019 Redistributable:
- Run the installer
- Restart the server if prompted
Create the Directory Structure
# Open PowerShell as Administrator
# Create main directory
New-Item -ItemType Directory -Path "C:\FiveM-Server"
# Create subfolders
New-Item -ItemType Directory -Path "C:\FiveM-Server\server"
New-Item -ItemType Directory -Path "C:\FiveM-Server\server-data"
Download FiveM Artifacts
Artifacts are the FiveM server files.
- Go to FiveM Artifacts
- Download the latest version (top of the list)
- Extract the content to
C:\FiveM-Server\server\
Or via PowerShell:
# Download the latest artifact
Invoke-WebRequest -Uri "https://runtime.fivem.net/artifacts/fivem/build_server_windows/master/7290-d3f3d99d3283bd2ebf4cf8a668906d4dcbf33641/server.zip" -OutFile "C:\FiveM-Server\server.zip"
# Extract
Expand-Archive -Path "C:\FiveM-Server\server.zip" -DestinationPath "C:\FiveM-Server\server" -Force
๐ก Tip: Check runtime.fivem.net regularly for updates. A well-maintained server is more stable!
Configure Windows Firewall
Open Required Ports
# Open UDP port 30120 (Game)
New-NetFirewallRule -DisplayName "FiveM Server - Game" -Direction Inbound -Protocol UDP -LocalPort 30120 -Action Allow
# Open TCP port 30120 (HTTP)
New-NetFirewallRule -DisplayName "FiveM Server - HTTP" -Direction Inbound -Protocol TCP -LocalPort 30120 -Action Allow
# Open TCP port 40120 (txAdmin)
New-NetFirewallRule -DisplayName "FiveM Server - txAdmin" -Direction Inbound -Protocol TCP -LocalPort 40120 -Action Allow
โ ๏ธ Important
Also configure your VPS firewall (if applicable) to allow these ports. Check your provider's panel (AtmosNode Control Panel, OVH, etc.).
Install and Start txAdmin
txAdmin is the official FiveM server management interface.
First Launch
# Navigate to the server folder
cd C:\FiveM-Server\server
# Start txAdmin
.\FXServer.exe +set citizen_dir C:\FiveM-Server\server\citizen +set sv_licenseKey "YOUR_LICENSE_KEY" +set txAdminPort 40120
๐ก Replace YOUR_LICENSE_KEY with the key you generated in Step 1.
Initial Configuration
- Open your browser and go to:
http://YOUR_SERVER_IP:40120 - Create an administrator account
- Choose a setup option:
- Popular Recipe โ Pre-configured template (ESX, QBCore, etc.)
- Custom โ Manual configuration
- Follow the installation wizard
โ txAdmin is now installed! You can manage your server from the web interface.
Configure server.cfg
# License
sv_licenseKey "YOUR_LICENSE_KEY"
# Server Information
sv_hostname "^1My RP France Server ^7| ^2Recruitment Open"
sv_projectName "My Roleplay Server"
sv_projectDesc "Quality roleplay server on FiveM"
# Maximum Players
sv_maxclients 64
# Endpoint (Server IP)
endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"
# GTA V Version
sv_enforceGameBuild 2802
# Steam API Key (optional)
# sv_steamApiKey "YOUR_STEAM_API_KEY"
# Tags for server list
sets tags "roleplay, france, economy, whitelist"
# Language
sets locale "fr-FR"
# OneSync (required for +32 players)
set onesync on
# Script Hook (security)
sv_scriptHookAllowed 0
# Resources to start
ensure mapmanager
ensure chat
ensure spawnmanager
ensure sessionmanager
ensure basic-gamemode
ensure hardcap
ensure rconlog
Important Parameters:
- sv_maxclients โ Maximum number of players (default: 32, max with OneSync: 2048)
- sv_enforceGameBuild โ Required GTA V version (2802 = latest)
- endpoint_add_tcp/udp โ Server ports
- onesync โ Enable for +32 players
- sv_scriptHookAllowed โ Disable for security
โ ๏ธ Security
NEVER share your sv_licenseKey or sv_steamApiKey publicly!
Add Resources (Mods)
ESX Framework (Roleplay)
# Navigate to resources folder
cd C:\FiveM-Server\server-data\resources
# Clone ESX Legacy
git clone https://github.com/esx-framework/esx_core.git [esx]
# ESX Framework
ensure es_extended
ensure esx_menu_default
ensure esx_menu_dialog
ensure esx_menu_list
QBCore Framework (Alternative)
# Download QBCore
git clone https://github.com/qbcore-framework/qb-core.git [qb]
Popular Resources
Recommended resources:
| Resource | Description |
|---|---|
| gcphone | Phone system for RP |
| esx_policejob | Police job |
| esx_ambulancejob | EMS job |
| mythic_hospital | Advanced hospital system |
| pma-voice | Voice proximity (VOIP) |
| esx_vehicleshop | Car dealership |
๐ก Find resources on forum.cfx.re or GitHub.
Performance Optimization
Optimize server.cfg
# Increase thread pool
set sv_threadedStreamingEnabled true
# Optimize network performance
set sv_maxPing 0
set sv_pureLevel 1
# Resource limits
set sv_resourceScriptTickCount 10000
set sv_scriptTickInterval 0
RAM and CPU Optimization
- Open Task Manager
- Right-click on FXServer.exe
- Select Set Priority โ High
- Go to Details tab
- Right-click โ Set Affinity โ Select all CPU cores
Auto-Start Configuration
Create a Startup Script
@echo off
cd /d C:\FiveM-Server\server
:start
echo Starting FiveM Server...
FXServer.exe +exec server.cfg
echo Server stopped. Restarting in 10 seconds...
timeout /t 10
goto start
Save this file as C:\FiveM-Server\start.bat
Create a Windows Service
# Download NSSM
Invoke-WebRequest -Uri "https://nssm.cc/release/nssm-2.24.zip" -OutFile "C:\nssm.zip"
Expand-Archive -Path "C:\nssm.zip" -DestinationPath "C:\nssm"
# Install the service
C:\nssm\nssm-2.24\win64\nssm.exe install FiveM-Server "C:\FiveM-Server\start.bat"
# Start the service
Start-Service FiveM-Server
Manage Your Server with txAdmin
Key Features
Main txAdmin features:
| Feature | Description |
|---|---|
| Dashboard | Real-time stats and monitoring |
| Console | Interactive server console |
| Resources | Manage and restart resources |
| Players | Player list, kick, ban |
| Database | Integrated database management |
| Backups | Automatic server backups |
| Logs | View and search logs |
Useful Commands
Start the server
cd C:\FiveM-Server\server
.\FXServer.exe +exec server.cfg
View logs in real-time
Get-Content C:\FiveM-Server\server-data\logs\server.log -Wait
Restart a resource
Access txAdmin โ Resources โ Restart
Manage players
Access txAdmin โ Players โ Actions
txAdmin Shortcuts
Keyboard shortcuts:
| Shortcut | Action |
|---|---|
Ctrl + C | Stop the server (console) |
refresh | Refresh resource list |
restart [resource] | Restart a resource |
stop [resource] | Stop a resource |
start [resource] | Start a resource |
๐ฌ Need Help?
If you encounter any difficulties:
๐ฎ Congratulations!
Your FiveM server is now installed and configured. You can now add resources, customize your server, and welcome players!
Next Steps:
- Install an RP framework (ESX or QBCore)
- Add custom resources and scripts
- Configure player whitelist
- Set up backups with txAdmin

