FiveM uses a single port, 30120, but it uses it on TCP and UDP at the same time. Opening only one of the two is the number-one cause of "my server does not show up" or "I connect and get dropped".
The ports
| Port | Protocol | What for | Open it? |
|---|---|---|---|
| 30120 | TCP | Server list and resource downloads | Yes |
| 30120 | UDP | The game itself | Yes |
| 40120 | TCP | txAdmin web panel | Better not (see below) |
If you changed the port in your server.cfg with endpoint_add_tcp and endpoint_add_udp, use that number everywhere below.
Windows: paste this into PowerShell as administrator
New-NetFirewallRule -DisplayName "FiveM TCP 30120 (in)" -Direction Inbound -Protocol TCP -LocalPort 30120 -Action Allow -Profile Any
New-NetFirewallRule -DisplayName "FiveM UDP 30120 (in)" -Direction Inbound -Protocol UDP -LocalPort 30120 -Action Allow -Profile Any
New-NetFirewallRule -DisplayName "FiveM TCP 30120 (out)" -Direction Outbound -Protocol TCP -LocalPort 30120 -Action Allow -Profile Any
New-NetFirewallRule -DisplayName "FiveM UDP 30120 (out)" -Direction Outbound -Protocol UDP -LocalPort 30120 -Action Allow -Profile Any
And to check the server is listening, with FXServer running:
Get-NetTCPConnection -LocalPort 30120 -State Listen
Get-NetUDPEndpoint -LocalPort 30120
Linux
# Ubuntu / Debian
ufw allow 30120/tcp
ufw allow 30120/udp
ufw status numbered
# AlmaLinux / Rocky
firewall-cmd --permanent --add-port=30120/tcp
firewall-cmd --permanent --add-port=30120/udp
firewall-cmd --reload
# Listening?
ss -lntup | grep 30120
txAdmin: do not open it to the world
txAdmin listens on 40120 and from there the whole server is controlled. Exposing it to the internet leaves your admin panel open to anyone scanning the IP — and your IP gets scanned within minutes of the machine booting.
The sensible route is an SSH tunnel. From your own computer:
ssh -L 40120:localhost:40120 root@YOUR_IP
Then open http://localhost:40120 in your browser. While the SSH session is up it is as if txAdmin ran on your own PC, with nothing exposed. If you must open it anyway, at least give it a long password and, in the firewall, allow 40120 only from your own IP.
My server is not in the list
In order of likelihood:
- The TCP or the UDP port is missing. Check you have both. The server list runs over TCP; the game over UDP.
- The licence key. If it is expired, deleted or mis-pasted, the server boots but never registers. The error is in the first lines of the console. Keys are created for free at
portal.cfx.re(Keymaster no longer exists): how to get one. - Private mode. A
sv_master1 ""line inserver.cfgmakes the server show as private, with joining from the list disabled. Delete it if you do not want that. (sv_endpointprivacyhas nothing to do with it: it only hides players' IPs.) - The server is not listening. The commands above. If they return nothing, FXServer did not start properly.
- AntiDDoS filtering. Your service page, Security tab. If you created filters by hand, 30120 must be there on both TCP and UDP.
If you want to work out how much CPU and RAM your server will need beforehand, we have a FiveM resource calculator and a server.cfg generator that already sets the endpoints correctly.
Not set up yet? There is a full guide for Windows and for Linux, and more "not showing up" causes in this checklist.