Setting up a Multiplayer Server/ru: Difference between revisions

From Vintage Story Wiki
Updating to match new version of source page
(Created page with "В обоих случаях вы должны заменить <code>playername</code> своим реальным именем игрока.")
(Updating to match new version of source page)
Line 151: Line 151:
== Основные Настройки ==
== Основные Настройки ==


<div class="mw-translate-fuzzy">
Как только ваш сервер будет запущен, вы можете просмотреть некоторые из следующих параметров конфигурации. Вы можете настроить сервер во время его работы с помощью команд или путем редактирования файла serverconfig.json, для этого сервер должен быть остановлен.
Как только ваш сервер будет запущен, вы можете просмотреть некоторые из следующих параметров конфигурации. Вы можете настроить сервер во время его работы с помощью команд или путем редактирования файла serverconfig.json, для этого сервер должен быть остановлен.
В windows по умолчанию этот файл находится по адресу "%appdata%/VintageStoryData/serverconfig.json".
В windows по умолчанию этот файл находится по адресу "%appdata%/VintageStoryData/serverconfig.json".
В Linux находится на уровне "'./data/serverconfig.json"' в каталоге сервера (напр., ''/home/vintagestory/server/data/serverconfig.json''  если настройки, как описано здесь)
В Linux находится на уровне "'./data/serverconfig.json"' в каталоге сервера (напр., ''/home/vintagestory/server/data/serverconfig.json''  если настройки, как описано здесь)
</div>


<div class="mw-translate-fuzzy">
{{Protip
{{Protip
|Самый простой способ настроить мир в соответствии с вашими пожеланиями — сначала создать его в одиночной игре, используя расширенные параметры создания мира, а затем загрузить его для использования в качестве сервера.
|Самый простой способ настроить мир в соответствии с вашими пожеланиями — сначала создать его в одиночной игре, используя расширенные параметры создания мира, а затем загрузить его для использования в качестве сервера.
}}
}}
</div>


"Объяснение значений в serverconfig.json вы можете найти здесь: [[server Config/ru]]"
"Объяснение значений в serverconfig.json вы можете найти здесь: [[server Config/ru]]"
Line 351: Line 355:


Приятной игры!
Приятной игры!
==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).
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 are now all set up to share your server with your custom domain.
{{Game navbox}}
43,360

edits