How to setup a free FiveM SRV record with Lectron (Domain / Subdomain)

SRV record = Service Record

Supposedly you have a FiveM game server and you want to use a example.com address, you can do this by means of an A record and an SRV record. But how is the structure of this and how do you set it up?


Note: It is not necessary to create an A record if you host the FiveM server on our FiveM server hosting.

In general, you can already create an A record for play.example.com via the DNS management of your provider to the ip address of your server. The SRV record can sometimes be different per provider, how it can be set.

The SRV record must contain the following elements:

  • Service
  • Priority
  • Weight
  • Port
  • Target

For a FiveM play domain it will be something like this:

Service Priority Weight Port Target
_cfx._udp.play 10 10 The port of your FIveM server, the default FIveM server port is 30120 The target you want to connect to, it will define the IP of the server.
If you have set the play.example.com A record it is: play.example.com 
If you are using the Jestax FiveM servers it is something like server1.example.com

We have listed some examples of setups on different dashboards and services.


Cloudflare #

Step 1 #

Trough the Cloudflare domain Dashboard click on “DNS” to enter the DNS settings.

Navigation

Step 2 #

  • Click on the button “+ Add record” to drop down the new record form. If you do not want to setup the A record and use the already created A record like server1.example.com you can skip Step 2.As “Type” it is always default set to A so you can leave it as that.
  • In “Name” you fill in the name of your subdomain, in this example we want play.example.com so we fill in “play”.
  • In “IPv4 address” you need to fill in the IP of your server. If you host a FiveM server by Lectron, you can find that IP in your server dashboard at dashboard.lectron.com under the tab “Allocation Settings”.
  • “TLL” can just be left at “Auto”.
  • Make sure you disable Cloudflare Proxy on this record, by clicking on the orange cloud so it because “DNS only”.
  • Now click on Save.




  #

  #

  #

 

Step 3 #

To let FiveM now what port and what connection protocol to follow we have to setup an SRV record.

  • The “Type” has to be set to SRV, you can just select this out of the list.
  • In “Name” you fill in the name of your subdomain, in this example we want play.example.com so we fill in “play”.
  • In “Service” you fill in “_cfx”.
  • The “Protocol” must be UDP, you can just select it out of the list.
  • “TLL” can just be left at “Auto”.
  • In “Priority” you fill in “10”.
  • In “Weight” you fill in “10”.
  • In “Port” you fill in the port of your FiveM server.
  • If you did Step 2 then you put in “Target” the subdomain you created, for example “play.example.com”.
  • Now click on Save.

Once you have set this, it will work after 2-4 hours and you can use your play.example.com address.

Leave a Reply

Your email address will not be published. Required fields are marked *