Ports and firewall

Which ports to open for a FiveM server (30120)

Port 30120 on TCP and UDP, the txAdmin one, ready-made commands for Windows and Linux, and why your server is missing from the list.

3 min readUpdated on 6 October 2026FiveM

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

PortProtocolWhat forOpen it?
30120TCPServer list and resource downloadsYes
30120UDPThe game itselfYes
40120TCPtxAdmin web panelBetter 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:

  1. The TCP or the UDP port is missing. Check you have both. The server list runs over TCP; the game over UDP.
  2. 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.
  3. Private mode. A sv_master1 "" line in server.cfg makes the server show as private, with joining from the list disabled. Delete it if you do not want that. (sv_endpointprivacy has nothing to do with it: it only hides players' IPs.)
  4. The server is not listening. The commands above. If they return nothing, FXServer did not start properly.
  5. 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.

Related articles

Back to the help centre

Can’t find what you need?

Open a ticket from your panel and we will answer in under 5 minutes.