FiveM server not showing or players can't connect: port 30120 fix
Your FiveM server is not in the list, or players time out when they connect. Open port 30120 for TCP and UDP in the firewall and router, and test with F8 connect.
Your server runs and you can join it on your own PC, but players on the internet time out, or the server does not appear in the FiveM server list at all.
This is almost always a network problem, not a script problem. Here is how to open the right ports and test the result.
What to open
A FiveM server listens on port 30120, and it needs both protocols:
- TCP 30120: server list queries, connection handshake, HTTP resource downloads.
- UDP 30120: the game traffic and voice.
If only TCP is open, the server may answer queries but players cannot actually join. If only UDP is open, they time out earlier. Open both.
txAdmin, the web panel, uses a separate port, TCP 40120. Players never need it. Open it only if you manage the server from another machine, and consider limiting it to your own IP.
Check server.cfg
Your server.cfg should have these two lines, usually near the top:
endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"0.0.0.0 means "listen on every network interface", which is what you want. If you put a specific IP here and it is not an address of that machine, the server fails to bind.
If you run several servers on one machine, give each its own port (for example 30121) and open that one too.
Two other settings can keep you out of the list or off the public internet:
sv_lan 1is for local network only. Remove it, or set it to0, on a public server.- A line
sv_master1 ""stops the server from announcing itself to the list. Leave it out ofserver.cfgif you want to be listed.
Windows Firewall
On a Windows server or PC, add two inbound rules. In an Administrator PowerShell:
netsh advfirewall firewall add rule name="FiveM TCP 30120" dir=in action=allow protocol=TCP localport=30120
netsh advfirewall firewall add rule name="FiveM UDP 30120" dir=in action=allow protocol=UDP localport=30120Add 40120 the same way if you need txAdmin from outside. You can also open Windows Defender Firewall with Advanced Security and create the same rules in Inbound Rules.
Linux with ufw
sudo ufw allow 30120/tcp
sudo ufw allow 30120/udp
sudo ufw statusIf ufw is not active yet, allow SSH before you enable it, or you lock yourself out:
sudo ufw allow OpenSSH
sudo ufw enableCloud and hosting firewalls
Many VPS and cloud providers have a second firewall in their control panel (called security groups, firewall rules or network rules). The server's own firewall can be open and the traffic is still blocked there. Add TCP and UDP 30120 inbound in that panel as well.
Tip: if you use Cloudflare for your website, do not point the game connection at a proxied (orange cloud) record. FiveM traffic must reach the real server IP, so use the IP address, or a DNS record that is set to DNS only.
Router port forwarding (server at home)
If the server runs on a PC at home, your router must send the traffic to it:
- Give the PC a fixed local IP (a static lease or DHCP reservation), for example
192.168.1.50. - Open the router's admin page and find the port forwarding section (sometimes called NAT or virtual server).
- Create a rule that forwards TCP and UDP 30120 to
192.168.1.50, port 30120. - Save, and restart the router if it asks.
Some internet providers put you behind carrier-grade NAT and share one public IP between customers. In that case port forwarding cannot work, and you need a public IP from your provider, or a host with a real public address.
Test it
You can test without the server list. Start FiveM, press F8 to open the client console, and type:
connect 203.0.113.10:30120Replace the IP with your public one. Test from a different network than the server (your phone on mobile data with a hotspot, or a friend's PC), because from the same network the router may loop traffic back and hide a forwarding problem.
What the result tells you:
- It connects: the network is fine. If the list does not show you, wait a few minutes and check that your license key is valid, see the license key error.
- It times out: a port is closed somewhere. Recheck the firewall, the provider's firewall, and the router rules, in that order.
- It connects locally but not remotely: forwarding or provider firewall problem.
Still not in the list
A server can be reachable and still missing from the list. Check:
sv_hostnameis set inserver.cfg.- The license key is valid and matches the server IP.
- The server has been up for a few minutes. New listings are not instant.
sv_master1 ""andsv_lan 1are not set.
Checklist
| Symptom | Fix |
|---|---|
| Players time out when connecting | Open 30120 on both TCP and UDP in every firewall |
| Works on my PC, not for friends | Forward 30120 TCP and UDP on the router to the server PC |
| Server not in the list | Check the license key, sv_hostname, and remove sv_lan 1 and sv_master1 "" |
| Can't open txAdmin from another PC | Open TCP 40120, or use an SSH tunnel |
| Firewall open but still blocked | Check the hosting provider's own firewall panel |
| Cloudflare in front of the game | Use the plain IP, or a DNS only record |
Quick answers
Which ports does a FiveM server need?
Port 30120 on both TCP and UDP for the game server. txAdmin uses 40120 on TCP, and you only need to open that one if you want to reach the panel from outside.
Why can I connect locally but my friends cannot?
Locally you reach the server through your internal network. Friends come in from the internet, so the router must forward 30120 TCP and UDP to your PC, and the firewall must allow it.
How do I test the connection without the server list?
Open FiveM, press F8 to open the console, and type connect your.ip.address:30120. If that works, the server is reachable and only the listing is missing.

