How to host a community server

This document gives a brief overview of how to get your own community server started. In-depth management of the server (OS/hardware/port forwarding, etc.) itself is out-of-scope, but some tips are included. Anything directly related to the game will be mentioned here.

Note: Keep in mind that selling in-game services that lead to gameplay advantages is prohibited

Hosting options

Official servers run on Linux, and likewise community servers are recommended to also run on Linux, though Windows binaries are available. The documentation below contains information for both platforms.

Note: If you want to configure the server yourself, you could go for a hoster like Digital Ocean or Vultr. If you instead wish to have a pre-configured box, PingPerfect has support for the game.

Hardware requirements depend on how many players and AI you want to have running on the server, but generally speaking:

  • 4GB of RAM
  • A few gigs of disk space
  • The faster the CPU, the better


Server user

Linux

Prepare a new user account that will run the actual server. The command used may vary depending on the Linux distribution you go with, but on Ubuntu, this would be adduser mygameserveruser. Subsequent documentation will continue with mygameserveruser as your game server user, adjust where appropriate.

Windows

No suggestions at this time.


Installing the server files

The first step is to download the server binaries through Steam, and copy them over to your server instance. A suggestion for Linux systems would be to /var/IslesOfYore. From this point on the documentation will assume this path, but you can substitute it for your own if desired.

You could opt to do this manually (downloading through Steam Library -> Tools -> Isles of Yore Dedicated Server, and copying the files over to the server manually), but a smoother way of getting the server binaries is through SteamCMD.

Linux

  1. First install necessary packages for the server to run smoothly:
    apt-get update && apt-get install -y lib32gcc1 libc6-i386 lib32stdc++6 libsdl2-2.0 wget unzip
  2. Switch to the user we created earlier, e.g.: su mygameserveruser. Make sure you are in your home directory (cd ~/).
  3. Download SteamCMD with: try wget http://media.steampowered.com/client/steamcmd_linux.tar.gz and when it's done downloading, tar -xvzf steamcmd_linux.tar.gz to unpack
  4. Makes sure your shell is in the install directory, and run (after you change the install dir in the command):
    ./steamcmd.sh +force_install_dir YOUR_INTENDED_INSTALL_DIRECTORY +login anonymous +app_update 1827330 validate +quit
  5. Once that's done, connect to your server, escalate to root user (stay in the root user for the remaining duration of the guide), and make the server file executable:
chmod +x /var/IslesOfYore/IslesOfYoreServer.sh

Windows

  1. Create the installation folder, as mentioned above
  2. Download SteamCMD from https://steamcdn-a.akamaihd.net/client/installer/steamcmd.zip.
  3. Unzip SteamCMD and open a shell in the directory you unzipped in. Then run (after you change the install dir in the command):
    ./steamcmd.exe +force_install_dir YOUR_INTENDED_INSTALL_DIRECTORY +login anonymous +app_update 1827320 validate +quit


Firewall

Linux

We'll need to open a port on the server. The below commands assume using the UFW firewall tooling (apply the info to your own tool if you use something else), and default ports, see the next section for info on custom ports.

ufw allow ssh
ufw default deny
ufw allow 27015/udp
ufw enable

Windows

There is currently no documentation for this step for Windows, check best practices for your version of Windows server on how to enable port 27015over the udp protocol.

Optional - Custom ports/multiple instances

Multiple instances can be run on the same server, as long as ports are different. Things to keep in mind:

  1. GamePort comes in pairs (default 7777 - 7778), and you would typically add the first member of that pair. I.e. 7777 (port) - 7778 (paired port), 7779-7780, 7781-7782). However, due to the current NetDriver selected for the game, this port does not seem to be used externally and will be bound to a random open (interal) port on startup. This port does not need to be opened on the firewall.
  2. Data is routed externally through the QueryPort, which defaults to 27015. It cannot be between 27020 and 27050 as these are already reserved by Steam.
    Watch out: Ports vastly above or beyond the default 27015 will likely also not work, keep the number somewhere around the default port.

Actually setting the port and query port can be done by either updating the Engine.ini:

  1. Create an Engine.ini file in the install directory
    Windows: InstallDirectory\IslesOfYore\Saved\Config\WindowsServer
    Linux: InstallDirectory/IslesOfYore/Saved/Config/LinuxServer
  2. Make sure it has this data (here using 27016 as our custom port):
[OnlineSubsystemSteam]
GameServerQueryPort=27016

Or running the executable with flags:

-QueryPort=27016

Tip: In Windows, you can make a shortcut to the executable and add the flags to the end of the target field.


Optional Tooling

Windows auto-update and restart script

This script checks for updates and restarts on crash. Adjust ports as intended.

@echo off
cls

TITLE Isles of Yore Gameserver

SET steamcmd_path=C:\Your\Path\To\SteamCMD_Directory
SET server_path=C:\Your\Path\To\The\Server_Directory

REM Server Settings Section 
SET query_port=27015
SET rest_port=8085

:IslesOfYoreServerUpdate
echo (%date% -- %time%) Server is Updating
cd %steamcmd_path%
start /wait steamcmd.exe +login anonymous +force_install_dir %server_path% +app_update 1827320 verify +quit

goto IslesOfYoreServer 

:IslesOfYoreServer
cd %server_path%

echo (%date% -- %time%) Server Started
start /wait IslesOfYoreServer.exe -restport=%port% -queryport=%query_port% -log | set /P "="

echo (%date% -- %time%) WARNING: Server crashed, restarting server.
goto IslesOfYoreServerUpdate

^Note that this sets the ports as defined in the script, which means you cannot use the launch arguments to define the ports.

Linux service

This is not mandatory but it is recommended to set-up a service that automatically restarts the game on server restart or when the process crashes. The following steps again assume Ubuntu/Debian, adjust for your distribution if necessary.

To do this, add a yore-game-server.service file in /etc/systemd/system.

The file should look like this:

[Unit]
Description=Isles of Yore game server
After=network-online.target
Wants=network-online.target

[Service]
User=mygameserveruser
ExecStart=/var/IslesOfYore/IslesOfYoreServer.sh start
Restart=always
RestartSec=10s

[Install]
WantedBy=multi-user.target

Note: make sure the "user" matches the user you created earlier.

Now run the following command to enable the service:

systemctl enable yore-game-server

Linux startup script

If you want auto-updating on Linux, replace the ExecStart line from the above mentioned Linux service with a path to a bash script of your own:

$STEAMCMD_DIR=YOUR_STEAMCMD_INSTALL_DIRECTORY #Adjust this!
$GAME_DIR=YOUR_GAME_INSTALL_DIR #Adjust this!

cd $STEAMCMD_DIR
echo "Installing game at $GAME_DIR"
unbuffer ./steamcmd.sh +force_install_dir $GAME_DIR +login anonymous +app_update 1827330 validate +quit

cd $GAME_DIR
echo "Starting server"

chmod +x ./IslesOfYoreServer.sh
./IslesOfYoreServer.sh


Wrapping up: Linux file permissions

For Linux installs, the last step we need to perform is sort out the file permissions so that your newly created game user can run the files. For this, do the following and make sure it matches your user:

chown -R mygameserveruser:mygameserveruser /var/IslesOfYore/


Starting the server

Linux

Either execute /var/IslesOfYore/IslesOfYoreServer.sh, or better, run the service you set up with service yore-game-server start. Mind that you need to switch into the game server user you set-up to do the former, and the root user to to the latter.

Windows

You would run the IslesOfYoreServer.exe file.


Addendum: what to do in case of an update

If you're doing things manually, in case of an update, you'll need copy over the newly updated server files again.

Just to reiterate, a smoother way of working is to use SteamCMD. See the documentation above, where you would then need to run the command that contains app_update in the Installing the server files step again. The Windows script shared above does this automatically on start-up.

Keep in mind that your configuration files and user data live in [InstallDirectory]/Saved/Yore/, so keep them safe in case you opt to delete the folder on update.


Next, see how to configure your server to suit your intended playstyle: server configuration.