• Moderator recruitment has begun!
  • Patreon Donations! patreon.com/swordmusket
SwordMusket Logo Png

Sword & Musket Server Hosting Guide (Linux) + General Info

Nettelbeck

Community Management Department Chief
nrespen
Lance Corporal
Messages
28
Country
Prussia
Dear Community, we will soon be releasing the server files.

Here is a how to start up a linux dedicated S&M server on Debian:

First create a user for the S&M server, or don't and use root user.

You need to download the bannerlord dedicated server files first, to do this, use steamcmd:
You can do apt-get install steamcmd wget unzip -y to get steamcmd (and wget+unzip for future use)
Afterwards do /usr/games/steamcmd to open steamcmd.
Now type force_install_dir /your/directory , hit enter
next, type in login anonymous
afterwards, install the files with app_update 1863440 verify

The next step is to download the swordmusketserver.zip file
via wget https://swordmusket.de/sam_dedicated_server_v2-0-4.zip and unzip it via unzip sam_dedicated_server_v2-0-4.zip
You will find a folder with the contents bin and Modules. Within the folder, do a cp -a * /your/directory which
will merge the swordmusket server files with the official ones.

Congrats, you have a ready to start S&M Server!

Now there are still three things to consider, first:
1. The Linux version needs aspnetcore runtime 6.0 explicitly, so you need to do these steps on your box:

wget https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
apt-get update && apt-get install -y aspnetcore-runtime-6.0


And you need to move the files from the dotnet folder to your Linux binary folder,
to do this, use cp -a /usr/share/dotnet/shared/Microsoft.AspNetCore.App/6.0.27/* /your/folder/bin/Linux64_Shipping_Server/

2. If you have activated IPv6 on your server box (every sane person should do so), you need to disable IPv6 within a the /your/directory/bin/Linux64_Shipping_Server/TaleWorlds.Starter.DotNetCore.Linux.runtimeconfig.json and add the line "System.Net.DisableIPv6": true so the file looks like this:

JSON:
{
  "runtimeOptions": {
    "tfm": "net6.0",
    "framework": {
      "name": "Microsoft.NETCore.App",
      "version": "6.0.0"
    },
    "configProperties": {
      "System.Reflection.Metadata.MetadataUpdater.IsSupported": false,
      "System.Net.DisableIPv6": true
    }
  }
}

You now disabled IPv6 for Bannerlord, because IPv6 + Cloudflare is apparently extremely difficult to deploy.

(added into the server zip by default so this step can be skipped alltogether)

3. You need a start command, use:
dotnet TaleWorlds.Starter.DotNetCore.Linux.dll _MODULES_*Native*Multiplayer*swordmusketmptest*_MODULES_ /dedicatedcustomserverconfigfile default.txt /tickrate 90 /dedicatedcustomserverauthtoken ENTERYOURTOKENHERE /dedicatedcustomserver 7210 USER 0 /playerhosteddedicatedserver
(added into the server zip by default so this step can be skipped alltogether)

I recommend putting a nice -n -19 in front of the command so the server has a high cpu priority.
The tickrate can be changed up to 240 tick, but the highest clocking cpu can't take above 100 slots on that tickrate, so around 90 is a balance.

And to run a server, you need to have a token, which you can get by starting the Bannerlord game, pressing ALT + tilde key (~), writing customserver.gettoken and pressing enter. Now you have to navigate to Documents\Mount & Blade II Bannerlord\Tokens and copy the token from DedicatedCustomServerAuthToken.txt and put it into the start command.

Also, config files are in Modules/Native, we have added default.txt textfile as config in the startup, which can be downloaded via wget https://swordmusket.de/default.txt.

Important Info, as we can't change ingame faction names in the config:
sturgia = french
khuzait = austria
vlandia = brits


Thats all folks! If you have any issues or questions, please ask in this thread.

You can also ask me to host for you or help you with setting up a server on your own linux machine.



ATTENTION:
There is a known bug with Intel CPUs causing the units textures to glitch.
We try to find a solution to this Linux only issue.
 
Last edited:

Nettelbeck

Community Management Department Chief
nrespen
Lance Corporal
Messages
28
Country
Prussia
Serverfiles r1 changelog:
Added linux sam_server.sh start file
Added TaleWorlds.Starter.DotNetCore.Linux.runtimeconfig.json IPv6 fix
Fixed missing tag in SubModule.xml (which prevented only Linux servers from starting)

I tested the files, if you follow my tutorial step to step it will run on your box.

Please redownload the files from https://swordmusket.de/sam_dedicated_server_v2-0-3.zip
 
Last edited:

Nettelbeck

Community Management Department Chief
nrespen
Lance Corporal
Messages
28
Country
Prussia
After checking for a couple of events, I believe that the Linux Server is somewhat capped to 3,5 cpu threads usage and doesn't scale beyond it, which makes the server lag beyond approximately 100-130 slots (on a 5,5ghz cpu).

I will be swapping to Windows Server for the next Sunday event, I recommend swapping to Windows for Bannerlord servers, unfortunately.

New server version: https://swordmusket.de/sam_dedicated_server_v2-0-4.zip
 
Last edited:
Top