Halloween Edition36 maps, limited runlimited runShop the drop
Chapter 05 of 17The Server Handbook for FiveM

Ports, firewall and connecting

In short

When players cannot connect, or the server is missing from the list, the cause is almost always ports, the firewall or two missing convars.

PortProtocolPurposeOpen to
30120TCP + UDPGame connections and the HTTP endpoints (info.json)Everyone
40120TCPtxAdmin web panel (TXHOST_TXA_PORT changes it in txAdmin 8+)Only your IP, a VPN or a proxy
3306TCPMariaDB / MySQLNobody — bind to localhost
Linux (ufw)
sudo ufw allow 30120/tcp
sudo ufw allow 30120/udp
sudo ufw allow from YOUR.HOME.IP to any port 40120 proto tcp
sudo ufw allow OpenSSH
sudo ufw enable
Windows Firewall (run as administrator)
New-NetFirewallRule -DisplayName "FiveM TCP" -Direction Inbound -Protocol TCP -LocalPort 30120 -Action Allow
New-NetFirewallRule -DisplayName "FiveM UDP" -Direction Inbound -Protocol UDP -LocalPort 30120 -Action Allow
  1. Open http://your-ip:30120/info.json in a browser — it should return JSON describing the server.
  2. In FiveM press F8 and run connect your-ip:30120. If this fails, port forwarding or the firewall is wrong.
  3. Check that sv_master1 is commented out.
  4. Confirm sv_projectName and sv_projectDesc are set.
  5. Wait — a new server can take up to 8 minutes to appear in the list.
  6. Behind a NAT or gateway that rewrites UDP source ports, the server may not list; check your router or firewall documentation.

The Server Handbook for FiveM

This chapter is one of 17. The handbook also carries the console command and convar cheat sheets, a glossary and the official references every chapter is checked against.

Open the handbook