FiveM server ports: setup and configuration

Ports are essential for your FiveM server to work. Without the correct port settings, players cannot connect and your server will not appear in the server list. This article explains which ports FiveM uses and how to configure them properly.

Which ports does FiveM use?

A FiveM server uses the following ports by default:

  • TCP 30120: the main port players connect to.
  • UDP 30120: the same port number, but UDP, for game traffic.

On the HostValues game panel, these ports are automatically assigned to your server. The port number may differ from 30120 if your server was given a different number. Check the exact number at the top of your server page in the game panel.

Changing the port in server.cfg

The port is set in the server.cfg file with the following lines:

endpoint_add_tcp "0.0.0.0:30120"

endpoint_add_udp "0.0.0.0:30120"

Replace 30120 with the port number assigned to your server in the game panel. Always use the same number for both TCP and UDP.

Ports on a VPS

If you run FiveM on your own VPS instead of the game panel, you need to open the ports in your firewall yourself. On Ubuntu or Debian, use UFW:

  1. ufw allow 30120/tcp
  2. ufw allow 30120/udp

Verify with ufw status that the rules are active.

Additional ports for txAdmin

If you use txAdmin for server management, it requires its own web port. By default this is port 40120, but it may vary. Open this port in your firewall if you want to access txAdmin remotely:

ufw allow 40120/tcp

Common mistakes

  • Port not opened in the firewall: the server starts, but players cannot connect. Always verify that both TCP and UDP are open.
  • Wrong port number in server.cfg: the number in your configuration must match the port that is actually assigned or opened.
  • Port already in use: if another application uses the same port, FiveM will not start. Check with ss -tuln | grep 30120 whether the port is available.

Looking for FiveM hosting with pre-configured ports? Check out our FiveM hosting plans.

Can I run multiple FiveM servers on the same machine?

Yes, but each server must have its own port number. Give the second server port 30121, for example, and open that number in your firewall as well. Adjust the endpoint_add_tcp and endpoint_add_udp lines in each server.cfg accordingly.

Why can players not find my server in the list?

Verify that your license key is valid, that the ports are configured correctly and that your firewall allows both TCP and UDP traffic. Use an online port checker to confirm the port is reachable from outside your network.

Do I need to open ports on the HostValues game panel?

No. On the HostValues game panel, ports are already set up and opened for you. You only need to verify the correct port number in server.cfg.


Still stuck? Open a support ticket, our team is happy to help.

Back to the knowledge base