A FiveM server that refuses to start always tells you why: the answer is in the first twenty lines of the log. You just need to know where to look and what the messages mean. Here are the cases our support team sees most often.
1. Read the right log
There are three places to check, depending on your setup:
journalctl -u fivem -n 80 --no-pager # server started by systemd
tmux attach -t fivem # server started in tmux
# txAdmin: Live Console tab
Look for the first error, not the last one: the others often follow from it. An error shown in red or prefixed with ^1 in the console is blocking; a warning is not.
2. Licence key problems
| Message | Cause and fix |
|---|---|
Invalid license key | The key was copied incorrectly, or the quotes are missing in sv_licenseKey. Generate a new one on portal.cfx.re if needed. |
License key does not match server IP | The key is tied to another IP address. Change the associated address in the Cfx.re portal, or create a new key for this server. |
Your license key has been banned | The key has been suspended, usually for breaching the terms of use. Only Cfx.re can restore it, so contact them. |
Could not contact Cfx.re | The server has no outbound Internet access. Check DNS resolution and your outbound firewall rules. |
Keep your licence key private: never share it or leave it visible in a screenshot of your configuration.
3. Port in use, players getting kicked
Address already in use: another process is already listening on the port, almost always a previous instance that did not stop properly.
ss -tulpn | grep 30120
systemctl stop fivem # or kill the remaining process
Players connect and are disconnected immediately with a timeout message: the usual cause is a port open in TCP but not in UDP. FiveM needs both.
ufw allow 30120 comment 'FiveM TCP and UDP'
ufw status | grep 30120
Also check that your server.cfg contains both listening lines, and that the server listens on all interfaces:
endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"
4. Failed resources
Couldn't find resource X: the name inensuredoes not match the folder name. Watch the capital letters: Linux treatsesx_menu_defaultandESX_Menu_Defaultas different names, unlike Windows. This often happens after moving from a Windows server.Failed to load scriptfollowed by a syntax error: the script is incompatible with your build, or was corrupted during transfer.Unable to find dependency: a resource needs another one started before it. The order ofensurelines matters:oxmysqland the framework first, everything else after.- A resource starts and then stops by itself: read the lines just before it stops, the real error is almost always there.
To find the culprit, comment out half of your ensure lines, restart, then keep halving: three or four tries are usually enough.
5. Database errors
[oxmysql] Connection refused or Access denied for user: the connection string is wrong, or MariaDB is not running.
systemctl status mariadb
mariadb -u username -p database_name -e "SELECT 1;"
If this command works but the server still fails, compare the connection string in server.cfg character by character. Classic mistakes are a password with an unencoded special character, or localhost used when the server runs in a container. See also securing MariaDB.
6. The server starts but is not in the list
- Check that
sv_master1has not been emptied in a configuration you copied from elsewhere: this deliberately removes the server from the public list. - Make sure the port can be reached from outside, not only locally. See configuring UFW.
- Wait a few minutes after a full start: listing is not instant.
- In the meantime, players can still join directly with
connect address:30120in the F8 console.
7. The checklist when nothing works
- Read the first error in the log, not the last one.
- Start with a minimal
server.cfgand no added resources: if it starts, the problem is in your resources. - Check the licence, then the TCP and UDP listening lines.
- Re-enable resources half at a time until you isolate the faulty one.
- Check disk space with
df -h: a full disk causes confusing errors. - As a last resort, start from a clean txAdmin installation and re-import your resources one by one.
Need a server for your community? See our FiveM server plans.
Frequently asked questions
Why does my FiveM server say "Invalid license key"?
The key was usually copied incorrectly or is missing its quotes in sv_licenseKey. Check the line in server.cfg, and generate a new key on portal.cfx.re if needed.
Why do players time out when connecting to my FiveM server?
The most common cause is port 30120 being open in TCP but not in UDP. FiveM needs both, in your firewall and in the endpoint lines of server.cfg.
Which port does a FiveM server use?
Port 30120 by default, in both TCP and UDP. You can change it in the endpoint lines of server.cfg, but it must then be opened in the firewall as well.










