Forewarning
This guide is somewhat advanced for linux beginners.
Installing Dependencies
Wine
Install wine however you like. Both PopOS repositories (wine6) and WineHQ repositories(wine7) work fine, tested. Just make sure to run winecfg to install .NetFramework after wine is installed.
SteamCMD
Follow the instructions here.
Installing Bannerlord Server Using Steam
Replace anonymous with your steam username that owns Bannerlord. Currently, sadly, downloading/updating the server files without logging in with your username isn't possible.
Solving Missing Files In the Server Files
For some reason, Taleworlds forgot to include some files along with the v1.0 release update. To avoid DirectoryDoesntExist Exception, copy over "MultiplayerForcedAvatars" folder inside "Native" folder from the game, to the /home/username/BannerlordServer/Modules/Native folder. This solves the issue.
Not Sure if Required But Better Safe Than Sorry
Go into /home/username/BannerlordServer/_CommonRedist/vcredist/2019/ and install the package using wine.
Automating
Environment Path for SteamCMD
This step is required to be able to run steamcmd from systemd. Create bin folder in your home directory if it already doesn't exist. Copy the steamcmd executable or create a link to it.
Make sure the paths are full paths.
Script to Run the Server
Create a file called "RunBannerlordServer.sh" on your home directory, paste the code below then modify. Don't forget to make it executable by doing "chmod +x RunBannerlordServer.sh"
Systemd Service
Create a new file in /etc/systemd/system/ called "BannerlordServer.service". Like this:
Paste the code below into the new service file with your favourite text editor.
Reload systemd daemon, then enable the service. Then start it.
Conclusion
It works.
This guide is somewhat advanced for linux beginners.
Installing Dependencies
Wine
Install wine however you like. Both PopOS repositories (wine6) and WineHQ repositories(wine7) work fine, tested. Just make sure to run winecfg to install .NetFramework after wine is installed.
SteamCMD
Follow the instructions here.
Installing Bannerlord Server Using Steam
Replace anonymous with your steam username that owns Bannerlord. Currently, sadly, downloading/updating the server files without logging in with your username isn't possible.
Code:
steamcmd +@sSteamCmdForcePlatformType windows +force_install_dir /home/username/BannerlordServer +login anonymous +app_update 1863440 +exit
Solving Missing Files In the Server Files
For some reason, Taleworlds forgot to include some files along with the v1.0 release update. To avoid DirectoryDoesntExist Exception, copy over "MultiplayerForcedAvatars" folder inside "Native" folder from the game, to the /home/username/BannerlordServer/Modules/Native folder. This solves the issue.
Not Sure if Required But Better Safe Than Sorry
Go into /home/username/BannerlordServer/_CommonRedist/vcredist/2019/ and install the package using wine.
Code:
wine VC_redist.x64.exe
Automating
Environment Path for SteamCMD
This step is required to be able to run steamcmd from systemd. Create bin folder in your home directory if it already doesn't exist. Copy the steamcmd executable or create a link to it.
Code:
mkdir bin
ln -s [fullSteamCmdPath] /home/user/bin/steamcmd
Script to Run the Server
Create a file called "RunBannerlordServer.sh" on your home directory, paste the code below then modify. Don't forget to make it executable by doing "chmod +x RunBannerlordServer.sh"
Code:
#!/bin/sh
#Replace anonymous with steam username. It asks for steam guard password once, afterwards it is able to auto login and update.
bin/steamcmd +@sSteamCmdForcePlatformType windows +force_install_dir /home/username/BannerlordServer +login anonymous +app_update 1863440 +exit
#The Working Directory needs to be Win64_Shipping_Server. So we have to navigate to that folder before running the server.
cd /home/username/BannerlordServer/bin/Win64_Shipping_Server
#Replace longAssAuthKey at the end with your private auth token
wine DedicatedCustomServer.Starter.exe /dedicatedcustomserverconfigfile ds_config_sample_team_deathmatch.txt /DisableErrorReporting /dedicatedcustomserverauthtoken longAssAuthKey
Systemd Service
Create a new file in /etc/systemd/system/ called "BannerlordServer.service". Like this:
Code:
sudo touch /etc/systemd/system/BannerlordServer.service
Code:
[Unit]
Description=BannerlordServer
After=syslog.target network.target
[Service]
ExecStart=/home/username/RunBannerlordServer.sh
Restart=always
SyslogIdentifier=BannerlordServer
User=username
Group=username
Type=simple
[Install]
WantedBy=multi-user.target
Reload systemd daemon, then enable the service. Then start it.
Code:
sudo systemctl daemon-reload
sudo systemctl enable BannerlordServer
sudo systemctl start BannerlordServer
Conclusion
It works.
Last edited: