Hey there! Few people asked so I figured I'd post a quick guide on setting up a dedicated Bannerlord server on Linux using the native Linux files rather than using wine and the Windows files. Mind you, this will not go deep into how to configure your server - for that, I would suggest looking at other guides like the one by Horns.
While the native files have been available for a bit now, they were previously targeting .NET Core 3.1, which has been out of support for a bit so getting things set up was a bit of a pain. Now, the required version is .NET 6, making things fairly easy. So, here's a step-by-step:
Some troubleshooting:
Aaaand... that's about it for this guide. Not usually writing guides like this one, so if you have any questions or suggestions for improvements, please let me know
While the native files have been available for a bit now, they were previously targeting .NET Core 3.1, which has been out of support for a bit so getting things set up was a bit of a pain. Now, the required version is .NET 6, making things fairly easy. So, here's a step-by-step:
- Obtain the Bannerlord Server Files. You have two options:
- Since the tools include Windows and Linux files, you can simply download them on your PC, then upload them manually to your server (if you have one). Open Steam, go to your Library, set your filter to include "Tools" (or search for "Mount & Blade II: Dedicated Server"). Once downloaded, upload to your server in any way you want.
- Using steamcmd. Install steamcmd as described in the previous command, then run the following command:
Bash:steamcmd +force_install_dir /path/you/want/files/at +login anonymous +app_update 1863440 +exit
- For updating, repeat the same process. Either manually upload or re-run the command above.
- Install the .NET 6 ASP.NET Core Runtime. You can find instructions on how to do so on Microsofts official page - here is a link for Debian, you can find other distributions in the navigation on the left hand side of the page.
- The example commands given on the page are usually for the latest version - i.e. .NET 8 as of writing this. Make sure you install .NET 6 by replacing 8 with 6 in the given commands.
- This part may not be required in the future, but for now it seems it is. Running the server now, you will probably see warnings for a lot of missing .dll files. Those come bundled with your .NET 6 installation, but for some reason the server files do not use them. Thankfully, there is a very simple fix for this: Just copy them over.
- To find the files on your system, run
dotnet --info
. Check the output for ".NET runtimes installed:". Find the path forMicrosoft.AspNetCore.App 6.0.X
(x being your exact version number, may differ depending on install time). The files you need are located at that path, plus your current version number. For me, that is currently/usr/share/dotnet/shared/Microsoft.AspNetCore.App/6.0.25/
. - Now, simply copy over all .dll files from that folder into
/BLSERVER/bin/Linux64_Shipping_Server/
.- Realistically, you probably do not need *all* of them. You could start your server, see the error messages and only copy over what its complaining about - I did that on the Beta branch, gave up at around 30 files. Easier this way.
- To find the files on your system, run
- Now, navigate to
/BLSERVER/bin/Linux64_Shipping_Server/
and start your server using the following command:Bash:dotnet TaleWorlds.Starter.DotNetCore.Linux.dll _MODULES_*Native*Multiplayer*_MODULES_ /dedicatedcustomserverconfigfile CONFIG.txt /tickrate 240 /dedicatedcustomserverauthtoken YOURTOKENHERE /dedicatedcustomserver 7210 USER 0 /playerhosteddedicatedserver
- You may want to add your own Modules to the module list.
- Replace
COFIG.txt
with the name of your own config file, located in/BLSERVER/Modules/Native/
. - /tickrate is a new option as of 1.2. The previous, default tickrate was 60, but you may now up it to up to 240. A higher tickrate means more updates per second for the clients connected to your server, but may also increase resource usage. I would suggest playing around with this a bit and seeing what works for you and your setup.
- Replace YOURTOKENHERE with your auth token (as for how to obtain it, see Horns' guide I linked above). I have not yet looked into where to place the file containing the token on Linux systems, so for now its only as a parameter - let me know if you figure it out so I can list it here
- 7210 is the default port used by the server. Especially if you run multiple servers from the same machine, you may want to replace it with your own. Just make sure your firewall is opened for UDP and, if you want to use the webpanel and/or mapdownloader, for TCP, on that port.
- The rest of the options should remain as provided, unless you're sure about what you're doing.
Some troubleshooting:
- My server starts up correctly, I can see it in the server list and I can access the webpanel, but I can not join or open the map download panel. The error I get when trying to open the map download panel shows an IP that is not mine, i.e. 0.0.0.1.
- Edit this file:
BLSERVER/bin/Linux64_Shipping_Server/TaleWorlds.Starter.DotNetCore.Linux.runtimeconfig.json
. Add"System.Net.DisableIPv6": true,
to theconfigProperties
object. The full file may now look like the code in the spoiler below.
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 } } }
- This stops the server from using IPv6, which seems to cause such issues. You could also disable IPv6 via the global dotnet config or in your operating system, but this is probably the easiest way to do it and it only has an effect on the bannerlord server, not any other applications.
- This may also solve the same issue on windows servers.
- Edit this file:
Aaaand... that's about it for this guide. Not usually writing guides like this one, so if you have any questions or suggestions for improvements, please let me know
Last edited: