Mordhau

Dedicated Server Hosting Guide (Linux)

9 2
  • 4 May
 Patrix87

CentOS 7 install based on the tutorial

Don't follow this blindly its just some notes I took when building my server that I though might help some of you out.

adduser steam
passwd steam
    enter new password

usermod -aG wheel steam
su steam

mkdir steam
cd /home/steam/

yum install glibc libstdc++
yum install glibc.i686 libstdc++.i686
curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf -

nano
-- paste this --
@ShutdownOnFailedCommand 1
@NoPromptForPassword 1
force_install_dir ./mordhau
app_update 629800 validate
quit
-- --
save as update_mordhau.txt

sh ./steamcmd.sh +login anonymous +runscript update_mordhau.txt

Edit Game.ini and Engine.ini
/home/steam/mordhau/Mordhau/Saved/Config/LinuxServer

exit

firewall-cmd --permanent --zone=public --add-port=7777-7778/udp
firewall-cmd --permanent --zone=public --add-port=27015-27016/udp

firewall-cmd --reload

su steam

nohup ./MordhauServer.sh -Port=7777 -QueryPort=27015 &

second instance : 
nohup ./MordhauServer.sh -Port=7778 -QueryPort=27016 &
21 10
  • 4 May
 Kaervan

As a career systems administrator, I have some recommendations for your notes:

  • I would highly recommend installing/setting up sudo for your regular user to be able to install packages, set up systemd, and do other administration things.

  • the useradd command was not mistakenly used in the original post for ubuntu. The steam user does not need a password, and giving it one means a user can log in as it. sudo -iu steam can be used to switch to the steam user after setting up sudo for your regular user.

  • separate into sections the things that are system administration like yum and firewalld in a way that show which access level should be used for each.

Feel free to DM me on discord if you'd like any further explanation on these points or for any other linux admin and security questions you might have. I use the same name.

4 0
  • 4 May
 Khalimerot

New odd thing, my server show in the steam server list, but do not show anymore in the game.

And I cannot join it in game with the console.

Steamcmd tells me the game is updated...

is it possible that the server isn't update even if steamcmd validate it as updated?

9 2

@Khalimerot
you are not alone
https://mordhau.com/forum/topic/14974/custom-server-bugs-with-latest-patch/#c14

Edit: I found out that the weird signs in Game.ini after launching the game are only shown when i use nano for editing. With vi everthing looks fine and i can just edit the config

5 0
  • 4 May
 Fassan

@Kaervan said:

@Fassan said:

@ExCTyrdlu said:
@Fassan
My 22 player server running on 1x 2.095GHz, 2GB RAM, 20GB SSD 100/100 Mbps, tickrate is 60. I haven't problem with overload/lags on full server.

bandwidth.PNG

This is my cpu load on 16 player:

mordhau2.PNG

But I am running at 120 tickrate, is that overkill?
When I was running 32 players sometimes I got small lags and the cpu then spiked for like a minute.

A dev confirmed in another thread that the server only requires one core. The official servers are quad core ~4ghz systems running one server per core. The deciding factors for a good experience are

CPU speed - player count dependent on core speed
Bandwidth - need sufficient throughput for player count

Your tickrate will have a direct impact on both of these. Your server is receiving data from all the clients for what they are doing, and sending the data for what everyone is doing to everyone. The tickrate is the rate that the client updates are received and sent. A higher tickrate means that the client will send that many updates to the server per second, and your server will send those updates to clients. This will drive more cpu load for processing and more bandwidth usage (PPS, BPS).

To compare, I'm running a 32 player server on a 2.1ghz CPU at a tickrate of 60, and haven't heard any complaints. Here's a clip of my server load while it was full yesterday:
mordhau.png

Thanks alot for the detailed information :).

I have plenty of bandwidth and am running on xeon 2.5 ghz.
I am now running on 90 tickrate just to see if the intermittent lags are gone.
It worked very good before on 120 tickrate but once in a while I had lags spikes and the cpu was at 98.5 % for a few mins.

Are you running virtual or physical?

Have you tested 60 vs 90 vs 120 tickrate in terms of the player experience?

Trying to find the sweet spot for player experience vs server load.

Knight 18 24
  • 4 May
 Gluten

@ExCTyrdlu said:
Have you tried to start the server first manually?

for more logs
journalctl -r -u mordhau.service

The server was working manually. Anyway I have reinstalled the server and the daemon seems to be working fine now. Thanks a lot mate!

2 1
  • 4 May
 lb

Thank you so much for the guide. I'm having an issue when I reach:

"If you type ls, you will see a few folders. The server configuration files are stored in Mordhau/Saved/Config/LinuxServer"

I'm not seeing the "/Saved/" - am I doing something wrong? I can see the game files there. Any help will be appriciated.

Knight 18 24
  • 4 May
 Gluten

@lb said:
Thank you so much for the guide. I'm having an issue when I reach:

"If you type ls, you will see a few folders. The server configuration files are stored in Mordhau/Saved/Config/LinuxServer"

I'm not seeing the "/Saved/" - am I doing something wrong? I can see the game files there. Any help will be appriciated.

Run ./MordhauServer.sh once and the files will be created.

21 10
  • 4 May
 Kaervan

@Fassan said:

@Kaervan said:

@Fassan said:

@ExCTyrdlu said:
@Fassan
My 22 player server running on 1x 2.095GHz, 2GB RAM, 20GB SSD 100/100 Mbps, tickrate is 60. I haven't problem with overload/lags on full server.

This is my cpu load on 16 player:

But I am running at 120 tickrate, is that overkill?
When I was running 32 players sometimes I got small lags and the cpu then spiked for like a minute.

A dev confirmed in another thread that the server only requires one core. The official servers are quad core ~4ghz systems running one server per core. The deciding factors for a good experience are

CPU speed - player count dependent on core speed
Bandwidth - need sufficient throughput for player count

Your tickrate will have a direct impact on both of these. Your server is receiving data from all the clients for what they are doing, and sending the data for what everyone is doing to everyone. The tickrate is the rate that the client updates are received and sent. A higher tickrate means that the client will send that many updates to the server per second, and your server will send those updates to clients. This will drive more cpu load for processing and more bandwidth usage (PPS, BPS).

To compare, I'm running a 32 player server on a 2.1ghz CPU at a tickrate of 60, and haven't heard any complaints. Here's a clip of my server load while it was full yesterday:

Thanks alot for the detailed information :).

I have plenty of bandwidth and am running on xeon 2.5 ghz.
I am now running on 90 tickrate just to see if the intermittent lags are gone.
It worked very good before on 120 tickrate but once in a while I had lags spikes and the cpu was at 98.5 % for a few mins.

Are you running virtual or physical?

Have you tested 60 vs 90 vs 120 tickrate in terms of the player experience?

Trying to find the sweet spot for player experience vs server load.

I haven't done any testing above 60 tickrate. With the increased packets per second, I probably wouldn't go over 60 for an internet server because all the routing devices between the player's computer and my server are potential points of failure, where failure here is anything from dropping packets to causing higher latency due to congestion. If I I was in a country where gigabit fiber internet was the standard, I would probably go to 90 or 120. Also, LAN servers should have no problem with higher tickrates provided the server has enough compute to process the information

2 1
 lb

Thank you @Gluten! My fault really, I should have thought of that from previous setups!

5 0
  • 4 May
 Fassan

@Kaervan said:

@Fassan said:

@Kaervan said:

@Fassan said:

@ExCTyrdlu said:
@Fassan
My 22 player server running on 1x 2.095GHz, 2GB RAM, 20GB SSD 100/100 Mbps, tickrate is 60. I haven't problem with overload/lags on full server.

This is my cpu load on 16 player:

But I am running at 120 tickrate, is that overkill?
When I was running 32 players sometimes I got small lags and the cpu then spiked for like a minute.

A dev confirmed in another thread that the server only requires one core. The official servers are quad core ~4ghz systems running one server per core. The deciding factors for a good experience are

CPU speed - player count dependent on core speed
Bandwidth - need sufficient throughput for player count

Your tickrate will have a direct impact on both of these. Your server is receiving data from all the clients for what they are doing, and sending the data for what everyone is doing to everyone. The tickrate is the rate that the client updates are received and sent. A higher tickrate means that the client will send that many updates to the server per second, and your server will send those updates to clients. This will drive more cpu load for processing and more bandwidth usage (PPS, BPS).

To compare, I'm running a 32 player server on a 2.1ghz CPU at a tickrate of 60, and haven't heard any complaints. Here's a clip of my server load while it was full yesterday:

Thanks alot for the detailed information :).

I have plenty of bandwidth and am running on xeon 2.5 ghz.
I am now running on 90 tickrate just to see if the intermittent lags are gone.
It worked very good before on 120 tickrate but once in a while I had lags spikes and the cpu was at 98.5 % for a few mins.

Are you running virtual or physical?

Have you tested 60 vs 90 vs 120 tickrate in terms of the player experience?

Trying to find the sweet spot for player experience vs server load.

I haven't done any testing above 60 tickrate. With the increased packets per second, I probably wouldn't go over 60 for an internet server because all the routing devices between the player's computer and my server are potential points of failure, where failure here is anything from dropping packets to causing higher latency due to congestion. If I I was in a country where gigabit fiber internet was the standard, I would probably go to 90 or 120. Also, LAN servers should have no problem with higher tickrates provided the server has enough compute to process the information

I live in Sweden and me and my friends have gigabit internet :D

5 4
  • 5 May
 Zenchess

I'll relate some of my experiences trying out different kinds of servers for my server called "Dueler's Paradise"
I ran it on a vultr 'bare metal instance' which costs $120 a month (but is pay as you go). It was an 8 core 32 gig ram 3.8 ghz machine.

Running Ubuntu 18.04.

I tried it on 120 and 60 tick. On 120 tick, with 45 players (which was full during normal us hours), it used somewhere around 5 GB of bandwidth a day (not sure the exact number as I've destroyed the server). The cpu load would be 100% if the players were above 30 or so. I think this shows that even though more than 1 core isn't required for a server, more than one core is still utilized if available.

There is a console command that shows server stats: m.showPlayerStats 1

When i was running on 120 tick, the minTicks or whatever would drop to around 60 but average at 120 tickrate. The same thing would happen when I was running at 60 tick.

Everyone said the server ran great and was better than the official servers, especially during the first couple days when the official servers were not that great.

I'm about to try running the same setup on the vultr dedicated instance for $60 a month, which is only 2 cores ~3.8ghz and 8 gig ram. I'll report if performance is much worse.

Memory usage was pretty low, definitely under a gig of ram. So I think a 1 gig ram server should be fine.

Note: You probably don't need this expensive of a server or a dedicated instance (the vultr dedicated instance server i'm using has 2 dedicated cores which you don't share with any other vm's). I just like to know that I won't get lag if another vm on my hosting provider is using a lot of cpu.

2 0
  • 5 May
 elitewhale

ServerDefaultMap=/Game/Mordhau/Maps/ThePit/FFA_ThePit.FFA_ThePit not found at defaultgame.ini

6 0

Hi Together,

i have the problem that my linux server wont start correctly or it seems so. It is possible to find the server and connect to it. Then the Pit map is loading but i cant do anything, it shows the map but nothing happens. I tried to execute some commands through the cli, change map or logon as admin, but nothing happens after i sent the commands. Is this an known behavior? Does someone know whats wrong here?

(centos7 64)

This are the Messages i get:

*
LogFileManager: Warning: ReadFile failed: Count=0 Length=4096 Error=errno=21 (Ist ein Verzeichnis) for file

LogOnline: Warning: Mordhau: Steam API failed to initialize!

[2019.05.05-08.11.16:386][ 0]LogCollisionProfile: Warning: Profile (WeaponOnly) - Custom Channel Name = 'GameTraceChannel3' hasn't been found
[2019.05.05-08.11.16:386][ 0]LogCollisionProfile: Warning: Profile (WeaponOnly) - Custom Channel Name = 'GameTraceChannel4' hasn't been found

[2019.05.05-08.11.34:992][ 0]LogOnline: Warning: Mordhau: Steam API failed to initialize!

Exiting abnormally (error code: 130)
*

I reinstalled the hole server, still the same problem

Thank you for your help.

Best
†Ṿ† | Boudewijn de Kale

2 1
  • 5 May
 Korpi

Hi All!

First I want to thank Vin¢ for such great guide he has written.

This message is for anyone out there planning to deploy Mordhau server in Amazon EC2 (aka. free plan).

I chose my setup according to Vin¢'s guide.

  • Step 1 - Choose an Amazon Machine Image (AMI): Ubuntu Server 18.04 LTS (HVM), SSD Volume Type
  • Step 2 - Choose an Instance Type: t3.micro (Variable ECUs, 2 vCPUs, 2.5 GHz, Intel Skylake P-8175, 1 GiB memory, EBS only)
  • Step 3 - Configure Instance Details: Default instance configuration
  • Step 4 - Add Storage: 30Gb of General purpose SSD
  • Step 6 - Configure Security Group:
    • Default SSH, choose 'My IP' from dropdown menu in source column.
    • Add rule: 'All TCP' and set source 'anywhere'
    • Add rule: 'All UDP' and set source 'anywhere'

Now after you have launched your instance, installation wizard will provide you a private key(.pem), download this file and follow instructions how to establish SSH connection with Putty or by ssh command in linux. (with putty you need to use PuTTYgen to transform that key file into .ppk format for putty to use.)

After you have established connection to your instance, you can start executing Vin¢'s guide steps.

But there is one exception: When you create steam user inside ubuntu, you need to remember to give that user a password and add that user into 'sudo group' otherwise dependency installation will fail (atleast in my case)

sudo passwd steam will change steam user's password
usermod -aG sudo steam will add user to the sudo-group so now you can execute that dependency command.

Other notes, I recommend taking instance snapshot before proceeding to server installation steps, if something goes wrong you can easily return that snapshot without need to create whole instance again.

1 0
2 0

EDIT

run server and getting error
[2019.05.06-12.21.43:034][ 0]LogCollisionProfile: Warning: Profile (WeaponOnly) - Custom Channel Name = 'GameTraceChannel3' hasn't been found
[2019.05.06-12.21.43:034][ 0]LogCollisionProfile: Warning: Profile (WeaponOnly) - Custom Channel Name = 'GameTraceChannel4' hasn't been found
[2019.05.06-12.19.43:910][ 0]LogOnline: Warning: Mordhau: Steam API failed to initialize!

7 0
  • 6 May
 kEWY

@elitewhale said:
EDIT

run server and getting error
[2019.05.06-12.21.43:034][ 0]LogCollisionProfile: Warning: Profile (WeaponOnly) - Custom Channel Name = 'GameTraceChannel3' hasn't been found
[2019.05.06-12.21.43:034][ 0]LogCollisionProfile: Warning: Profile (WeaponOnly) - Custom Channel Name = 'GameTraceChannel4' hasn't been found
[2019.05.06-12.19.43:910][ 0]LogOnline: Warning: Mordhau: Steam API failed to initialize!

After I restarted my vServer the Steam API error was gone for me. But I also get the 2 LogCollisionProfile warnings and don't know how to get rid of them.

2 0

Hey I have a question regarding the config, currently on each server restart I get the map Pit in Deathmatch mode, though my Game.ini looks partially like this:

[/Script/Mordhau.MordhauGameMode]
PlayerRespawnTime=5.000000
BallistaRespawnTime=30.000000
CatapultRespawnTime=30.000000
HorseRespawnTime=30.000000
DamageFactor=1.000000
TeamDamageFactor=0.500000
MapRotation=SKM_Contraband
MapRotation=SKM_Camp
MapRotation=SKM_Grad
MapRotation=SKM_ThePit
MapRotation=SKM_MountainPeak
MapRotation=SKM_Tourney
MapRotation=SKM_Tiaga

Any idea why this is happening? Also I seem to have run into an issue that when changing respawntime/horserespawntime it doesnt actually change anything. If you have any ideas, would be happy to test them out