Few things are more frustrating than setting up a FiveM server only to watch it fail on launch. Whether you're staring at a cryptic console error or the process just silently exits, the root cause is almost always one of a handful of common problems. This guide walks you through the most frequent reasons a FiveM server won't start and exactly how to fix each one.
1. Port 30120 Is Not Open or Is Blocked by a Firewall
FiveM uses TCP and UDP port 30120 by default. If that port is blocked by your OS firewall, your hosting provider's network firewall, or your router, the server will either fail to bind or appear offline to players.
- On Linux, open the port with ufw allow 30120/tcp and ufw allow 30120/udp, then reload.
- On Windows, create inbound rules in Windows Defender Firewall for both TCP and UDP on port 30120.
- Check your hosting provider's dashboard — many VPS panels have a separate network-level firewall that must also allow the port.
- If you changed the default port in server.cfg, make sure the firewall rules match the new port number.
Run netstat -tuln | grep 30120 (Linux) or netstat -an | findstr 30120 (Windows) to verify the server process is actually listening on the expected port.
2. Invalid or Expired Server License Key
Every FiveM server needs a valid license key from the Cfx.re Keymaster. If your key is missing, expired, or tied to a different IP address, the server will refuse to start.
- Log in to keymaster.fivem.net and confirm the key is active.
- Make sure the IP address registered to the key matches your server's public IP.
- In your server.cfg, verify the line reads sv_licenseKey "YOUR_KEY_HERE" with no extra spaces or quotes.
- If you recently changed hosts or IPs, generate a new key for the new address.
3. Missing or Corrupt Server Artifacts
FiveM server artifacts are the core binaries that run your server. If they're incomplete, outdated, or corrupted, the server will crash immediately on launch.
- Download the latest recommended artifacts from the official FiveM builds page for your platform (Linux or Windows).
- Extract the artifacts into a clean folder — don't overwrite a partially corrupted set, start fresh.
- On Linux, make sure run.sh and the FXServer binary have execute permissions: chmod +x run.sh FXServer.
- Avoid using "latest optional" builds in production — stick with the recommended channel for stability.
4. server.cfg Syntax Errors
A single typo in server.cfg can prevent the entire server from starting. The FiveM config parser is strict and won't tolerate malformed lines.
- Check for unclosed quotes. Every quoted string must have both an opening and closing double-quote.
- Ensure ensure directives reference resources that actually exist in your resources folder.
- Remove or comment out any lines referencing resources you've deleted.
- Watch out for invisible characters — if you copied your config from a website, paste it into a plain-text editor first to strip formatting.
Editing server.cfg in word processors like Microsoft Word or Google Docs can insert hidden Unicode characters that break parsing. Always use a code editor like VS Code or Notepad++.
5. Database Connection Failures
If your server uses MySQL or MariaDB (most ESX/QBCore frameworks require it), a failed database connection will stop resources from loading and can crash the server entirely.
- Confirm MySQL/MariaDB is running: use systemctl status mysql on Linux or check Services on Windows.
- Verify the connection string in your server.cfg. A typical line looks like: set mysql_connection_string "mysql://user:password@localhost/database_name?charset=utf8mb4".
- Test the credentials manually by logging in with the same user and password: mysql -u user -p.
- Check that the target database exists and the user has full permissions on it.
- If MySQL is on a remote host, ensure the MySQL user is allowed to connect from your server's IP, not just localhost.
6. Resource Errors: Missing Dependencies & Load Order
Resource errors are the single most common reason for FiveM server errors after initial setup. A missing dependency or incorrect load order will cause cascading failures.
- Read the fxmanifest.lua (or __resource.lua) of any failing resource — the dependencies field tells you what must load first.
- In server.cfg, resources listed in ensure statements load in order from top to bottom. Place dependencies above the resources that need them.
- Common missing dependencies include oxmysql, es_extended, qb-core, and ox_lib. Make sure they're installed and ensured before anything that requires them.
- If a resource was downloaded as a ZIP, confirm the folder name matches what other resources expect — a folder named ox_inventory-main instead of ox_inventory will break references.
A reliable load order for QBCore servers typically starts with: oxmysql, qb-core, qb-smallresources, then the rest of your resources. For ESX, start with oxmysql, es_extended, then framework resources.
7. Out of Memory Errors
FiveM servers can consume significant RAM, especially with large frameworks, custom vehicles, and MLO interiors. If your server runs out of memory, it will crash without warning or log an out of memory error.
- Monitor RAM usage with htop (Linux) or Task Manager (Windows) while the server starts.
- A basic QBCore or ESX server needs at least 4 GB of RAM. Heavy servers with custom assets may need 8 GB or more.
- Remove unused resources — each loaded resource consumes memory even if no players are connected.
- Streaming assets (custom cars, maps, clothing) are major memory consumers. Audit your stream folder sizes and remove assets you no longer use.
At GoodLeaf, our game server hosting plans come pre-configured with optimized settings and enough resources to handle FiveM servers out of the box, so you can skip most of these infrastructure headaches.
8. txAdmin Won't Connect
txAdmin is the most popular web-based management panel for FiveM. If txAdmin won't connect to your server, the issue is usually separate from the FiveM server itself.
- txAdmin runs on its own port (default 40120). Make sure this port is also open in your firewall.
- Check that the server-data path configured in txAdmin matches the actual location of your server files.
- If txAdmin starts but shows "server offline," the FiveM process may be crashing on boot — check the FiveM console logs, not just the txAdmin interface.
- Clear the txAdmin cache by deleting the txData folder and reconfiguring if the panel becomes unresponsive after an update.
9. How to Read FiveM Server Console Errors
When your FiveM server fails to start, the console output is your best diagnostic tool. Knowing how to read it will save you hours of guesswork.
- Scroll to the first red or yellow error — later errors are often cascading failures caused by the first one.
- Look for lines containing [ERROR] or [SCRIPT ERROR]. These include the resource name and usually a line number.
- A message like "Could not find resource" means the resource folder is missing or misspelled in server.cfg.
- "Access denied" or "Authentication failed" messages point to license key or database credential issues.
- Stack traces with Lua or JavaScript file paths tell you exactly which resource and file is failing — start troubleshooting there.
Redirect your server console output to a log file for easier searching: ./run.sh 2>&1 | tee server.log. You can then use grep -i error server.log to find all error lines quickly.
Frequently Asked Questions
Why does my FiveM server start but no one can connect?+
The most common cause is a firewall or NAT issue. Your server may be running correctly on localhost but not reachable from the internet. Verify that port 30120 (TCP and UDP) is forwarded on your router (if self-hosting) and allowed through all firewalls. Also confirm your server license key is tied to the correct public IP address.
How do I fix 'server thread hitch warning' errors?+
Thread hitch warnings mean the server's main thread is being blocked for too long, usually by a poorly optimized resource. Check which resources were loading when the hitch occurred, disable them one at a time to isolate the culprit, and look for resource updates or alternatives. Insufficient CPU power can also cause hitches under load.
Can I run multiple FiveM servers on the same machine?+
Yes, but each instance needs its own unique port and separate license key. Change the endpoint port in each server's server.cfg (e.g., 30121, 30122) and generate a new key for each instance at keymaster.fivem.net. Make sure your machine has enough RAM and CPU cores to support multiple instances simultaneously.