Hosting » VPS » How do you port forward a FiveM server on a VPS?

How do you port forward a FiveM server on a VPS?

Last updated on September 25, 2022 @ 4:00 pm

When configuring a VPS, one of the first steps is to port forward the appropriate ports. This document will show how to port forward a FiveM server on a VPS.

To begin, you will need to know the IP address of the FiveM server. You can find this information by using the FiveM console or by querying the IP address of a player using the F5M API.

Once you have the IP address, you will need to open a port on your VPS to allow traffic to flow to and from the FiveM server. To do this, you will need to use the following command:

sudo ufw allow 8080/tcp

You will need to replace 8080 with the port that you would like to open on your VPS. Make sure to replace the port number with the actual port number.

Now that the port has been opened, you will need to restart the ufw service to activate the new configuration. To do this, you will need to use the following command:

sudo service ufw restart

Once the service has been restarted, you will need to verify that the port has been opened. You can do this by using the nmap tool. To do this, you will need to use the following command:

PRO TIP: If you are unfamiliar with port forwarding or your router’s configuration interface, we recommend that you do not attempt to port forward a FiveM server on a VPS. Incorrectly forwarding ports can make your server inaccessible to both you and your players.

nmap -P 8080

If the port has been opened, you will see a response that looks like the following:

PORT STATE SERVICE 8080/tcp open http

You can now access the FiveM server on the port that has been opened on your VPS. To do this, you will need to use the following address:

https://

If you encounter any issues while port forwarding or accessing the FiveM server, you can always contact support.

Madison Geldart

Madison Geldart

Cloud infrastructure engineer and tech mess solver.