Soulmask Dedicated Server Guide

This document details how to set up and configure a self-hosted dedicated server for Soulmask in a Windows environment. While much of this information also applies to Linux environments, there will be a number of differences with regard to things like file paths and scripts. I do not have enough experience with Linux to explain those differences.

DISCLAIMER: There is not one “right” way to set up and manage a game server. Everyone has their own preferences for how to do things. This guide shows one way to do things, based on my own experience and preferences. Use it as a starting point, but feel free to change your setup to suit your preferences.

NOTE: This guide explains how to do everything without using any server management software. If you prefer to run server management software, you will want to learn how that specific software works and get your server setup there. Most of this guide may not apply to you.

Installation and Updates

Install SteamCMD

Download SteamCMD, a command line utility that can download data from Steam servers including the files for the dedicated server. It can be downloaded from this page, or if you prefer, here is a direct link to the download for the Windows version. Unzip the file and place it in its own directory somewhere on your system. The location I use is C:\SteamCMD. It will install itself in the directory you place it into.

Run SteamCMD once so that it updates and downloads the rest of its files. Once it is finished and prompts you for input, enter the command quit to close it.

TIP: I recommend adding the location where you installed SteamCMD to your system’s Path environment variable. This will allow you to run it from anywhere without writing the full path to it. This is not required, but may make things easier in the future.

Choose a Location

Now choose a location where you want to install the dedicated server. It can be anywhere, but you may want to choose a path that does not contain any spaces to prevent future headaches. Once you find your location, create a new folder there that will contain the files for your server.

Create an Update Script

We will create a batch script that will serve a double purpose. It will both install the dedicated server files as well as update them in the future when the game releases updates.

First, you will want to enable seeing file extensions in Windows if you have not already done so. If you select the View menu at the top of an open folder window, there should be an option called “File name extensions”. Enable that option. If you cannot see the view menu, pressing the Alt key on your keyboard should make it show up.

Create a new text file inside the folder you created in the previous step. Name the file update.bat, changing the extension from .txt to .bat. Then open the file in a text editor of your choice, or right click the file and choose Edit to open it in Windows notepad.

Copy the following block of text and paste it inside of this file.

@echo off
set root=%~dp0
if %root:~-1%==\ set root=%root:~0,-1%
pushd %root%

steamcmd.exe +force_install_dir "%root%" +login anonymous +app_update 3017310 +quit
copy /Y *.dll WS\Binaries\Win64\*.dll

popd
pause

Save the file.

Go back to the file in Windows and double-click on it to run it. This will open a console window where it will download the game and pause when complete. Review the output to make sure there are no errors. If you see any errors, you will need to figure out how to resolve them before moving on to the next step. If everything looks good, then press any key to close the console window.

In the future, any time the game releases an update, stop your server and run this same script again to update your server to the latest version.

Startup Script

Now that you have the server installed, the next thing to do is build a startup script. There are various ways you could build and configure this script, but we will just be covering a single method that should get you up and running. You can always customize it later.

In the same folder where the server is installed, create a new text file and name it serve.bat (or start.bat if you prefer), changing the extension from .txt to .bat. Then open the file in a text editor of your choice, or right-click the file and choose Edit to open it in Windows notepad.

Copy the following block of text and paste it inside of this file.

@echo off
set root=%~dp0
if %root:~-1%==\ set root=%root:~0,-1%
cd %root%
set SteamAppId=2646460

WS\Binaries\Win64\WSServer-Win64-Shipping Level01_Main -log -server -UTF8Output -PORT=8777 -QueryPort=27015 -EchoPort=18888 -forcepassthrough -SteamServerName="my server name" -PSW="my password" -adminpsw="admin password" -saving=600 -backup=900

Now, you will need to edit some values to suit your server. Mainly, the following values:

  • SteamServerName - The name of your server as it will appear in the server list
  • PSW - Your server password. If you want an open server, remove this param. (However, you may want to keep it around until you are done configuring your server so that people don’t join before you are ready.)
  • adminpsw - The admin password for your server. Make sure this password is secure because it is all that is needed for someone to gain full access to server settings and gm commands.

Once you have finished configuring this file, save it.

Go back to the file in windows and double-click on it to run it. This will start up your server for the first time. You will see it running in a console window. Once it stops printing messages, that means it is fully started. It generally takes 2+ minutes to fully start up. You can press Ctrl+C while the window is selected to initiate a shutdown of the server.

You may see warnings or errors in the output while the server is starting up. Some of these are normal and nothing to worry about. Others may indicate an actual problem. If the server continues running after the errors, then don’t worry about them for now. You can revisit later if they lead to any actual issues. If the server crashes or shuts down on its own, then you probably have an issue you should address now. If needed, take a look at the Troubleshooting section for help.

Combined Script (Optional)

You can combine your update and startup scripts into one script if you want to check for updates every time you start your server. It will add a small amount of time to your startup, but might make things easier for you. Here is an example of how that might look.

@echo off
set root=%~dp0
if %root:~-1%==\ set root=%root:~0,-1%
cd %root%

steamcmd.exe +force_install_dir "%root%" +login anonymous +app_update 3017310 +quit
copy /Y *.dll WS\Binaries\Win64\*.dll

set SteamAppId=2646460

WS\Binaries\Win64\WSServer-Win64-Shipping Level01_Main -log -server -UTF8Output -PORT=8777 -QueryPort=27015 -EchoPort=18888 -forcepassthrough -SteamServerName="my server name" -PSW="my password" -adminpsw="admin password" -saving=600 -backup=900

Server Configuration

At this point, you should have a server that starts up and runs without crashing. In this section, we will cover common configuration options you might want to adjust before opening up your server for people to play on. Everything in this section is optional, but worth reviewing.

General

Server configuration happens primarily through command line parameters. You have already seen a number of these in your serve.bat script (or whatever you decided to call it). It is the long list of parameters listed on the last line of the script. You can edit this script to add, remove or change parameters as desired.

Here is a list of common startup parameters, and some less common ones as well. In addition to these, many command line params from Unreal Engine 4.27 will also work.

Parameter Description
-server A required parameter.
-log This parameter tells the server to run in a console window. If you omit it, then it will run in the background without any window. Recommended to keep this unless you know what you are doing.
-forcepassthrough A required parameter.
-UTF8Output Ensures that log messages which contain non-latin characters appear correctly. You should keep this.
-PORT=[port] Which port to bind the server to for client game connections. This can be any valid and available UDP port that you want.
-QueryPort=[port] Which port to bind the server to for handling incoming queries. This can be any valid and available UDP port that you want.
-EchoPort=[port] Which port to bind the server to for telnet connections. This can be any valid and available TCP port that you want. Telnet will only be accessible to clients running on the same machine as the server. It only binds to the loopback adapter (127.0.0.1).
-MULTIHOME=[ip] Tells the server to bind to a specific local IP. If not specified, the server will bind to 0.0.0.0 (all available adapters). This is usually not required in home setups unless the computer has multiple adapters and you want to choose one specific one.
-MaxPlayers=[count] Specifies the maximum number of players that can connect to the server at once. If too many players connect, server performance will suffer.
-gamedistindex=[index] Sets the region for the server. This only seems to affect the timing of when game events are allowed. It does not actually list the server under the specified region. Known values:
  • 0: Test (events allowed any time)
  • 1: Asia
  • 2: North America
  • 3: Europe
  • 4: Mainland China
  • 5: South America
  • 6: Oceania
  • 7: Africa
-pve Forces the server to run in PVE mode.
-pvp Forces the server to run in PVP mode.
-saving=[seconds] The interval, in seconds, at which the server will save the state of the world to an in-memory database. This will not save the database to disk, but will prepare it for later saving to disk.
-backup=[seconds] The interval, in seconds, at which the server will save the current in-memory database to the world.db file on disk.
-initbackup If specified, the server will make a backup copy of world.db each time it starts up.
-backupinterval=[minutes] If specified, the server will make an automatic backup copy of the world.db file on disk at this interval, in minutes. Note that the server never deletes backups, so you will need to occasionally remove some of them manually to preserve disk space.
-rconpsw=[password] If specified, enables RCON on the server, allowing RCON clients to connect and issue some admin commands. The value specifies the password that is required for RCON clients to connect. If this parameter is not specified, RCON will be disabled.
-rconaddr=[ip] Specifies the IP address to bind the RCON listener to. Similar to the MULTIHOME parameter, but specifically for RCON. If not specified, the server will use the MULTIHOME address. If neither MULTIHOME or rconaddr is specified, then RCON will be disabled.
-rconport=[port] Specifies the TCP port that the RCON listener will bind to. This is the port that RCON clients will need to connect to. If not specified, it defaults to port 19000.
-GongHuiMaxMember=[count] Specifies the maximum number of players that can be in a tribe on the server. If not specified, it defaults to whatever is set in the game settings. If it is specified, it will override the game setting on the next server start.
-serverpm=[mask] Specifies which permissions lists to enable on the server. For more information, see Permissions Lists & Banning below.

Once you are happy with your configuration, move on to the next step.

NOTE: A few of the above settings can also be configured within the file WS/Saved/Config/WindowsServer/Engine.ini. However, most of them are only supported from the command line. If specified in both place, the command line will take precedence. For these reasons, it is generally not worth the trouble of splitting your config between your startup script and Engine.ini. It is easier to keep everything in your startup script.

RCON Access

Assuming you have configured RCON using the command line parameters described in the table above, you should be able to access RCON from a client running on the same machine as the server. You may also whitelist IP addresses of additional machines for which you would like to provide RCON access. This can be done by editing the file WS/Saved/Config/WindowsServer/Engine.ini and adding the following.

[Server.SafeIP]
IP=xxx.xxx.xxx.xxx
IP=xxx.xxx.xxx.xxx

Permissions Lists & Banning

The server supports optional permissions lists. You can set up a whitelist or a blacklist, depending on how you want to run your server. This is in addition to optionally setting a server password.

Permissions lists are primarily configured via in-game admin console commands, but they can also be edited manually while the server is not running. Enabling or disabling specific lists is done using the command line parameter -serverpm=[mask] mentioned above. You can also temporarily enable or disable lists using console commands.

For more information, see Server Permissions.

For an example of how to ban a player, see Server Permissions - Example: Ban a Player.

Server Access

Before anyone will be able to join your server, you need to ensure it is accessible from the internet. Here we cover the common steps you need to take to make your server accessible.

Local Firewall

The first thing to do is ensure that the local firewall running on the server computer does not block incoming traffic to the server process.

NOTE: If you have third party firewall software running, you will need to consult the documentation for that software to learn how to allow traffic through to the server. You can skip the rest of this section as it only pertains to Windows Firewall.

If you are not running third party firewall software, then Windows Firewall will be what you need to modify. To access the necessary settings, open your start menu and search for Windows Defender Firewall with Advanced Security. Run this program.

In the window that opens, select Inbound Rules in the left panel. Then in the right panel, click the New Rule... action.

At this point you have two options for how to proceed.

  • Create a single “Program” rule for the server. This usually works, but might sometimes stop working after a game update and need to be redone.
  • Create two “Port” rules for the server ports. This is often more reliable and will not break when the game updates.

I recommend the second option. Select “Port” and press Next. In the next screen, select ”UDP” and “Specific local ports”. Add your game port and your query port (defined in your startup script), separated by a comma. Here is an example.

UDP ports

Everything after that should be pretty straightforward.

  1. Press “Next”.
  2. Select “Allow the connection”. Should be the default.
  3. Press “Next”.
  4. Select all three profiles. Should be the default.
  5. Press “Next”.
  6. Enter any name you want.
  7. Press “Finish”.

Repeat the exact same process again, but this time selecting TCP and adding your Echo port and RCON port (if you set one). Here is an example.

TCP ports

Static Local IP

In order to facilitate port forwarding, you will first want to assign your computer a fixed IP. This can either be done via static DHCP bindings in your router or via configuring your network adapter to use a specific static IP on the PC. There are nuances, pros and cons to both approaches. I will leave it up to you to research and decide what works best for you. Once you have a fixed local IP for your server PC, move on to the next step.

Router

The next thing you need to do is forward incoming traffic on your configured ports to your server computer. This can usually be accomplished through your router’s web interface. Since the process varies greatly from one router to the next, I cannot really explain the details or provide useful examples. You will need to lookup the information as it pertains to your particular router.

Speaking generally, what you need to do is port forward incoming traffic to your server PC via its static local IP. There are up to three ports that need to be forwarded.

  1. Your game port, which is UDP. Required.
  2. Your query port, which is UDP. Required.
  3. Your RCON port, which is TCP. Optional. Only needed if you enabled RCON and want to be able to access it remotely.

So a port forwarding table might look something like this if you are using default ports, and if your server’s static IP happens to be 192.168.1.4.

Name Protocol External Port Internal Port Internal Address
soulmask_game UDP 8777 8777 192.168.1.4
soulmask_query UDP 27015 27015 192.168.1.4
soulmask_rcon TCP 19000 19000 192.168.1.4

Once you have reached this point, it should now be possible to run and connect to your server. If not, you may need to do some troubleshooting. You can start by querying your server using the server query tool.

Connecting to the Server

At this point, if everything is set up properly, you should be able to connect to your server from within the game. This section covers a few methods by which players can join a server.

NOTE: If you are geographically close to the server, you might be able to find it simply by looking through the list of private servers in the server selection screen in game. However, this will not work if the server is farther away because the number of servers listed is limited. The methods below will allow people to join from any location.

TIP: Once you have created a character on a server, you no longer need to join through the server selection screen. You can instead press “Continue” from the main menu to see a list of servers you have played on before and directly join one. (It is limited in how many servers it will list though.)

Invitation Code

An invitation code is usually the simplest and most reliable method of joining a server for the first time. You will first need to locate your server’s invitation code. There are two ways to do this.

  • Search your server log for the text SERVER UNIQUE ID. The line containing this text has your server’s unique ID at the end of it, which is also your invitation code.
  • Another method is to connect to your server via RCON and run the command QueryInvitationCode. This will print the invitation code for you to copy. For more information on using RCON, see the Telnet / RCON section later in this document.

Once you have the invitation code, you can enter it in the top right corner of the server selection screen in the game. You will be prompted for the server password when joining, if one is set. You should also share your invitation code with anyone who you want to join your server.

Direct Connect

Another method of joining the server is direct connect. For this method, you will need the following information.

  • Your server’s IP address. This can either be the public IP, or if you are on the same subnet as the server, its local IP can also work.
  • Your server’s configured game port, specified by the -PORT parameter when starting your server, or 8777 by default.
  • Your server password, if one is set.

Once you have this information, you can press the “Connect to the server directly” button at the bottom of the server selection screen in the game. Enter the information into the popup that opens.

Favorite Server

Yet another method of joining a server is to add it to your favorite server list in Steam prior to launching the game. This will ensure the server appears at the top of the list in the “Private Servers” section of the server selection screen in game.

Before adding a server as a favorite, you need the following information.

  • Your server’s IP address. This can either be the public IP, or if you are on the same subnet as the server, its local IP can also work.
  • Your server’s configured query port, specified by the -QueryPort startup parameter when starting your server, or 27015 by default.

Once you have the information, you can go to your Steam favorite servers list by opening your Steam client, selecting the “View” menu at the top of the window, then selecting “Game Servers”. In the window that opens, press the “Favorites” button along the top to switch to the favorites list.

In this window, there will be a button at the bottom labeled “+”. Press that to add a server. In the window that opens, enter your server ip, followed by a colon (:), followed by your query port. For example, if your IP is 1.2.3.4 and your query port is 27015, then you would enter 1.2.3.4:27015. Your server must be running at this time in order for it to be added successfully.

If it was successfully added, then you should be able to find it in the “Private Servers” list in game.

Game Configuration

Now that your server is accessible, you likely will want to configure gameplay settings to your liking. This includes all sorts of things like resource collection multipliers, experience multipliers, enabling and disabling game features, etc.

I have written a full guide on gameplay settings which can be found here: Soulmask Gameplay Settings Guide. Give it a read when you are ready to adjust gameplay settings.

Server Management

Once you have a self-hosted server up and running and configured the way you want it, there are some additional things to consider regarding how to manage the server.

Shutting Down or Restarting the Server

In order to ensure that you do not cause an unintentional rollback of your world save data, it is vitally important that you shut down your server properly.

Things to avoid:

  • DO NOT: Press the close button on the server console window
  • DO NOT: Kill the server process via task manager or similar means.

Things that are safe:

  • Select the server console window and press Ctrl+C to immediately initiate a save and shutdown of the server.
  • Issue the gm exit command from within the game while connected to the server with admin privileges. This will immediately initiate a save and shutdown of the server.
  • Connect to the server using Telnet or RCON and issue a shutdown 300 command. Change the 300 to the number of seconds you want to wait until starting the shutdown. This will announce the shutdown in the game giving players time to prepare for it. When the specified time has elapsed, the server will automatically save and shut down.

If you want the server to automatically restart after a shutdown, you will need to set up an external solution for monitoring the process and restarting it. This can be done with some clever scripting or using a third party tool. This sort of setup is not unique to this game, and you can find examples of ways to script auto-restarting a process for your specific OS by searching online. Personally, I use a simple tool that I created specifically for this purpose alone. If you are interested in my tool, you can find it here: Process Runner.

Updating the Server

To update your server, follow these steps.

  1. Shutdown your server using one of the methods listed in the previous section.
  2. Run your update script (if it is separate from your startup script). Wait for the update to finish.
  3. Run your startup script to start your server.

Performing Backups

It is always important to perform regular backups of your save data in case anything goes wrong and you need a point to roll back to.

The game provides a mechanism for automatically creating backups via command line parameters, which are described in the Server Configuration section above. This method is simple to setup, but does require you to manually clean up the backup files from time to time else they will accumulate endlessly.

Another option is to not enable the game’s automated backups and instead implement your own using whatever tools you prefer to use. As long as the tool is scriptable (or maybe the tool is simply a script), you can schedule it to automatically run at some interval using Windows Task Manager. This is the setup that I prefer, but either setup works fine.

If you set up your own backups, the primary files that I recommend you make backups of are the following.

  • WS/Saved/Worlds/Dedicated/Level01_Main/world.db
    • This is your world save and is the most important file to backup.
  • WS/Saved/GameplaySettings/GameXishu.json
    • This file contains all of your gameplay settings. Unless you are playing completely vanilla settings with no modifications, I recommend backing this up also.

Those two files are the most important in my opinion. Alternatively, you could backup the entire WS/Saved directory to ensure you got everything.

You may also want to keep a backup copy of your startup script just so you don’t have to rebuild it if you ever lose it.

Admin Commands

The game has a large number of admin commands you can use in game. You need to know how to access the in-game console to enter commands. Here is a brief explanation in case you need help.

The console will appear as a thin black bar at the bottom of your screen where you can type commands. By default, this can be accessed by pressing the grave/tilde key (`) or the minus key on the number pad (-). If neither of these works for you, it is likely due to the configuration/locale of your keyboard. You may need to do some research on the topic.

From the in-game console, enter the following command, replacing password with the admin password for your server.

gm key password

If entered correctly, the admin menu will open. You are now an admin and can run admin commands up until you either log out of the server or press the “Away from Admin” button in the admin menu.

The admin menu itself offers a number of features you might find useful. Beyond that, there are a whole lot of console commands you can run to do different things as an admin. Some of them are dangerous though, so be careful what you choose to run and always make a backup of the world before experimenting.

I have created a separate document detailing everything I have learned so far about console commands and other in-game admin abilities. You can find that document here: Soulmask Console Commands.

Telnet / RCON

Another method of running admin commands is via Telnet or RCON. Telnet is only accessible from the same PC where the server is running. RCON can be accessed remotely with a password if RCON is configured and the port is forwarded. The commands available to both are basically the same.

If you are looking for an RCON client, this is the one that I have been using: rcon-cli

Once connected via Telnet or RCON, you can type help to see a list of special commands you can run. You can also run some of the normal game console commands, but most of them do not work..

If you want the full list of available commands, you can find them here: Soulmask Remote Console.

Troubleshooting

This section covers some common issues that may occur while initially setting up or updating a server.

Unable to Initialize Steam

If you see the following warning in your log, followed by the server shutting itself down, then you have an issue with the server not finding necessary Steam DLL files.

Warning: STEAM: Failed to initialize Steam, this could be due to a Steam server and client running on the same machine. Try running with -NOSTEAM on the cmdline to disable.

The reason this happens is that the packaged server files are not setup properly to run the server on a machine without a Steam client installed. There are two ways to work around this.

  • Use the scripts provided above. They include two key components needed to work around the issue.
    1. The update script copies DLLs from the root server directory into the binaries directory.
    2. The serve/start script runs the exe in the binaries directory directly rather than running the wrapper exe in the root directory.
  • Another option is installing a Steam client on the server machine. You do not need to login to it, but you should run it at least once so it updates. This is not necessary if you follow the scripts provided above.

Server Shuts Down After Around 30 Minutes

The server will shut itself down if it is unable to register with Steam after 7 attempts. You will know you are having this issue if you see this message in your log multiple times.

LogOnlineGame: Error: REGISTER SERVER ERROR!!!

This usually indicates that something is blocking communication with Steam or that there is a Steam outage. You will need to investigate what is preventing server registration.

Server Fails to Start

There can be many reasons for this, so it is hard to know what the issue is without examining your log file. Assuming the server output a log file, you can find it located within your server installation directory at the path WS/Saved/Logs/WS.log. In the log, you should see some information about why your server is not fully starting.

Check if any errors may indicate one of the issues listed in this troubleshooting section, or if it is something you can figure out on your own. If you are unable to deduce what the issue or solution might be, see the Asking for Help section below.

Unable to Find or Connect to Server

The first thing to note is that the server takes a few minutes to fully start and open itself up for connections. Make sure you are giving it enough time. You should see the log output stop completely once it has settled.

Another thing to note is that you cannot run your server from a Steam client. If you used a Steam client to install your software, you need to locate where it installed to and setup a bat script there to run it. If you run it directly from Steam, no one will be able to connect to it because it will not report the proper app id in server queries.

If you are unable to locate your server from within the game, there are a few possible reasons. First of all, read the Connecting to the Server section above and try various ways of locating your server to learn what works and what does not.

If none of the methods are working, then you most likely have an issue with either port forwarding or a firewall blocking traffic. Read the Server Access section above for tips, and double check that you are forwarding the proper ports and opening up the proper firewalls. Compare ports with your command line if you are specifying custom ports. Both the query port and the game port need to be forwarded and open.

You can test whether your server is registered with Steam and whether it is responding to queries using the server query tool.

If your server is listed and findable, but you cannot connect, then most likely the issue is with the game port.

If you cannot find the server at all, then it is most likely an issue with the query port. It may also be an issue with Steam registration, in which case, you should see “REGISTER SERVER ERROR” in your log. If you do not see this, then assume it is most likely a query port problem.

If you are unable to find a solution, you might want to ask for help. See the Asking for Help section below.

Asking for Help

If you are unable to resolve an issue you are facing, you might find help on the official Soulmask Discord server.

Click here for a Discord server invite

Once you have joined the server, look for the private-server channel. It has a pinned thread for server admins to help each other. Or you can access the thread directly from this link. Post your issue there with as much detail as you can offer about your setup and your problem. Include your server log (WS.log) as well if it might contain relevant information. PLEASE REMOVE PASSWORDS FROM YOUR LOG BEFORE POSTING IT. Support there is not official. However, other private server admins are often willing to help out.

Other sources of help

If you are not a Discord user, or do not want to join the Discord server, you could also try one of these other platforms to request help from community members.

Further Reading

You can find links to other Soulmask guides and data in the navigation bar on the left or from the home page.