Setting up a Multiplayer Server: Difference between revisions

From Vintage Story Wiki
Added "Advanced Setup" and "Using an SRV Record to point a domain to your server" to the page. Added examples on how to setup the record for OVH and Hetzner
No edit summary
(Added "Advanced Setup" and "Using an SRV Record to point a domain to your server" to the page. Added examples on how to setup the record for OVH and Hetzner)
Line 424: Line 424:
<!--T:88-->
<!--T:88-->
Have Fun!
Have Fun!
==Advanced setup==
===Using an SRV Record to point a domain to your server===
In some cases, you may not able to get a server with the default port (Multiple instances on the same server, paid hosts...), and you will have to add the port at the end of the server's address in order to connect to it.<br>
But you might want to avoid the need to specify the port (Easier to remember, look cleaner).
Lucky you, there is a way to point a domain to your server and avoid the need to add the port : SRV Records<br>
SRV Records allow you to point a domain/subdomain to your instance, while letting the game know the port to use.<br>
How to set up an SRV Records will depend on your domain provider, and you should check on their documentation before making any changes. However, the idea and values remain the same for every provider.<br>
Let's take a server with the following details :
* Address : <code>play.example.com</code>
* Port : <code>50030</code>
* Owned domain : <code>mydomain.com</code>
* Desired subdomain : <code>vintagestory.mydomain.com</code>
Your raw SRV Records should look something like this :
  _vintagestory._tcp.vintagestory.mydomain.com.  IN  SRV 10 10 50030 server.example.com.
The underscores and trailing dots are important! Here are some details :
* <code>_vintagestory</code> define the service, in our case, Vintage Story<br>
* <code>_tcp</code> define the protocol, Vintage Story use TCP<br>
* <code>vintagestory.mydomain.com.</code> is the subdomain we want to use. The trailing dot is important!<br>
* <code>IN SRV</code> Define the record type, don't change this<br>
* <code>10 10</code> are in order the priority and the weight of our record, in our case those are not important, as you are probably not going to load balance a Vintage Story server<br>
* <code>50030</code> is the port our instance is listening on<br>
* <code>server.example.com.</code> is the target, where the server is located. The trailing dot is mandatory as the target server is not on the same domain as us. If it was the case, you would only need to add the subdomain of the target without the trailing dot<br>
If you wanted to have your record pointing to your domain directly, you would have <code>mydomain.com.</code> instead of <code>vintagestory.mydomain.com.</code>
Here is how to do it for OVH and Hetzner (Don't forget to edit the values to suit your setup !) :
====OVH====
You will need to go to your DNS zone and add an entry, select the SRV Record type :
* Sub-domain : <code>_vintagestory._tcp.vintagestory</code> You don't need to add your domain, as their form do it for you.
* TTL : No need to change this
* Priority : <code>10</code>
* Weight : <code>10</code>
* Port : <code>50030</code>
* Target : <code>server.example.com.</code>
====Hetzner====
You will need to create a record from their DNS Console :
* Type : <code>SRV</code>
* Name : <code>_vintagestory._tcp.vintagestory.mydomain.com.</code>
Click on the Value field to enter the details :
* Priority : <code>10</code>
* Weight : <code>10</code>
* Port : <code>50030</code>
* Target : <code>server.example.com.</code>
Wait a few minutes for your record to propagate and then try to use it to connect to the server, using <code>vintagestory.mydomain.com</code> as the address.
You should now be all set up to easily share your server with the world !
</translate>
</translate>
Confirmedusers
2

edits