How to Set Up a FiveM RP Server with QBCore on a Windows VPS
Step-by-step guide to running a FiveM server with the QBCore framework on a Windows VPS: txAdmin, MariaDB, artifacts download, and initial RP configuration.
Prerequisites
Before starting, confirm your environment is correct. Without this, the server will either fail to start or crash within the first few minutes.
Windows Server 2019 or 2022 VPS with at least 4 vCPU, 8 GB RAM, and 40 GB SSD. Administrator access via RDP. A free account at keymaster.fivem.net to generate your license key. Server internet connection with ports 30120 (TCP/UDP) and 40120 (TCP, txAdmin) open.
30120 TCP/UDP 40120 TCP 8 GB Server 2019/2022 Current QBCore requires MySQL 5.7+ or MariaDB 10.4+, and recent FiveM artifacts require Visual C++ Redistributable 2019 — both are covered in the steps below.
Preparing the Windows Environment
Windows Server ships with security restrictions that interfere with downloading binaries and opening ports. Address these before touching FiveM.
Connect to the VPS via RDP using the IP and credentials provided. On first login, open Server Manager → Local Server and disable IE Enhanced Security Configuration for Administrators. Without this, downloading files through the browser becomes a constant stream of confirmation dialogs.
Install the Visual C++ Redistributable 2019 (x64). Open PowerShell as Administrator and run:
Invoke-WebRequest -Uri "https://aka.ms/vs/17/release/vc_redist.x64.exe" -OutFile "$env:TEMP\vc_redist.x64.exe"
Start-Process "$env:TEMP\vc_redist.x64.exe" -ArgumentList "/install /quiet /norestart" -WaitThis package contains the C++ runtime libraries loaded by FXServer.exe. Skipping this step causes the server console to open and immediately close with no useful error message.
Open the required ports in Windows Firewall. Still in PowerShell:
New-NetFirewallRule -DisplayName "FiveM Server" -Direction Inbound -Protocol TCP -LocalPort 30120 -Action Allow
New-NetFirewallRule -DisplayName "FiveM Server UDP" -Direction Inbound -Protocol UDP -LocalPort 30120 -Action Allow
New-NetFirewallRule -DisplayName "txAdmin" -Direction Inbound -Protocol TCP -LocalPort 40120 -Action AllowInstalling MySQL (MariaDB)
QBCore cannot run without a database — all persistence (characters, money, inventory, vehicles) lives in MySQL. MariaDB is used here because its Windows installer is straightforward and it is fully compatible with oxmysql, the connector QBCore relies on.
Download the MariaDB installer:
Invoke-WebRequest -Uri "https://archive.mariadb.org/mariadb-10.11.6/winx64-packages/mariadb-10.11.6-winx64.msi" -OutFile "$env:TEMP\mariadb.msi"
Start-Process msiexec.exe -ArgumentList "/i $env:TEMP\mariadb.msi /quiet PASSWORD=YourStrongPassword123 SERVICENAME=MariaDB PORT=3306" -WaitReplace YourStrongPassword123 with a real password — you will use it in the server.cfg connection string. Store it somewhere safe.
Verify the service started correctly:
Get-Service -Name MariaDBThe status should show Running. If it shows Stopped, run Start-Service MariaDB and check again.
Create the qbcore database that will hold the framework schema. Open HeidiSQL (bundled with MariaDB) → connect to 127.0.0.1:3306 with user root and the password set above. Right-click the connection → Create new → Database → name it qbcore, collation utf8mb4_general_ci.
Downloading the FiveM Artifacts
FiveM publishes compiled binaries called artifacts on a dedicated server. Always use the latest recommended version from the master branch — “optional” and “bleeding edge” builds are unstable.
Create the folder structure and download the latest artifact:
New-Item -ItemType Directory -Path "C:\FXServer\server" -Force
New-Item -ItemType Directory -Path "C:\FXServer\server-data" -Force
cd C:\FXServer\server
# Check https://runtime.fivem.net/artifacts/fivem/build_server_windows/master/ for the latest link
$artifactUrl = "https://runtime.fivem.net/artifacts/fivem/build_server_windows/master/12913-abc.../server.7z"
Invoke-WebRequest -Uri $artifactUrl -OutFile "server.7z"The build number changes weekly — open the URL in the VPS browser, copy the link marked recommended, and replace the URL above.
Install 7-Zip to extract the artifact and unpack it:
winget install --id 7zip.7zip --silent
& "C:\Program Files\7-Zip\7z.exe" x server.7z -oC:\FXServer\serverAfter extraction, you should have C:\FXServer\server\FXServer.exe — that is the main executable.
Cloning QBCore and Configuring server.cfg
This is where the framework comes in. QBCore is distributed via GitHub and maintained by the QBCore Framework org.
Install Git and clone the official template into server-data:
winget install --id Git.Git --silent
# Close and reopen PowerShell to refresh PATH
cd C:\FXServer\server-data
git clone https://github.com/qbcore-framework/txAdminRecipe.git .The txAdminRecipe is the official blueprint — it includes the QBCore core, oxmysql, essential scripts, and the SQL schema.
Generate your license key at https://keymaster.fivem.net/. Log in with your Cfx.re account, click New → choose Server hosted by yourself, enter the VPS IP, and copy the generated key (format cfxk_...).
Use txAdmin to finish the configuration — it handles server.cfg, imports the SQL automatically, and provides a web interface. Start FXServer for the first time:
cd C:\FXServer\server
.\FXServer.exe +set serverProfile defaultOn first run, the console prints a URL like http://YOUR-VPS-IP:40120/addMaster/PIN. Open that URL in your local browser.
In the txAdmin interface: create the admin account → choose Use recipe → paste the URL https://raw.githubusercontent.com/Qbox-project/txAdminRecipe/main/recipe.yaml (or the plain QBCore recipe). txAdmin downloads all scripts, creates the database, and generates server.cfg.
When prompted for MySQL credentials, enter:
host: localhost
user: root
password: YourStrongPassword123
database: qbcoreStill in txAdmin, go to Settings → CFX Re License and paste the key from keymaster. Under Server Name, set the name that will appear in the FiveM server browser. Click Save & Start.
txAdmin is the primary access point for your server — anyone with access can stop the server, read logs, and execute commands. Use a password of at least 16 characters and never share the /addMaster/ URL after the initial setup.
Verification
With the server running, validate three things: a clean console output, a direct connection via the FiveM client, and database persistence.
In the FXServer console, you should see lines like:
Resource qb-core started.
Resource oxmysql started.
Authenticating with Cfx.re... done.
Server started.
Open the FiveM client on your PC, press F8, and type:
connect YOUR-VPS-IP:30120
You should land on the QBCore character selection screen. Create a character, disconnect, reconnect — if the character persists, the database connection is working correctly.
In HeidiSQL, open the qbcore database → table players. Your entry should be there with the generated citizenid.
Troubleshooting Common Issues
Server closes immediately on startup
In most cases this is a missing or outdated Visual C++ Redistributable. Reinstall using the command in Step 02 and confirm you are using the x64 version.
Error: “Could not connect to database”
Check the set mysql_connection_string line in C:\FXServer\server-data\server.cfg. It must follow this format:
set mysql_connection_string "mysql://root:YourStrongPassword123@localhost/qbcore?charset=utf8mb4"
Passwords containing special characters (@, :, /) must be URL-encoded — @ becomes %40, for example.
Players cannot connect from outside
Confirm three things: port 30120 is open in Windows Firewall (Step 03), port 30120 is not blocked at the provider level, and sv_endpoints in server.cfg points to 0.0.0.0:30120 (not 127.0.0.1).
Vanilla QBCore handles 32 players comfortably on a 4 vCPU VPS. Above 48 slots, monitor FXServer.exe CPU usage — if it sustains above 70%, optimize heavy scripts (especially HUD and proximity voice) before considering a hardware upgrade.
Next Steps
With QBCore running, typical paths forward include:
- Adding custom jobs: the
[qb]folder accepts extra resources such asqb-policejob,qb-mechanicjob, and similar. - Setting up a whitelist: enable
qb-adminmenuand restrict anonymous connections inserver.cfgwithsv_scriptHookAllowed 0. - Automating database backups: schedule a daily
mysqldumptask via Windows Task Scheduler. - Proximity voice: replace the native mumble implementation with
pma-voicefor better audio quality. - Anti-cheat: integrate txAdmin Anticheat or a paid solution such as Wasabi or FAXES.
If you are moving past the testing stage and targeting more than 32 stable players, a Hostini Windows VPS with dedicated NVMe storage significantly reduces desync caused by slow database I/O — a common bottleneck as RP servers accumulate persistent scripts.
Frequently asked questions
How much RAM does QBCore use with 32 players?
A clean QBCore installation using the txAdminRecipe base scripts consumes between 3 and 4 GB of RAM with 32 active players. Each additional script (jobs, MLOs, anti-cheat) adds 50–200 MB. For stable 32-slot operation, 8 GB is a comfortable minimum accounting for MariaDB and Windows Server overhead.
Can I run a FiveM server on a Linux VPS instead of Windows?
Yes — FXServer has an official Linux build and is technically lighter on resources. However, most QBCore tutorials, MLO tools, and community resources assume Windows, which makes troubleshooting harder for newcomers. Migrating to Linux is recommended only after you are already comfortable with the full stack.
Why doesn't my server appear in the FiveM public server list?
Verify that the license key is valid and linked to the current VPS IP in keymaster.fivem.net. Servers also take a few minutes to appear after coming online, and some regions require at least one connected player. Confirm that `sv_master1` in server.cfg is not commented out.
What is the difference between QBCore and ESX?
Both are RP frameworks, but QBCore was rewritten from scratch with cleaner code, uses oxmysql natively, and has better documentation. ESX is older with a larger ecosystem of legacy scripts, much of it deprecated. For new projects in 2024 and beyond, QBCore is the community default.
How do I back up the QBCore MySQL database?
Use `mysqldump` via Windows Task Scheduler: `mysqldump -u root -pPASSWORD qbcore > C:\backups\qbcore_%date%.sql`. Run backups at least daily and always before updating scripts. Keep the last 7 copies rotated and ideally send one copy to external storage (S3, FTP) to protect against disk failure.
Is txAdmin required, or can I start FXServer directly?
It is not required — you can start the server with `FXServer.exe +exec server.cfg` directly. However, txAdmin provides a web interface for restarting, viewing logs, managing players, and deploying scripts without RDP access, which saves significant time. In production environments it is effectively the community standard.