How to setup a server on AWS (VPS)

Hi I am making a FiveM server and I already got the server files and the run.bat going but on AWS (VPS) I need to port forward and I tried to port forward the server ports but the server doesn’t show up on FiveM. So I am wondering if anybody knows how setup a server on AWS (VPS) and if they can help me. Thanks.

1 Like

I’m having the same issue here:


Plz let me know if you will fix it, and I’ll do the same

Will do man. I looked at your post and we have like the exact same issue haha.

Thx you so much!
Because this is my 3rd day on trying to fix it without any result and lot of people told me that everything is set up correctly. And in this forum is really hard to get an answer so…
Good luck for both of us and hope to see you soon :slight_smile:

@SkyHD any news my friend?

@ZioBasi I haven’t found anything yet man. But I am going to keep looking for a fix :smiley:

@ZioBasi @SkyHD
I have successfully set up on instances in the AWS environment.
What image is you instances running?
What is your security group rules?
What is your ACL rules?

You have to make sure you have your outbound AND inbound security rules set to allow all traffic, and make sure the source and destination is set to 0.0.0.0

One final thing. If you’re on Windows.

Make sure either your firewall is completly down. OR you have set rules to allow inbound and outbound connections for your specific ports. In this case for FiveM, it would be 30120

1 Like

You have to make sure you have your outbound AND inbound security rules set to allow all traffic, and make sure the source and destination is set to 0.0.0.0

Make sure either your firewall is completly down

Opening all ports??
Would not recommend this from a security perspective.
Just open the following ports in the ACL:
Inbound:
22 TCP
30120 TCP/UDP
23040 TCP
32768-65535 TCP

Outbound:
80 TCP
443 TCP
3306 TCP
30120 TCP/UDP
32768-65535 TCP/UDP

This works for me on an Amazon Linux AMI connecting to an external DB

He didnt say open all ports… it says make sure inbound and outbound security rules are set to allow all traffic.

I dont know anything about AWS but its wierd that it needs more ports opened when FiveM uses only 30120 as thats all i opened.

When you set your security group to allow all traffic, that means you allow all traffic on all ports, which is opening up all you ports to the outside? :S

uh no, it means open all traffic for that specific port… if you are going to open all ports you would simply just use DMZ… hence why he didnt say… all ports.

essentially saying make sure TDP/UDP are both there for inbound and outbound traffic.

You do realize that there is an allow all traffic option in SG and ACL of AWS, which is allowing all traffic on all ports right?

Like i said, i havent used AWS VPS’s however i would ask them if thats exactly what it means or if it means all traffic on selected ports that have been opened.

I know most VPS’s that do state “allow all traffic” only work on triggered ports that have been added to the port forwarding list.

But who knows, maybe they dont got the greatest security measures.

I just tried out 2 AWS instances. 1x Ubuntu, 1x Windows. Both of them were unable to be seen on the server list, despite a security group that allows all traffic. I can telnet into 30120 from my own machine to the instances just fine. Even with an Elastic IP, no difference.

I think it might be an issue with the private -> public IP binding or something. The heartbeat might be taking the private IP and thus it doesn’t show up on the server list as you cannot connect to that IP from the outside.

1 Like

the heartbeat is a simple packet that doesn’t contain ant IP details whatsoever, however if UDP source ports get modified that might break it.

mind you, the server works fine out of the box on Azure and Scaleway, both of which also use internal IPs with a NAT in front, and Azure also having some security system that doesn’t allow ports by default.

Hello sir, can you help me to setup server on aws ec2 ? Please im getting error when i try to join my server. Its shows Obtaining configuration from server failed. Error text : Not a valid client.

Please help me :pray:

Its just a simple fix. whichever security group you are using edit its inbound and outbound rules and open ports 30120 and 40120 for both tcp and udp.

- this is for inbound and

- this is for outbound rules of the security group im running on my instance

This worked for me and my server is literally running. I’m so happy.