Confirmedusers, editor
18
edits
No edit summary |
(update to 1.18.8 net7) |
||
Line 3: | Line 3: | ||
== Basic Setup == <!--T:1--> | == Basic Setup == <!--T:1--> | ||
===Ad-hoc Server=== <!--T:2--> | === Ad-hoc Server === <!--T:2--> | ||
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.) | ||
Line 11: | Line 11: | ||
---- | ---- | ||
===Dedicated Server=== <!--T:4--> | === Dedicated Server === <!--T:4--> | ||
Alternatively the game ships with a dedicated server program that you can start and leave on permanently without needing to log in yourself. | Alternatively the game ships with a dedicated server program that you can start and leave on permanently without needing to log in yourself. | ||
There are several ways to get a dedicated server up and running. | There are several ways to get a dedicated server up and running. | ||
Line 24: | Line 24: | ||
---- | ---- | ||
=== Dedicated Servers on Linux === <!--T:7--> | ==== Dedicated Servers on Linux ==== <!--T:7--> | ||
This describes how to set up the server as a service on Linux systems. | This describes how to set up the server as a service on Linux systems. | ||
===== Requirements | ===== Requirements ===== <!--T:8--> | ||
* [https://dotnet.microsoft.com/en-us/download/dotnet/7.0 .NET Runtime 7.0] This should be all needed to run a Vintagestory server. Everything else is just for convenience to start and manage it. | |||
* install <code>pgrep</code>, <code>screen</code> and <code>wget</code> using your systems package manager. | |||
===== Setup the server ===== | |||
=== | |||
<!--T:17--> | <!--T:17--> | ||
''' | '''1. Download the game''' | ||
<!--T:18--> | <!--T:18--> | ||
<span style="color:#E16100">Advice: ''Create a | <span style="color:#E16100">Advice: ''Create a separate directory for Vintage Story as the tar.gz does not contain a subfolder.''</span> | ||
mkdir server && cd server | mkdir server && cd server | ||
<!--T:19--> | <!--T:19--> | ||
Goto http://account.vintagestory.at/downloads<br> | Goto http://account.vintagestory.at/downloads<br> | ||
Copy the link of the newest " | Copy the link of the newest "vs_server_linux-x64_*.*.*.tar.gz" package ('''Linux Server (.tar.gz)''' under '''Show other available downloads of Vintage Story''')<br> | ||
Download with "wget" via console (''Vintage Story version 1. | Download with "wget" via console (''Vintage Story version 1.18.8 in this example''). | ||
<!--T:20--> | <!--T:20--> | ||
wget https://cdn.vintagestory.at/gamefiles/stable/ | wget https://cdn.vintagestory.at/gamefiles/stable/vs_server_linux-x64_1.18.8.tar.gz | ||
<!--T:21--> | <!--T:21--> | ||
''' | '''2. Extract tar.gz package''' | ||
<!--T:22--> | <!--T:22--> | ||
tar xzf | tar xzf vs_server_linux-x64_*.*.*.tar.gz | ||
<!--T:23--> | <!--T:23--> | ||
''' | '''3. Make server.sh script executable''' | ||
<!--T:24--> | <!--T:24--> | ||
Line 93: | Line 63: | ||
<!--T:25--> | <!--T:25--> | ||
''' | '''4. Edit server.sh file''' | ||
<!--T:26--> | <!--T:26--> | ||
Line 110: | Line 80: | ||
<!--T:30--> | <!--T:30--> | ||
''' | '''5. Open the port at the firewall (if needed)''' | ||
<!--T:31--> | <!--T:31--> | ||
Line 120: | Line 90: | ||
<!--T:32--> | <!--T:32--> | ||
''' | '''6. Server start and first steps''' | ||
<!--T:33--> | <!--T:33--> | ||
./server.sh start | ./server.sh start | ||
Wait for the startup to finish, then you can give yourself OP with | Wait for the startup to finish, then you can give yourself OP with | ||
./server.sh command "/op <youusername>" | ./server.sh command "/op <youusername>" | ||
<!--T:34--> | <!--T:34--> | ||
''' | '''8. Connect to your IP/Domain and have fun''' | ||
---- | ---- | ||
===== | ==== Simple Server start command ==== | ||
If you want to use a custom script or just manually start your server you can run | |||
dotnet VintagestoryServer.dll --dataPath /path/to/data | |||
Or | |||
./VintagestoryServer --dataPath /path/to/data | |||
if you have the <code>DOTNET_ROOT</code> environment variable set. | |||
< | |||
< | |||
==== Updating Servers ==== <!--T:89--> | ==== Updating Servers ==== <!--T:89--> | ||
Line 240: | Line 161: | ||
==== Installation ==== <!--T:61--> | ==== Installation ==== <!--T:61--> | ||
<!--T:64--> | <!--T:64--> | ||
''' | '''1. create a user''' | ||
adduser --shell /bin/bash --disabled-password gameserver | adduser --shell /bin/bash --disabled-password gameserver | ||
Line 263: | Line 173: | ||
<!--T:66--> | <!--T:66--> | ||
''' | '''2. Download the game''' | ||
cd /srv/gameserver/vintagestory | cd /srv/gameserver/vintagestory | ||
<!--T:67--> | <!--T:67--> | ||
Goto http://account.vintagestory.at/downloads<br> | Goto http://account.vintagestory.at/downloads<br> | ||
Copy the link of the newest " | Copy the link of the newest "vs_server_linux-x64_*.*.*.tar.gz" package ('''Linux Server (.tar.gz)''' under '''Show other available downloads of Vintage Story''')<br> | ||
Download with "wget" via console (''Vintage Story version 1. | Download with "wget" via console (''Vintage Story version 1.18.8 in this example''). | ||
<!--T:68--> | <!--T:68--> | ||
wget https://cdn.vintagestory.at/gamefiles/stable/ | wget https://cdn.vintagestory.at/gamefiles/stable/vs_server_linux-x64_1.18.8.tar.gz | ||
<!--T:69--> | <!--T:69--> | ||
''' | '''3. Extract tar.gz package''' | ||
<!--T:70--> | <!--T:70--> | ||
tar xzf | tar xzf vs_server_linux-x64_1.18.8.tar.gz | ||
''' | |||
'''4. Change owner''' | |||
<!--T:71--> | <!--T:71--> | ||
Line 286: | Line 197: | ||
<!--T:72--> | <!--T:72--> | ||
''' | '''5. Create systemd service unit file''' | ||
<!--T:73--> | <!--T:73--> | ||
Line 298: | Line 209: | ||
[Service] | [Service] | ||
WorkingDirectory=/srv/gameserver/vintagestory | WorkingDirectory=/srv/gameserver/vintagestory | ||
ExecStart= | ExecStart=dotnet VintagestoryServer.dll --dataPath /srv/gameserver/data/vs | ||
Restart=always | Restart=always | ||
RestartSec=30 | RestartSec=30 | ||
Line 309: | Line 220: | ||
[Install] | [Install] | ||
WantedBy=multi-user.target | WantedBy=multi-user.target | ||
Make sure the new user has access to the <code>dotnet</code> command or replace the command with the full path to where you installed the dotnet runtime (if you picked a custom install). Or you can also use <code>ExecStart=VintagestoryServer --dataPath /srv/gameserver/data/vs</code> if you have the <code>DOTNET_ROOT</code> environment variable set. | |||
<!--T:74--> | <!--T:74--> | ||
''' | '''6. Create config file for rsyslog''' | ||
<!--T:75--> | <!--T:75--> | ||
Line 338: | Line 251: | ||
# Discard | # Discard | ||
if $programname == 'VSSRV' then ~ | if $programname == 'VSSRV' then ~ | ||
''' | '''7. restart rsyslog / enable service''' | ||
To activate rsyslog and your vintagestory server type these commands | To activate rsyslog and your vintagestory server type these commands | ||
systemctl restart rsyslog.service; | systemctl restart rsyslog.service; | ||
Line 405: | Line 318: | ||
Copy from step 6 and change these lines: | Copy from step 6 and change these lines: | ||
Description=Vintage Story Server 2 Unit | Description=Vintage Story Server 2 Unit | ||
ExecStart= | ExecStart=dotnet VintagestoryServer.dll --dataPath /srv/gameserver/data/vs2 | ||
SyslogIdentifier=VSSRV2 | SyslogIdentifier=VSSRV2 | ||
Create rsyslog file and copy code from step 7 | Create rsyslog file and copy code from step 7 |