Tutorial
How to install a FiveM server on a Windows VPS
Published on · updated on · 2 min read
Prerequisites
- A VPS running Windows Server 2019 or 2022, with at least 4 GB of RAM (8 GB recommended)
- Remote Desktop (RDP) connection
- Free FiveM license from keymaster.fivem.net
- A legal copy of GTA V
Step 1: Remote Desktop connection
On your PC, press Windows+R, type mstsc, enter your VPS IP and connect with your administrator credentials.
Step 2: Download FiveM artifacts
In your VPS browser, go to artifacts.fivem.net. Download the latest recommended Windows version. Extract the archive to C:\FiveM\server.
Step 3: Install Git and download cfx-server-data
Download Git from git-scm.com and install it. Open PowerShell as administrator:
mkdir C:\FiveM\server-data
cd C:\FiveM\server-data
git clone https://github.com/citizenfx/cfx-server-data.git .Step 4: Create server.cfg
Open Notepad and create C:\FiveM\server-data\server.cfg:
endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"
start mapmanager
start chat
start spawnmanager
start sessionmanager
start basic-gamemode
start hardcap
sv_scriptHookAllowed 0
sv_hostname "My FiveM Server - VexCloud"
sv_maxclients 32
sv_licenseKey "YOUR_LICENSE_KEY"Step 5: Open firewall port
In administrator PowerShell:
netsh advfirewall firewall add rule name="FiveM TCP" protocol=TCP dir=in localport=30120 action=allow
netsh advfirewall firewall add rule name="FiveM UDP" protocol=UDP dir=in localport=30120 action=allowStep 6: Start the server
In PowerShell, from C:\FiveM\server:
.\FXServer.exe +exec ..\server-data\server.cfgStep 7: Auto-start on boot
To automatically restart after a reboot:
Open Windows Task Scheduler, create a new task, choose "At computer startup" as the trigger, and add the action: FXServer.exe program with the argument +exec server-data/server.cfg from C:\FiveM\server.
Join your server
In FiveM on your PC, press F8 and type:
connect YOUR_IP:30120Recommended RP resources
- ESX or QBCore: complete roleplay framework
- oxmysql: MySQL database connection
- ox_lib: utility library
- dpemotes: animations and emotes
Recommended VexCloud configuration
For around thirty players with a few resources: VPS SSD-04 (2 vCPU, 4 GB, NVMe). For an RP server with ESX or QBCore and many scripts: VPS SSD-08 (4 vCPU, 8 GB) or more. Windows Server itself uses memory: keep some headroom. A ready-made FiveM filter (port 30120) is available in the DDoS panel, included on every VPS: see DDoS protection for game servers.