Self-hosting a Soulmask Dedicated Server on Linux

In this tutorial, you will learn how to self-host a Soulmask dedicated server on a Linux-based operating system.

Soulmask Dedicated Server Linux

Soulmask is a multiplayer sandbox survival game where you use a mystical mask to build a tribe, automate tasks, and explore a vast world. With support of up to 40 players on one server, setting up a dedicated server is one of the best ways to play with your friends.

An advantage of setting up your own server is that it gives you a central place to play this survival game. You don’t have to leave the game running. You don’t even need to own Soulmask to be able to download and run the private dedicated server software.

Setting up a private dedicated server for Soulmask on Linux is relatively easy, thanks to the developers’ release of a native Linux version. All we need to do is install Steamcmd, download the server, and then set up a service to handle it. We don’t have to worry about using additional software, such as Wine, to get the game server up and running.

By the end of this tutorial, you should hopefully have a Soulmask server running on your Linux machine. We tested these steps on Ubuntu server, but they should work for almost all Debian based operating systems.

The Soulmask dedicated server requires a fairly significant amount of memory to function properly. We observed it using over 12 GB of RAM just during startup.

Installing and Running a Soulmask Server on Linux

In the following sections, we will walk you through setting up the Soulmask dedicated server on Linux.

As mentioned earlier, while we tested these steps on setting up a Soulmask server on Ubuntu, they should work for most other Linux operating systems.

If you are hosting this game server from your home, you must port forward ports 8777 and 27015 to access the game outside of your local network.

Additionally, if you are using a firewall on your Linux system such as UFW you will also need to allow both of these ports.

Preparing your Linux System

1. Before we begin setting up the Soulmask dedicated server on your Linux system, we should ensure that the system is up to date.

You can update any out-of-date packages using the following two commands within the terminal.

sudo apt update
sudo apt upgrade -y

2. Once your system has been updated, we need to ensure that the “software-properties-common” and “screen” packages are installed by using the command below.

We must use the “software-properties-common” package to add architectures and repositories to the apt package manager. The “screen” package will be used to run the server within its own virtual screen.

sudo apt install software-properties-common screen

Installing SteamCMD

3. To download the Linux version of the Soulmask dedicated server we will need to use the SteamCMD tool. SteamCMD makes downloading the latest version of the server a really easy process.

Since this tool is 32-bit only we will need to tell the operating system it can install 32-bit packages by running the following command within the terminal.

sudo dpkg --add-architecture i386

4. Since SteamCMD is a non-free and proprietary tool, it is typically not included in the base repository of Linux-based systems.

You can work around this on Ubuntu by adding the multiverse repository.

sudo apt-add-repository multiverse

If you are running a different Debian-based operating system, you must add the non-free repository instead.

sudo apt-add-repository non-free

5. Since we changed the available repositories on our system, we must update the package list cache again by running the command below.

sudo apt update

6. Finally, all you need to do to install the SteamCMD tool is use the command below.

sudo apt install steamcmd

Creating a User to Run the Soulmask Server on Linux

7. Now that we have SteamCMD installed, we can create a new user on your Linux system to run the Soulmask dedicated server. It is good practice to run software under their own services where possible, as this reduces their access to the rest of your system.

Using the useradd command below, we can create a user called “soulmask” on your Linux system.

sudo useradd -m soulmask

8. With the user created, we will want to change to it for the next couple of steps. We want to run the next few commands under this user to reduce the chance of running into permission issues when setting up the server.

You will run into permission issues later on in this guide if we download Soulmask to your Linux system under your current user since the service we are setting up will run under the “soulmask” user.

Luckily, swapping to our new “soulmask” user is as easy as running the following command.

sudo -u soulmask -s

9. Now that we are using the terminal as the “soulmask” user, we will want to change to it’s home directory by utilizing the cd command followed by the tilde symbol (~).

cd ~

Installing the Soulmask Dedicated Server on Linux

10. Thanks to us taking the time to set up SteamCMD on your Linux machine, installing the Soulmask dedicated server is as simple as using the following command.

The server isn’t super huge, so unless you have slow internet, the download process shouldn’t take too long.This particular command will download the server to the “/home/soulmask/soulmaskserver” directory.

/usr/games/steamcmd +@sSteamCmdForcePlatformType linux +force_install_dir /home/soulmask/soulmaskserver +login anonymous +app_update 3017300 +quit

Creating a Service to Run the Soulmask Server

11. We are now done with the “soulmask” user, so we can exit back to your normal user by running “exit” within the terminal.

exit

12. Our next step is to create a systemd service that will be used to run the Soulmask dedicated server on your Linux machine. This service makes controlling the server easier and will automatically restart the service when your system restarts.

By running the command below, you can begin writing this new service using the nano text editor.

sudo nano /etc/systemd/system/soulmaskserver.service

13. Within this service file, you must type out the following lines. These lines will tell the service manager how to start your Soulmask server. Additionally, we include a line within this service that will automatically update the server every time the service starts.

  • <SERVERNAME>: Replace this placeholder with the name you want to be used for your server. This is how your server will appear within the Steam server list.
  • <MAXPLAYERS>: Swap this placeholder with the maximum number of players you want on your Soulmask server. At the time of publishing, there is a limit of 50 players.
  • <SERVERPASSWORD>: Change this placeholder to the password you want used to access your server. This helps prevent unwanted users from accessing your game server.
  • <ADMINPASSWORD>: Finally, change this value to a secure password. You can use this password to perform admin tasks within the game.
  • <PVE>: Finally, if you want your server to be PvE only, replace this placeholder with “-pve“. If you want PvP, then you must simply delete this placeholder.
[Unit]
Description=PiMylifeUp Soulmask Dedicated Server
Wants=network-online.target
After=network-online.target

[Service]
Environment=SteamAppId=3017300
Environment=LD_LIBRARY_PATH=/home/soulmask/soulmaskserver/linux64:$LD_LIBRARY_PATH
Type=simple
KillSignal=SIGINT
Restart=on-failure
RestartSec=10
User=soulmask
Group=soulmask
WorkingDirectory=/home/soulmask/soulmaskserver
ExecStartPre=/usr/games/steamcmd +@sSteamCmdForcePlatformType linux +force_install_dir /home/soulmask/soulmaskserver +login anonymous +app_update 3017300 +quit

ExecStart=/bin/bash -c "/usr/bin/screen -DmS soulmaskserver /home/soulmask/soulmaskserver/StartServer.sh -SteamServerName='<SERVERNAME>' -MaxPlayers=<MAXPLAYERS> -PSW='<SERVERPASSWORD>' -adminpsw='<ADMINPASSWORD>' <PVE> -Port=8777 -QueryPort=27015 -EchoPort=18888"
ExecStop=-/bin/bash -c "echo 'saveworld 1' | /usr/bin/telnet 127.0.0.1 18888"
ExecStop=-/bin/bash -c "echo 'quit 1' | /usr/bin/telnet 127.0.0.1 18888"

[Install]
WantedBy=multi-user.target

14. Once you have finished writing the service file, save and quit by pressing CTRL + X, Y, and then ENTER.

Starting the Soulmask Dedicated Server on Linux

15. With the service file now written, we can enable the Soulmask dedicated server to start when our Linux system does.

All you need to do to enable this new service is to use the following command.

sudo systemctl enable soulmaskserver

16. We can finally start the Soulmask dedicated server by running the following command. Please note that the game server can take a few minutes to get into a started state.

sudo systemctl start soulmaskserver

17. You can verify that the game server is running by getting the status of the service we wrote earlier.

sudo systemctl status soulmaskserver

If everything is working correctly, your service should be marked as “Active: active (running)“.

You can now safely begin to connect to your new Soulmask server.

Active: active (running)

Updating your Game Server

18. If you ever need to update your Soulmask server on Linux, you can restart the service you wrote earlier in this guide by using the command below.

This works because the service file contains a command that automatically updates the server when it starts.

sudo systemctl restart soulmaskserver

Conclusion

Hopefully, at this stage, you will have successfully set up and run the Soulmask dedicated server on your Linux machine.

This survival multiplayer game is better when played with friends. Self-hosting the game server allows you to use a spare machine or VPS to have the server running 24/7.


Please feel free to comment below if you have had any issues with getting this game server to run.

If you like this tutorial, we recommend that you check out our many other game server tutorials.

15 Comments

  1. Avatar for Godfrey
    Godfrey on

    Thanks for the tutorial,
    but I’m still getting Steam Auth error and running it with screen via systemctl (as per config) does not help. Running it manually with screen does help. Very weird.

  2. Avatar for SERVER41832
    SERVER41832 on

    Doesn’t work on Ubuntu or Debian. It’s not clear where to look for logs.

    It seems that the service is working, but there is no connection from the game via IP and port, it redirects to the home screen:

    
    root@vm-2cfb5f91:~# sudo systemctl status soulmaskserver
    
    
    ○ soulmaskserver.service - PiMylifeUp Soulmask Dedicated Server
    Loaded: loaded (/etc/systemd/system/soulmaskserver.service; enabled; preset: enabled)
    Active: inactive (dead) since Sat 2024-06-15 15:54:24 UTC; 7min ago
    Duration: 875ms
    Process: 4191 ExecStartPre=/usr/games/steamcmd +@sSteamCmdForcePlatformType linux +force_install_dir /home/soulmask/soulmaskserver +login anonymous +app_update 3017300 +quit (code=exited, status=0/SUCCESS)
    Process: 4223 ExecStart=/bin/bash -c /usr/bin/screen -DmS soulmaskserver /home/soulmask/soulmaskserver/StartServer.sh -SteamServerName='SERVER41832' -MaxPlayers=4 -PSW='3108' -adminpsw='31083108' -Port=8777>
    Process: 4282 ExecStop=/bin/bash -c echo 'saveworld 1' | /usr/bin/telnet 127.0.0.1 18888 (code=exited, status=1/FAILURE)
    Process: 4285 ExecStop=/bin/bash -c echo 'quit 1' | /usr/bin/telnet 127.0.0.1 18888 (code=exited, status=1/FAILURE)
    Main PID: 4223 (code=exited, status=0/SUCCESS)
    CPU: 1.896s
    

    Direct launch of ssh file kills itself at the end.

    
    [2024.06.15-16.04.18:500][ 0]logHGamemode: Warning: =====SERVER BASIC INFO=====
    OFFICIAL: false
    ONLINE: Steam
    AREA: 0
    SERVERID: 0
    NAME: SERVER41832
    ENTRY:
    CREATE_TIME: 1718467458
    REPLICATION: closed
    [2024.06.15-16.04.18:502][ 0]LogWorld: Bringing up level for play took: 0.266545
    Killed
    

    I have no idea why it works for you anyway, apparently you need to do something else that is not in the article.

    I would like to run it on a separate VDS outside my machine, but it looks like I’ll have to use a farm server under Windows.

    1. Avatar for Emmet
      Emmet on
      Editor

      Hi SERVER41832,

      Having a quick look at the logs you have provided; it appears that the server is being “killed” by the operating system. This typically occurs when your system runs out of available memory. The server is incredibly memory hungry so you will need to have a decent amount available.

      Kind regards,
      Emmet

  3. Avatar for PapaBearDoes
    PapaBearDoes on

    When I try this on a bare metal fresh Debian install, the Systemd command fails and the server refuses to start. When I manually run the command, I get the following error:

    “Two characters are required with -e option, not ‘amServerName=ServerName'”

    Any thoughts? It’s like Screen is trying to parse the options for the StartServer script.

    1. Avatar for Emmet
      Emmet on
      Editor

      Hi PapaBearDoes,

      Thank you for letting us know about this issue. I made a mistake when I copied across my local changes when I was testing the changes to the guide. I forgot to copy the screen name part of the argument.

      I have updated the tutorial so it should now work properly, please let me know if you continue to run into issues.

      Kind regards,
      Emmet

  4. Avatar for Alex
    Alex on

    hey,
    first thanks for the tutorial, I have a new v-server with a fresh Ubuntu version. i am a absolute beginner white linux, I followed the instructions step by step. Everything was great until the status query. This is my status, which I’m not entirely sure about:

     ● soulmaskserver.service - PiMylifeUp Soulmask Dedicated Server
         Loaded: loaded (/etc/systemd/system/soulmaskserver.service; enabled; preset: enabled)
         Active: activating (auto-restart) (Result: exit-code) since Sun 2024-06-09 17:50:10 UTC; 5s ago
        Process: 3296 ExecStartPre=/usr/games/steamcmd +@sSteamCmdForcePlatformType linux +force_install_dir /home/soulmask/soulmaskserver +login anonymous +app_update 3017300 +quit (code=exited, status=0/SUCCESS)
        Process: 3321 ExecStart=/bin/bash -c /usr/bin/screen -DmS /home/soulmask/soulmaskserver/StartServer.sh -SteamServerName='xxxx' -MaxPlayers=8 -PSW='0000' -adminpsw='0000' -pve -Port=8777 -QueryPort=270>
       Main PID: 3321 (code=exited, status=1/FAILURE)
            CPU: 798ms

    The result is definitely no server online and no direct connection to it. Hopefully you can help me.

    1. Avatar for Emmet
      Emmet on
      Editor

      Hi Alex,

      There was a slight mistake when I made some changes to the tutorial. I have updated the “ExecStart” line so that we actually set a name for the screen. Missing the name made it interpret part of the command as the screen name and ended up breaking the whole thing.

      Please let me know if you continue to have issues with getting the server to work.

      Kind regards,
      Emmet

  5. Avatar for Gamer4life
    Gamer4life on

    When I try to connect to the server (which is on a Linux VPS), it fails to authenticate me with an OnSteamAuthFailure error in the server logs. Any idea how to fix this? I can connect to any other server just fine.

    1. Avatar for Emmet
      Emmet on
      Editor

      Hi Game4life,

      I have made some adjustments to the tutorial so that the server will run within a virtual screen. Can you try adjusting your service to match our updated one and see if the problem persists?

      You may have to install the screen package by using the command below.

      sudo apt install screen

      Kind regards,
      Emmet

  6. Avatar for Corrigan
    Corrigan on

    Myself and a few others discovered the server will fail steam auth when the process is launched with systemd. We can pull the ExecStart line into a shell script to launch via tmux or screen, and it will resolve SteamAuthFailure issues. Presuming this systemd configuration works for you, any idea what would cause this for us? I’ve ensured the user systemd is launching as is correct, and /proc/pid/environ shows the library paths are set correctly.

    1. Avatar for Emmet
      Emmet on
      Editor

      Hi Corrigan,

      While this tutorial worked fine when I initially wrote it, numerous people seem to be running into the same issue that you are. While im not sure off the top of my head why it would work under a virtual screen or tmux I have adjusted my guide to do the same.

      There is no real harm running it using screen, but is definitely one of those curious things as to what must not be getting set without it. Will try to look into it further.

      Kind regards,
      Emmet

  7. Avatar for Willi
    Willi on

    Great write-up, thanks!
    Unfortunately, I am unable to connect when running the server as a service. The server does not even show up in the server list, and if I direct connect using the server IP I get the following error “SteamAuth Failed”.

    If I run the same ExecStart command manually, there are no issues, the server shows up in the server list and I can connect just fine. Bit strange…

    I guess I will just continue to run it manually for now.

    1. Avatar for Emmet
      Emmet on
      Editor

      Hi Will,

      Sorry to hear that you have been having issues with the service. I have made some slight adjustments to it so that it will run within a virtual screen. Can you please let me know if the issue persists after these changes?

      Kind regards,
      Emmet

  8. Avatar for LinuxBoi
    LinuxBoi on

    You specify that “you’ll have issues trying to run the server under your current user” but I guess I don’t understand why that would be the case. Assuming you already have a non-root user (like Frank) wouldn’t that function similarly or the same as your “soulmask” user?

    1. Avatar for Emmet
      Emmet on
      Editor

      Hi LinuxBoi,

      I have updated that sentence to hopefully be a little bit clearer about what I meant by issues. Since this tutorial is written around using the “soulmask” user we create, it is expected that they will own the server and its files. To save having to chown the directory, we can simply switch to the “soulmask” user and download the Soulmask server using that user.

      You don’t have to use the separate user like we do, but it is typically good practice to isolate outward-facing programs from the rest of your system.

      Kind regards,
      Emmet

Leave a Reply

Your email address will not be published. Required fields are marked *