How to set up txAdmin for FiveM on Windows Server from scratch
Install and configure txAdmin to manage your FiveM server on a Windows VPS from scratch — Cfx.re key, recipe, firewall rules, persistence as a service, and web access.
txAdmin has been the official panel for FiveM since 2022 — it manages the server through the browser, controls start/stop, monitors crashes, manages players, and provides multi-admin access without keeping an RDP session open. Anyone still running FXServer “by hand” via FXServer.exe in a CMD window loses automatic restart on crash, database backups, and structured logs.
This tutorial covers a fresh install on a Windows VPS: official download, generating the Cfx.re key, creating the server through a recipe, opening firewall rules, and persisting it as a Windows service so it boots automatically. By the end, the panel will respond at http://your-ip:40120 and the game server at port 30120.
Estimated time: 25 to 35 minutes from scratch, depending on artifact download speed and the MySQL database (if you use an ESX or QBCore recipe that downloads schemas).
Prerequisites
Windows Server 2019, 2022, or 2025 with administrator RDP access, at least 4 GB of free RAM, ~5 GB of disk space, and a stable internet connection. Free account at keymaster.fivem.net to generate the Cfx.re key. PowerShell open as administrator, and Visual C++ Redistributable 2019/2022 installed (ships by default on Hostini Windows Server VPS).
30120 (UDP + TCP) 40120 (TCP) Latest Recommended 4 GB free Before continuing, confirm that the server has a reachable public IP and that you can resolve runtime.fivem.net from inside it — the first server run downloads additional artifacts, and a DNS block breaks the setup.
Download FXServer (txAdmin ships with it)
Since 2022, txAdmin has been distributed inside the same official FXServer zip. Don’t download txAdmin separately from older releases — the correct version always comes from Cfx.re’s official artifact server.
Create the directory structure and download the latest artifact via PowerShell:
New-Item -ItemType Directory -Force -Path C:\FXServer\server, C:\FXServer\server-data
cd C:\FXServer\server
$artifactsPage = Invoke-WebRequest -Uri "https://runtime.fivem.net/artifacts/fivem/build_server_windows/master/" -UseBasicParsing
$latestLink = ($artifactsPage.Links | Where-Object { $_.href -match '\d+-[a-f0-9]+/server\.zip$' } | Select-Object -First 1).href
$downloadUrl = "https://runtime.fivem.net/artifacts/fivem/build_server_windows/master/$latestLink"
Invoke-WebRequest -Uri $downloadUrl -OutFile server.zip
Expand-Archive -Path server.zip -DestinationPath . -Force
Remove-Item server.zipThis script picks the “Latest Recommended” link automatically — no need to copy it by hand. The result lands in C:\FXServer\server\ with FXServer.exe at the root.
Confirm the binary runs and prints the version:
C:\FXServer\server\FXServer.exe -vExpected output: something like FXServer master 12345 win32-x64. If you see a missing DLL error, install Visual C++ Redistributable 2019 (vc_redist.x64.exe from Microsoft’s site) and try again.
The server\ folder holds the binary (updated with each new release). The server-data\ folder holds resources, database, and configurations (persistent — you don’t touch it on updates). Mixing the two forces you to reconfigure everything on each FXServer update — not worth it.
Generate the Cfx.re key
Every public FiveM instance needs a license key generated at keymaster.fivem.net. The key binds the server IP and port — without it, the server starts but doesn’t appear in the public list, and players get connection errors.
Open keymaster.fivem.net in your browser, sign in with your Cfx.re account (or create a free one), click “New” and fill in:
- Server hostname: your server name (e.g.,
MyFiveM US) - IP: your VPS public IP
- Server type: “FXServer (recommended)”
Copy the generated key — format cfxk_XXXXXXXXX_XXXXXXXXX. You’ll paste it into server.cfg in the next step.
Configure the server through txAdmin
The first FXServer run starts txAdmin in “setup” mode — it opens the web panel with a unique PIN, and you pick a recipe (template) that builds server.cfg, installs base resources, and provisions the MySQL database (if needed).
Start txAdmin for the first time:
cd C:\FXServer\server
.\FXServer.exe +set serverProfile default +set txAdminPort 40120A line like this will appear in the console:
[txAdmin] PIN for first-time setup: 1234
[txAdmin] Web Panel: http://localhost:40120Note the PIN. It expires in 5 minutes.
Open the panel in your browser. On a VPS, use the public IP:
http://YOUR-PUBLIC-IP:40120Paste the PIN, create the master user (login + password — save it, that’s your panel admin credential) and follow the wizard:
- Server data folder:
C:\FXServer\server-data - Recipe: pick “ESX Legacy”, “QBCore”, or “Default” depending on your project
- License key: paste the Cfx.re key from step 03
- Database: if the recipe asks for MySQL, enter host
127.0.0.1, user, password, and database (you need MySQL installed on the VPS first)
The panel at http://your-ip:40120 is exposed to anyone scanning the port. For production, restrict port 40120 in Windows Firewall to your admin IP only — players don’t need panel access, just you. Port 30120 (game) stays open to everyone.
Open the ports in Windows Firewall
Windows Firewall blocks inbound ports by default. Without explicit rules, the server starts but nobody can connect.
Create the inbound rules through PowerShell (replace YOUR-ADMIN-IP with your home IP to restrict the panel):
New-NetFirewallRule -DisplayName "FiveM Game UDP" -Direction Inbound -Protocol UDP -LocalPort 30120 -Action Allow
New-NetFirewallRule -DisplayName "FiveM Game TCP" -Direction Inbound -Protocol TCP -LocalPort 30120 -Action Allow
New-NetFirewallRule -DisplayName "txAdmin Panel" -Direction Inbound -Protocol TCP -LocalPort 40120 -RemoteAddress YOUR-ADMIN-IP -Action AllowIf you don’t want to restrict the panel (access from any IP), remove -RemoteAddress YOUR-ADMIN-IP from the last line. Not recommended for production.
Persist the server as a Windows service
Running FXServer.exe in a PowerShell window over RDP works for testing, but the server dies when you disconnect. For production, register it as a service using NSSM — it starts on boot, restarts on crash, and runs without an interactive session.
Download NSSM and unpack it to C:\Tools\nssm\:
New-Item -ItemType Directory -Force -Path C:\Tools\nssm
Invoke-WebRequest -Uri "https://nssm.cc/release/nssm-2.24.zip" -OutFile C:\Tools\nssm.zip
Expand-Archive -Path C:\Tools\nssm.zip -DestinationPath C:\Tools\nssm -Force
Remove-Item C:\Tools\nssm.zip
$env:Path += ";C:\Tools\nssm\nssm-2.24\win64"Register the server as a Windows service:
nssm install FiveM "C:\FXServer\server\FXServer.exe" "+set serverProfile default +set txAdminPort 40120"
nssm set FiveM AppDirectory "C:\FXServer\server"
nssm set FiveM AppStdout "C:\FXServer\server-data\logs\stdout.log"
nssm set FiveM AppStderr "C:\FXServer\server-data\logs\stderr.log"
nssm set FiveM AppRotateFiles 1
nssm set FiveM AppRotateBytes 10485760
nssm set FiveM Start SERVICE_AUTO_START
nssm start FiveMThe service will come up and stay in Running state. From here on, it boots automatically with the VPS.
If you left FXServer.exe running in a PowerShell window and start the NSSM service, two processes will fight for port 30120 — the second one crashes in a loop. Close the PowerShell window or run Stop-Process -Name FXServer -Force before nssm start.
Verification
Confirm the server responds on both ports and shows up for players.
Check the service status and test the ports:
Get-Service FiveM
Test-NetConnection -ComputerName localhost -Port 40120
Test-NetConnection -ComputerName localhost -Port 30120Expected status: Running on the service, TcpTestSucceeded: True on port 40120, and an ICMP/TCP response on 30120.
Open the FiveM client on your PC, go to “Servers > Direct Connect” and enter:
YOUR-PUBLIC-IP:30120If it connects and loads the world, the setup is complete. If you see “couldn’t connect”, check the firewall rules and that the service is Running.
Troubleshooting
”Server is using an invalid license key”
The Cfx.re key was generated with the wrong IP or an incompatible hostname. Go back to keymaster.fivem.net, edit the existing key with the current VPS IP, and save. The change propagates in ~30 seconds. Restart the service with nssm restart FiveM.
txAdmin doesn’t open in the browser (timeout)
Most likely port 40120 isn’t open in Windows Firewall, or the rule’s -RemoteAddress is restricting it to an IP that isn’t yours. Run Get-NetFirewallRule -DisplayName "txAdmin Panel" | Get-NetFirewallAddressFilter to see the allowed IP and adjust if needed.
Server crashes in a loop right after boot
Almost always a broken resource. Stop the service, run .\FXServer.exe +set serverProfile default manually, and read the error in the console — it usually points to the exact resource in +exec server.cfg. Comment out the line for the failing resource in server-data\server.cfg and restart.
Next steps
- Automatic database backups: schedule
mysqldumpthrough Task Scheduler — losing the MySQL database with 200 registered players is the worst day of your week. - Reverse proxy with HTTPS: put Caddy or Nginx in front of the txAdmin panel so you can reach it at
panel.yourdomain.comwith a valid TLS certificate. - RAM/CPU monitoring: FiveM with 32+ slots and heavy mods ramps up consumption fast — use the txAdmin panel itself or an external tool.
- Admin whitelist: configure additional users in the panel with granular permissions (kick, ban, restart) without handing out the master password.
If you’re moving this to production, a Hostini Windows VPS already ships with port 30120 open by default on the DDoS protection and a high-clock CPU tuned for single-threaded game servers like FiveM — saving you the initial network tuning and keeping latency under 30 ms on most routes across the Americas.
Frequently asked questions
Do I need a separate Cfx.re key for each FiveM server?
Yes. Every server (each txAdmin instance running on a different port) needs its own key generated at keymaster.fivem.net. The key binds IP + port — running two instances with the same key lets the second start but it won't show up in FiveM's public list. Generation is free and instant through your Cfx.re account.
What's the difference between txAdmin and plain FXServer?
FXServer is the binary that actually runs the FiveM server. txAdmin is a Node.js wrapper that starts alongside it, exposes a web panel (port 40120 by default), handles start/stop, monitors crashes, backs up the database, and gives multi-user access to the server. Since 2022, Cfx.re ships both together in the same zip — txAdmin isn't optional for new setups.
Can I run txAdmin without opening port 30120?
Not for a playable server. Port 30120 (UDP + TCP) is FiveM's game port — players connect directly to it. txAdmin uses 40120 (TCP) only for the web panel, which can be restricted to your IP. But if you close 30120, nobody can join the server. On a Hostini VPS, open both in Windows Firewall.
txAdmin asks for a master password on first access and I lost it — how do I reset it?
Stop the service, open PowerShell in the server directory, and run `FXServer.exe +set txAdmin-resetPassword 1`. It prints a 4-digit PIN to the console. Go back to the web panel and use the PIN to create a new password. This command only works with the service stopped — txAdmin won't allow a reset while an instance is active.
The web panel runs over HTTP — how do I add HTTPS?
Put a reverse proxy in front. Nginx or Caddy on another VPS (or the same one) with Let's Encrypt solves it in 5 minutes. Point proxy_pass to http://127.0.0.1:40120 and set the X-Forwarded-For / X-Forwarded-Proto headers. txAdmin respects those headers and generates absolute links with https://. Don't try to terminate TLS directly in Node — it's not supported.
How much RAM does a FiveM server with txAdmin use?
Empty server on the default loop: ~600 MB. With 32 active slots, full city map, and 40-60 typical resources (ESX/QBCore): 4-6 GB of RAM. txAdmin itself uses ~150 MB. For production with 64+ slots, plan for 8 GB of RAM and a high-clock CPU — FiveM is single-threaded on the main script, so clock beats core count.