EN · $ USD
Game and Bot VDS Guides

How to Set Up a FiveM Server on a Windows VDS

7 min read Updated: OyunBulut technical team

In short

To install FiveM on a Windows VDS, connect over RDP, download the Windows FXServer build from the Cfx.re artifacts page and extract it to a folder. Run FXServer.exe, then in the txAdmin interface link your Cfx.re account and pick a recipe and license key. Finally, open TCP and UDP port 30120 in Windows Firewall and use Task Scheduler to start the server automatically on boot.

In this guide
  1. What you need before you start
  2. 1. Connect to the server over RDP
  3. 2. Prepare the folder structure
  4. 3. Download the FXServer artifact
  5. 4. Set up the server with txAdmin
  6. 5. Open port 30120 in Windows Firewall
  7. 6. Auto-start FXServer on boot
  8. 7. Windows-specific settings
  9. 8. Verify the setup
  10. Common problems
  11. Next step: the right Windows VDS for FiveM

A Windows VDS is the easiest way to run a FiveM server if you want to manage it through a familiar desktop interface. Here's the process in short: connect to the server over RDP, download the FXServer artifact, set up the server with txAdmin, open port 30120 in Windows Firewall, and configure FXServer to start on its own whenever the server reboots. This guide walks through every step with commands.

What you need before you start

  • A VDS running Windows Server. Windows itself uses part of the memory, so at least 8 GB of RAM is recommended alongside the FiveM server; script-heavy roleplay servers are more comfortable with 12 GB or more (rule of thumb).
  • A Cfx.re license key. It's free from portal.cfx.re; we cover the steps in our guide to getting a FiveM license key.
  • The Remote Desktop Connection app (mstsc) on your own computer.
  • 7-Zip on the server to open .7z archives.

FiveM's main server thread is very sensitive to single-core speed. That's why the OB-R9-9950X-4 Ryzen 9 9950X VDS with 4 vCPUs and 8 GB of DDR5 RAM is a balanced starting point for FiveM on Windows.

1. Connect to the server over RDP

  1. On your own computer, press Win + R, type mstsc and press Enter.
  2. Enter your VDS IP address in the Computer field. If you changed the RDP port, use the IP:port format.
  3. Enter Administrator as the username and the password you were given.
  4. On first login, change the administrator password to a strong, unique one.

2. Prepare the folder structure

Keeping the server files (artifact) and your server data (resources, server.cfg) in separate folders makes future artifact updates easier:

New-Item -ItemType Directory -Force C:\FXServer\server
New-Item -ItemType Directory -Force C:\FXServer\server-data

Run these commands on the server in PowerShell opened as administrator.

3. Download the FXServer artifact

  1. Using the browser on the server, open the Cfx.re Windows artifacts page: https://runtime.fivem.net/artifacts/fivem/build_server_windows/master/
  2. Choose the build marked Latest Recommended at the top of the page and download the server.7z file. The recommended build comes with fewer surprises than the very latest one.
  3. Extract the archive with 7-Zip to the C:\FXServer\server folder. You should see FXServer.exe in the folder.

If FXServer throws a missing DLL error on launch, install Microsoft's Visual C++ Redistributable (x64) package and try again.

4. Set up the server with txAdmin

txAdmin is the web-based management panel bundled with FXServer. It handles server setup, scheduled restarts, player management and console access in one place.

  1. Run C:\FXServer\server\FXServer.exe. The console window shows the txAdmin address (http://localhost:40120) and a one-time PIN.
  2. Open that address in the server's browser, enter the PIN and link your Cfx.re account. Then set an admin password for txAdmin.
  3. In the setup wizard, choose a template under Popular Recipes: CFX Default for a clean start, or the QBCore or ESX templates for roleplay.
  4. Point the server data folder to C:\FXServer\server-data and enter your license key.
  5. The QBCore and ESX templates need a database. In that case, install MariaDB on the server first and enter the database details in the wizard.
  6. When the recipe finishes deploying, txAdmin creates the server.cfg file and starts the server.

For detailed options, see the official FiveM server setup docs.

If you need a database: MariaDB

ESX and QBCore store player characters, inventory and vehicles in a MySQL-compatible database. On Windows, the easiest route is to download and run the Windows (MSI) installer from MariaDB's official site. Set a root password during setup and leave the install as service option checked, so the database also starts automatically on boot. Don't open the database port (3306) to the outside in the firewall; FiveM runs on the same server, so it connects via 127.0.0.1.

Lines to check in server.cfg

The txAdmin recipe creates server.cfg for you. Still, make sure these lines are correct:

endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"
sv_hostname "Sunucu Adınız"
sv_maxclients 48
sv_licenseKey "lisans_anahtariniz"
set mysql_connection_string "mysql://kullanici:parola@127.0.0.1/veritabani?charset=utf8mb4"

Raising sv_maxclients above 48 requires OneSync. Never share this file, which contains your license key and database password, and blur it when taking screenshots.

5. Open port 30120 in Windows Firewall

By default, FiveM uses port 30120 over both TCP and UDP for player connections. If either one is closed, players can't connect even if they see the server in the list. In an administrator PowerShell:

New-NetFirewallRule -DisplayName "FiveM TCP 30120" -Direction Inbound -Protocol TCP -LocalPort 30120 -Action Allow
New-NetFirewallRule -DisplayName "FiveM UDP 30120" -Direction Inbound -Protocol UDP -LocalPort 30120 -Action Allow

Don't open txAdmin's port 40120 to everyone. You can reach txAdmin over RDP using the server's own browser. If you need outside access, restrict the rule to your own IP address only:

New-NetFirewallRule -DisplayName "txAdmin 40120 - sadece benim IP" -Direction Inbound -Protocol TCP -LocalPort 40120 -RemoteAddress 203.0.113.10 -Action Allow

Replace 203.0.113.10 with your own public IP address.

6. Auto-start FXServer on boot

If you launch FXServer.exe by hand, FiveM stays down whenever the server reboots (for example, after Windows Update). With Task Scheduler, you can start FXServer at system startup even when nobody is logged in. In an administrator PowerShell:

$action   = New-ScheduledTaskAction -Execute "C:\FXServer\server\FXServer.exe" -WorkingDirectory "C:\FXServer\server"
$trigger  = New-ScheduledTaskTrigger -AtStartup
$settings = New-ScheduledTaskSettingsSet -ExecutionTimeLimit ([TimeSpan]::Zero) -RestartCount 3 -RestartInterval (New-TimeSpan -Minutes 1)
Register-ScheduledTask -TaskName "FXServer" -Action $action -Trigger $trigger -Settings $settings -User "Administrator" -Password "YonetimParolaniz" -RunLevel Highest
  • -ExecutionTimeLimit ([TimeSpan]::Zero) removes the time limit. Without it, Task Scheduler stops the task after 72 hours by default and your server shuts down.
  • With this method, the console window isn't visible; you manage the server from the txAdmin web interface. If FXServer crashes, txAdmin restarts it on its own.
  • Whenever you change the administrator password, update the task with the new password too.

If you want a more advanced Windows service setup, you can also use a service wrapper such as NSSM, but Task Scheduler is enough for most servers.

7. Windows-specific settings

  • Windows Update restarts: Set active hours so updates don't reboot the server at peak time, and install updates during a maintenance window you schedule yourself.
  • RDP security: Use a strong password, change the RDP port if possible and restrict RDP access to your own IP. We cover this in detail in our game VDS security: SSH, RDP and firewall guide.
  • Time zone: txAdmin's scheduled restarts follow the server clock. If your community plays on Türkiye time, run Set-TimeZone -Id "Turkey Standard Time" in an administrator PowerShell so restarts happen at the right time, and schedule restarts for the hours when the fewest players are online.
  • Resource headroom: Don't leave programs like a browser or the Discord client open on the server; each one takes RAM and CPU away from FiveM.
  • Backups: Back up the C:\FXServer\server-data folder and your database regularly; txAdmin's own data is also stored in the FXServer folder.

8. Verify the setup

Run a quick test before announcing the server to players:

  1. On txAdmin's Live Console screen, check that there are no red error lines and that all resources started.
  2. Open FiveM on your own computer, press F8 to open the console and type connect VDS_IP:30120. If you can connect directly, the ports are open correctly.
  3. After a few minutes, search for your server name in the FiveM server list. If it appears, your license key is valid.
  4. Reboot the VDS once and confirm in txAdmin that FXServer comes back up on its own without anyone logging in.

If you hit an error at the connection step, we've collected fixes by error message in our can't connect to FiveM server guide.

Common problems

SymptomLikely causeFix
Server isn't in the listWrong license key or UDP 30120 closedCheck the key and both firewall rules
Players time out while connectingTCP 30120 closedAdd the TCP rule
Server shuts down on its own after a few daysTask time limitSet ExecutionTimeLimit to zero
Couldn't start resource errorMissing dependency or wrong ensure orderStart dependencies first in server.cfg

Next step: the right Windows VDS for FiveM

FiveM on Windows needs a server that can cover the resource needs of both the operating system and FXServer. For starter and mid-size servers, OB-R9-9950X-4 is a good fit, and for busy roleplay servers, OB-R9-9950X-5 with 6 vCPUs and 12 GB of DDR5 RAM. To compare all options, browse the Ryzen 9 9950X VDS plans; OyunBulut's infrastructure is in Istanbul, and layered DDoS protection is included with every plan.

Frequently asked questions

Which ports need to be open for a FiveM server?

Port 30120 must be open over both TCP and UDP for player connections. txAdmin's port 40120 should not be open to everyone; restrict it to your own IP only.

How much RAM does a FiveM server need on a Windows VDS?

Accounting for Windows' own usage, at least 8 GB is recommended as a rule of thumb. Roleplay servers with many scripts, vehicles and maps run more comfortably with 12 GB or more.

Is Windows or Linux better for FiveM?

Both are supported. Windows is easier for beginners thanks to the desktop interface and familiar tools; Linux uses fewer resources but requires command-line knowledge.

Does the FiveM server shut down when I close the RDP connection?

If you sign out, an FXServer you started by hand may close; if you just close the window, it keeps running. The safest option is to start FXServer with Task Scheduler, independent of any login session.

How do I update the artifact?

Stop the server, back up the server folder, extract the new recommended build into the same folder and start it again. Because the server-data folder is separate, your resources and settings aren't affected.

For this guide

Recommended plans

FiveM's main thread needs high single-core speed, so the OB-R9-9950X-4 with a Ryzen 9 9950X CPU and DDR5 memory is a starter plan that comfortably runs Windows and FXServer together.

OB-R9-9950X-4

Recommended

8 GB DDR5 RAM

$21.62/mo

+VAT

  • Processor4 vCPU
  • ModelAMD Ryzen 9 9950X
  • Disk80 GB NVMe
  • LocationIstanbul
  • Port: 1G Port
  • Traffic: Fair use
  • Virtualization: KVM
  • Multi-layer DDoS protection

2 GB DDR5 RAM

$7.86/mo

+VAT

  • Processor2 vCPU
  • ModelAMD Ryzen 9 9950X
  • Disk40 GB NVMe
  • LocationIstanbul
  • Port: 1G Port
  • Traffic: Fair use
  • Virtualization: KVM
  • Multi-layer DDoS protection

4 GB DDR5 RAM

$11.01/mo

+VAT

  • Processor2 vCPU
  • ModelAMD Ryzen 9 9950X
  • Disk50 GB NVMe
  • LocationIstanbul
  • Port: 1G Port
  • Traffic: Fair use
  • Virtualization: KVM
  • Multi-layer DDoS protection

Ryzen 9 9950X — tüm paketler

Need help with setup?

Send questions about your service in a support ticket, and our technical team will walk you through it step by step.