FiveM’s default game port is 30120 (TCP and UDP). txAdmin commonly listens on 40120/tcp. Getting either wrong—especially forgetting UDP—is a frequent cause of “server works on localhost but friends cannot join.”
Default ports
| Service | Port | Protocol | Public? |
|---|---|---|---|
| FXServer game endpoint | 30120 | TCP + UDP | Yes |
| txAdmin web UI | 40120 | TCP | Optional; restrict if exposed |
| Custom endpoints | per endpoint_add_* | as configured | Only if you publish them |
Confirm what you actually configured in server.cfg:
endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"
If you changed the port, every firewall rule and direct-connect URL must match.
Managed game hosting vs your own VPS
- Chapter22 game hosting — ports are provisioned with the server. Use the panel connection info; you typically do not edit UFW yourself.
- Self-hosted on a VPS — open 30120/tcp, 30120/udp, and only then decide about 40120/tcp. Follow:
- Open ports on Linux - Open ports on Windows - Concept overview: VPS port forwarding explained
txAdmin exposure
# Linux UFW example — admin UI only from your IP
sudo ufw allow from YOUR.IP.ADD.RESS to any port 40120 proto tcp
Change the default password immediately. Prefer SSH tunnels for admin-only access when practical:
ssh -L 40120:127.0.0.1:40120 USER@VPS_IP
# then browse http://127.0.0.1:40120
Server list vs direct connect
Opening ports is necessary but not sufficient for list visibility. Key, project info, and listing status still matter—see FiveM Server Not Showing in Server List.
Quick verify
sudo ss -tulpn | grep -E '30120|40120'
sudo tcpdump -ni any port 30120
Have a friend direct-connect with connect IP:30120 (or your configured port) after both OS and provider firewalls allow TCP+UDP.
Related guides
- FiveM Port Forwarding Guide
- Which Ports Does a FiveM Server Use
- How to Open Ports on a Linux VPS (UFW, firewalld, iptables)
- How to Open Ports on a Windows VPS (Firewall + netsh portproxy)
- VPS Port Forwarding Explained (Firewall vs Home Router)
- FiveM Server Not Showing in Server List
Frequently Asked Questions
Do I need both TCP and UDP on 30120?
Yes for a normal public FXServer endpoint. Opening only TCP is a common reason clients fail while a TCP port checker looks “open.”
Must txAdmin (40120) be public?
Only if you administer from the public internet. Prefer restricting 40120/tcp to your IP or proxying it; do not leave default credentials exposed.
We use Chapter22 game hosting—do we open firewall ports ourselves?
Managed game plans allocate and expose the game ports for you. These VPS firewall steps apply when you self-host FXServer on your own VM.
Need help?
If you are stuck after following this guide, open a ticket from the Chapter22 client area with the exact error, the port or DNS change you made, and whether the service listens locally (ss / Resource Monitor) but fails externally.
Build the server. Grow the community. Start your next chapter.
