FiveM server troubleshooting: server list, ports, database, lag
A broken FiveM server almost always tells you what is wrong, as long as you know where to look. This guide walks through the most common failures in the order they tend to show up: the server is missing from the server list, players can't connect, the license key is refused, txAdmin won't respond, oxmysql can't reach the database, a resource refuses to start, two scripts fight each other, or the city lags at peak hours.
For each one you get the symptom, the likely cause and the diagnostic commands to run. The settings quoted come from the official FiveM documentation, checked in October 2026. The last part covers what changes when your server is hosted by Nova Studio.
01First things first: read the console, stop guessing
The server console (the FXServer window, or the live console in your hosting panel) is your first source. An error is nearly always named there, along with the resource behind it. The useful habit is to scroll up to the FIRST error after startup: the ones that follow are often just knock-on effects.
- Restart the server and note the time, so you know which lines to read.
- Look for red or yellow lines and the words SCRIPT ERROR, Couldn't, Failed, Warning. The name in brackets or after @ is the resource at fault.
- In the server console, status lists connected players with their identifier and ping: a server that answers status is running, even if nobody can see it in the list.
- On the player side, F8 opens the game console: that is where connection errors show up and where you type connect, resmon or netgraph.
- Change one thing at a time, then restart. Three fixes at once make the real cause impossible to pin down.
02Your FiveM server is not showing in the server list
According to the FiveM documentation, a server that is missing from the list or shown as private is most often down to port forwarding or a firewall. Before changing anything, split the problem in two: can the server be reached, and is it being announced to the list?
- Test a direct connection: from a network other than the server's, open F8 in FiveM and type connect IP:30120 (with your own address and port). If it fails, the problem is the network: jump to the ports section.
- Open http://IP:30120/info.json in a browser. A JSON response proves the server answers over TCP.
- In server.cfg, the #sv_master1 "" line must keep its leading #. Without it, the server is announced as private and the connect button in the list is grayed out.
- Make sure sv_hostname, sets sv_projectName and sets sv_projectDesc are filled in: the documentation says a server with no project name or description reports an error at startup and may not be listed.
- Give it time: listing can take up to eight minutes, and the listing service has its own outages now and then.
- If everything else checks out, look at the router: a device that rewrites UDP source ports (NAT) can stop the server from being announced.
| Symptom | Likely cause | Where to look |
|---|---|---|
| Not listed, connect fails | port closed or not forwarded | firewall, router, endpoint_add_tcp and endpoint_add_udp |
| Listed as private | sv_master1 uncommented | server.cfg |
| Listed, but joining times out | UDP blocked, TCP open | UDP firewall rule on 30120 |
| Not listed, connect works | announcement refused or not done yet | license key, project name, delay |
03Ports 30120 and 40120
By default FXServer listens on port 30120, over TCP AND UDP: server.cfg declares it with endpoint_add_tcp "0.0.0.0:30120" and endpoint_add_udp "0.0.0.0:30120". The documentation advises changing only the port, and touching the address only on a machine with several network interfaces. txAdmin serves its web interface on port 40120 over TCP.
| Port | Protocol | Role | Open to the internet |
|---|---|---|---|
| 30120 | TCP | connection, resource downloads, info.json | yes |
| 30120 | UDP | game traffic | yes |
| 40120 | TCP | txAdmin web interface | only if you need remote access |
| 3306 | TCP | MariaDB or MySQL | no, never |
On Linux with ufw: ufw allow 30120/tcp then ufw allow 30120/udp. On Windows, in an administrator PowerShell: New-NetFirewallRule -DisplayName FiveM -Direction Inbound -Protocol UDP -LocalPort 30120 -Action Allow, then the same rule for TCP. Behind a home router, forward both protocols to the local address of the machine.
04Cfx.re license key refused
Every FiveM server needs a license key, set in server.cfg with sv_licenseKey. You create it on portal.cfx.re under "Servers", and it starts with cfxk_. A missing key produces the message no license key was specified; a revoked or invalid key usually makes the server shut down right after it starts.
- The sv_licenseKey line still holds the sample value (changeme), or it is commented out.
- The key was pasted wrong: a stray space, an extra quote, a missing last character.
- The key was revoked on the portal, or belongs to an account that no longer has access.
- The slot count (sv_maxclients) is higher than your Cfx.re account allows: the documentation then says to run a recent server build and stay within your account limit.
- The server build (the artifact) is too old: update it before digging any further.
05txAdmin errors
txAdmin is the web panel and in-game menu that ship with FXServer to start, stop and monitor a server. On first boot it creates a txData folder and prints in the console the address where you set up your account. It also restarts the server on its own when it crashes or hangs, so a server stuck in a restart loop is not a txAdmin failure: it is a sign of an error to read just before each restart.
- The interface will not open on port 40120: the firewall blocks it, or txAdmin listens on another interface. With a hosting provider, the address and port are set by them: use the ones printed in the console.
- The server won't start from txAdmin: compare the ports declared in server.cfg with the ones txAdmin expects. The game port cannot be 40120, and txAdmin's port cannot be 30120.
- The server restarts in a loop: open the txAdmin live console and read the last lines before it stops. It is almost always a resource that crashes or blocks the server.
- You are testing FiveM for GTA V Enhanced, in early access since July 2026: several hosts still report txAdmin as unavailable there; worth testing before you rely on it.
06oxmysql can't connect to the database
oxmysql connects your resources to the MariaDB or MySQL database. It reads a single variable, mysql_connection_string, which you set with set BEFORE any resource starts, in one of two forms: mysql://user:password@host:3306/database, or user=…;password=…;host=…;port=3306;database=…. Its authors recommend MariaDB over MySQL.
| Message | Likely cause | Fix |
|---|---|---|
| ECONNREFUSED | the database is not running, or wrong host or port | start MariaDB, check port 3306 and the address |
| ER_ACCESS_DENIED_ERROR | wrong user or password, or user not allowed from this machine | check the credentials and the user's privileges |
| ER_BAD_DB_ERROR (Unknown database) | database missing or misnamed | create the database or fix its name |
| Credentials misread | special character in the password | switch format or change the password |
- Put set mysql_connection_string at the very top of server.cfg, then ensure oxmysql before any resource that uses the database.
- Try the same credentials in a SQL client: if that cannot connect either, the problem is the database, not FiveM.
- Under Docker or in a hosting panel, localhost points to the game container, not the database: use the address your host gives you.
- Keep the characters ; , / ? : @ & = + $ # out of the password: the oxmysql documentation flags them as a source of parsing errors.
07A resource won't start
A resource is a folder under resources with an fxmanifest.lua file at its root. ensure name starts it (or restarts it if it is already running), and refresh makes the server rescan for folders added since it launched. When a resource fails, the console nearly always explains why in one of these forms.
| Message | Likely cause | Fix |
|---|---|---|
| Couldn't find resource | folder misnamed, misplaced, or archive unpacked one level too deep | fxmanifest.lua must sit directly in the resource's folder |
| Could not find dependency | a required resource is missing or starts too late | install it and start it first |
| Failed to load script | a file listed in the manifest cannot be found | check the paths, and letter case on Linux |
| SCRIPT ERROR | a bug in the code, at the file and line shown | read the line, fix it or report it to the author |
08Script conflicts
A server can start without a single error and still misbehave: items vanishing, duplicate menus, money that does not update. The cause is often a conflict between two resources, which is harder to spot than a plain error.
- Two resources doing the same job: two inventories, two targeting systems, two phones or two HUDs overwrite each other.
- The same resource started twice, under two folder names, or once on its own and once through the [folder] category that contains it.
- A script written for another framework: an ESX script won't run on QBox without being adapted, and the reverse is true too.
- The wrong start order: the framework and its libraries must start before the scripts that rely on them.
- A shared library that is too old, while several recent scripts expect a newer version.
09Lag, stutter and resmon
"The server is lagging" covers three different problems: a heavy script on players' machines, a server whose main loop keeps stalling, or a saturated network. Each one has its own tool, and the wrong tool shows nothing.
| Symptom | Where to look | Tool |
|---|---|---|
| Low frame rate for players | a heavy client-side resource | resmon true in the F8 console |
| hitch warning in the server console | the server loop blocked by a script | profiler record 500 in the server console |
| Players teleporting or desyncing | the network or the sync load | netgraph true in the F8 console |
| Lag only at peak hours | CPU or slow database queries | profiler at peak time, and machine load |
- In game, open F8 and type resmon true: the monitor shows CPU time in milliseconds and memory, resource by resource.
- If the console answers Access denied for command resmon, the client has to run in developer mode: launch FiveM with the +set moo 31337 argument, or switch to an update channel other than production.
- Sort by CPU time. A resource that stays above one millisecond while nobody is using it deserves a closer look.
- On the server, profiler record 500 captures 500 frames, profiler view gives you a link to open in Chrome, and profiler saveJSON file.json keeps the capture for later.
10What changes when Nova hosts your server
With Nova Studio, a good part of this guide stops being your problem: the machine, its ports and its anti-DDoS are handled by us, the database and oxmysql come configured, and the QBox base with its 67 modules ships, is tested and is updated as one, for every server at once. Conflicts between the base's inventory, phone or targeting don't happen, because there is only one of each.
- A diagnosis on the server page flags a server stuck by a script, a database that stopped answering, or fewer slots than your plan, with next steps in the diagnosis documentation.
- The live console, read-only from the site, to read the first error after a restart.
- The Files screen for your own scripts, uploaded into resources/[client] and turned on from the Resources card, as the documentation on your scripts explains.
- Your Cfx key is replaced from the Configuration screen, and the status page tells you whether an incident affects the whole platform.
What stays with you: your own scripts. On Nova, ox_lib is provided by nova_lib and no ox_lib folder exists on disk: in the fxmanifest of a script, the @ox_lib/init.lua line must be replaced with @nova_lib/shared/lib_init.lua, or the console shows "Failed to load script". Plans run from NOVA at €99 a month to NOVA INFINITY at €229 a month, with NOVA+ at €149 in between; the pricing page shows the current offers and the ones you can buy today.
Frequently asked questions
Why is my FiveM server not showing in the server list?
Most often a closed port: 30120 has to be open over both TCP and UDP. First try connect IP:30120 in the F8 console from another network. If the direct connection works, check that the sv_master1 line is commented out, that sv_projectName and sv_projectDesc are set and that the license key is valid, then wait up to eight minutes.
Which ports does a FiveM server need?
Port 30120 over TCP and UDP for the game, and port 40120 over TCP for the txAdmin interface if you need to reach it remotely. The database port, usually 3306, should never be open to the internet.
How do I fix an oxmysql error?
Read the error code. ECONNREFUSED means the database is down or the host is wrong, ER_ACCESS_DENIED_ERROR means bad credentials, ER_BAD_DB_ERROR means the database doesn't exist. Make sure set mysql_connection_string comes before ensure oxmysql, and test the same credentials in a SQL client.
Why does txAdmin keep restarting my server?
txAdmin restarts the server when it crashes or hangs. The cause is in the last console lines before each stop, most often a resource throwing errors or a loop that blocks the server. Turn that resource off, then restart.
How do I find the script that makes my server lag?
For players, type resmon true in the F8 console and sort by CPU time. On the server, run profiler record 500 in the console, then profiler view. If nothing stands out, turn your scripts off half at a time until the culprit is isolated.
Does a Nova-hosted server run into the same problems?
The machine, ports, database and framework are managed by Nova, so those failures aren't yours to fix. Your own scripts can still fail: the live console and the diagnosis on the server page tell you why.