Setting up a Multiplayer Server: Difference between revisions

From Vintage Story Wiki
No edit summary
No edit summary
Line 7: Line 7:
<!--T:129-->
<!--T:129-->
If you want a temporary multiplayer experience it is enough to open a single player world, then click on "Open to Lan" in the escape menu. This will allow players in your local network to join.
If you want a temporary multiplayer experience it is enough to open a single player world, then click on "Open to Lan" in the escape menu. This will allow players in your local network to join.
If you want to allow players outside of your local network to join, you can then also click "Open to Internet" which will attempt to set up an external connection to join your server from the internet. This is done by a technique called UPnP and has to be enabled on your internet router, which it often is by default. In short, we estimate there's about a 60% success chance that 'Open to Internet' works instantly without issues. If it doesn't you would need to set up a so called "port forwarding" on your internet router, which can be tricky and frustrating at times, unfortunately. You would need to forward TCP Port 42420 to your computer in that case. (Google 'Port forwarding' with the name or model of your internet router to find help.)
If you want to allow players outside of your local network to join, you can then also click "Open to Internet" which will attempt to set up an external connection to join your server from the internet. This is done by a technique called UPnP and has to be enabled on your internet router, which it often is by default. In short, we estimate there's about a 60% success chance that 'Open to Internet' works instantly without issues. If it doesn't you would need to set up a so-called "port forwarding" on your internet router, which can be tricky and frustrating at times, unfortunately. You would need to forward TCP Port 42420 to your computer in that case. (Google 'Port forwarding' with the name or model of your internet router to find help.)


<!--T:3-->
<!--T:3-->
Line 28: Line 28:
* Open the game's application folder, it is <code>%appdata%/VintageStory</code> by default.
* Open the game's application folder, it is <code>%appdata%/VintageStory</code> by default.
* Run <code>VintagestoryServer.exe</code>.
* Run <code>VintagestoryServer.exe</code>.
* If Windows Firewall asks for permission, grant any necessary access
* You might need to forward port 42420 on your internet router if you want the server to be accessible from outside of your local network (for example, anyone who isn't on the same WiFi as you).
* You might need to forward port 42420 on your internet router if you want the server to be accessible from outside of your local network (for example, anyone who isn't on the same WiFi as you).
* You probably also want to use a custom --dataPath argument so as to not interfere with your single player game
* You probably also want to use a custom --dataPath argument so as to not interfere with your single player game
===== Using Windows on a virtual machine =====
There are some reports that LAN connection to a Vintage Story server running inside a Windows virtual machine (VM) can be slow, even when internet (WAN) connections have normal performance. This may depend on VM solution and network drivers.  If this affects you, a suggested workaround is to use the Paravirtualized network adapter (virtio-net) for network adapters. The drivers are located [https://docs.oracle.com/en/virtualization/virtualbox/6.0/user/nichardware.html here].
----
----