Mount & Blade II: Bannerlord guide

Set up a Bannerlord dedicated server

Install the Bannerlord dedicated server with SteamCMD, add your token, write the configuration file, open the UDP port and run it from Join as Admin.

Updated

A Mount & Blade II: Bannerlord dedicated server hosts the game's multiplayer modes, listed in the game's Custom Server List under the name you choose, so your group can play without one of you hosting. Bannerlord's campaign has no dedicated server. Hosting needs a token from your own copy of the game, which is the part most guides skip.

1. Get a server token

TaleWorlds lets a custom server run only with a token made in the PC game, tied to your account and valid for three months. Without it the server stops at start with Login Failed! Server is shutting down. Making one takes a minute; see getting a Bannerlord server token.

2. Install the server

The server is a separate Steam app, Mount & Blade II: Bannerlord - Dedicated Server, app 1863440. Anonymous SteamCMD can download it:

steamcmd +force_install_dir /opt/bannerlord +login anonymous +app_update 1863440 validate +quit

That installs the stable release. Add -beta beta to the app_update line for TaleWorlds' public beta, which is where the next version appears first. The server's version is in Modules/Native/SubModule.xml.

The 1.4 releases run on .NET 6 and the 1.5 beta on .NET 8, and the server also loads its web panel, so install the matching ASP.NET Core runtime, not only the .NET runtime.

3. Put the token in place

The server reads the token from a file in the home folder of the user that runs it:

Mount and Blade II Bannerlord/Tokens/DedicatedCustomServerAuthToken.txt

On Linux that is under $HOME; on Windows, under Documents. The file holds only the token, on one line. Keep it private: anyone with it can host servers as you.

4. Write the configuration file

The server runs each line of a configuration file as a console command. This one starts a Skirmish server for 12 players with three maps in rotation:

ServerName Battanian Shieldwall
GameType Skirmish
AdminPassword choose-a-long-one
GamePassword the-join-password
WelcomeMessage Welcome to the shield wall
MaxNumberOfPlayers 12
CultureTeam1 vlandia
CultureTeam2 battania
Map mp_skirmish_map_002f
add_map_to_automated_battle_pool mp_skirmish_map_002f
add_map_to_automated_battle_pool mp_skirmish_map_007
add_map_to_automated_battle_pool mp_skirmish_map_020
add_map_to_usable_maps mp_skirmish_map_002f Skirmish
add_map_to_usable_maps mp_skirmish_map_007 Skirmish
add_map_to_usable_maps mp_skirmish_map_020 Skirmish
set_automated_battle_count -1
start_game
enable_automated_battle_switching
  • GameType is Skirmish, Captain, TeamDeathmatch, Siege, Duel or Battle. Each takes its own maps; the server's Modules/Native/ModuleData/Multiplayer/MultiplayerScenes.xml lists them by scene name.
  • CultureTeam1 and CultureTeam2 are empire, vlandia, battania, sturgia, khuzait or aserai.
  • Map is the first map; players vote for the next among the maps in the battle pool. Leave out GamePassword for an open server.
  • Because every line is a command, keep each value on one line.

5. Start it

From the server's bin/Linux64_Shipping_Server folder, with the game port you chose in place of 7210:

LD_LIBRARY_PATH=. dotnet exec TaleWorlds.Starter.DotNetCore.Linux.dll \
  '_MODULES_*Native*Multiplayer*_MODULES_' \
  /dedicatedcustomserverconfigfile my_server_config.txt \
  /tickrate 60 \
  /dedicatedcustomserver 7210 USER 0 \
  /playerhosteddedicatedserver

If the token is accepted, the server registers its game and the UDP port opens. Then it shows up in the Custom Server List.

6. Open the port

Players connect on the UDP port you pass after /dedicatedcustomserver. Forward that UDP port on your router and allow it in the firewall. The server's web panel listens on the same number over TCP; do not forward it, because it is meant for the server itself.

How much it needs

An idle server uses about 500 MB. Its load is the battle itself: the players and the troops their formations lead. TaleWorlds asks for 2 cores and 4 GB for Skirmish and Duel, and 4 cores and 8 GB for Siege, Team Deathmatch and Captain on full servers.

Run it from the game

In the Custom Server List, right-click your server and choose Join as Admin, then type the AdminPassword. The game's admin panel changes the map, mode and options for the running battle.

There is nothing to back up

A multiplayer server keeps no world: every battle starts fresh, and bans last until the server restarts. Your configuration file and token are all that matters.

Keep it on the same version as the game

Players can only join a server on their own game version. When Bannerlord updates, update the server with the same SteamCMD command and restart it. For the beta, players switch to the game's beta in Steam (Properties, Betas) to join a beta server.

On HostForge

Skip the setup

HostForge runs the server for you: it installs the right runtimes, writes the configuration file from the mode, maps and teams you pick, keeps the server on the current release or the 1.5 beta, and opens the port. You paste your token once; HostForge stores it, never shows it again and warns you ten days before it expires. Players join as described in joining a Bannerlord custom server.

More Mount & Blade II: Bannerlord guides