Comprehensive Server Hosting Guide on Azure (Docker, Linux)
Summary
Details
https://github.com/fiefevictionnotice/fief_tssl_bl_srv
(forked from vojinpavlovic/tssl_bl_srv)
Install Git: Download the Git installer: https://git-scm.com/download/win Run it with the defaults (next → next → finish) - as with everything here, use at your own risk. Or install with winget from a PowerShell window: winget install -e --id Git.Git Open PowerShell and check it worked: git --version You should see something like git version 2.x.x.
Clone the Repo:
C:\Users\YourName\Documents\fief_tssl_bl_srv
Whenever you add a map, you need to ensure you have an updated server configuration file which actually loads the map in. Then invoke that updated server configuration when you start the server. If you review the provided example configuration files, you can see how both native (built-in) and custom maps are loaded in a server configuration file. You cam mix multiple maps that support different game modes in a server even though that's not used in the example server configuration files.
Install Docker Desktop - Windows
https://docs.docker.com/desktop/setup/install/windows-install/ winget install -e --id Docker.DockerDesktop Make sure you run docker login once as well. You'll need to run az acr login when using Azure Container Registry.
https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-windows?view=azure-cli-latest&pivots=winget
Install Azure CLI - Ubuntu
https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux?view=azure-cli-latest&pivots=apt
Install Docker Engine - Ubuntu
https://docs.docker.com/engine/install/ubuntu/
- Recap of a complete build process when hosting in Azure -
Create an account for Azure Portal & Docker
Windows desktop:
Install Git, Docker Desktop, Azure CLI
Login to Docker Desktop (app) docker login from PowerShell, login to Azure CLI (PowerShell 7 az acr login)
Change to your build directory in PowerShell e.g.
Azure:
Set up Azure Container Registry, take note of your Login Server (YourNameHere.azurecr.io)
Set up an Azure Virtual Machine, download your SSH Private Key.
VM SKU: something like a D4ads_v6 SKU
SSH to your VM, install Docker Engine & Azure CLI
Login to Azure CLI in preparation to pull the image az acr login - this requires you to open a web URL on your local desktop (read the output from your login command).
Windows Desktop:
Run a build & Push command:
Azure:
Run a pull command e.g. docker pull YourRegistryLoginServerNameHere.azurecr.io/YourImageNameHerePossiblyBannerlord:latest
You may need to run it as sudo docker pull etc.
Bannerlord Token Generation:
https://moddocs.bannerlord.com/multiplayer/hosting_server/#generating-a-token
Alt + ~ to launch Console
Run the following command: customserver.gettoken - hit enter.
You'll use the token from Documents\Mount & Blade II Bannerlord\Tokens in your Server launch command on your Azure VM
Start up the server command like with the following command:
(forked from vojinpavlovic/tssl_bl_srv)
Overview:
Install Git and clone the repository. You can modify the modules, server configuration files, and maps afterwards.Install Git: Download the Git installer: https://git-scm.com/download/win Run it with the defaults (next → next → finish) - as with everything here, use at your own risk. Or install with winget from a PowerShell window: winget install -e --id Git.Git Open PowerShell and check it worked: git --version You should see something like git version 2.x.x.
Clone the Repo:
cd $env:USERPROFILE\Documents
git clone https://github.com/fiefevictionnotice/fief_tssl_bl_srv.git
That makes a folder:C:\Users\YourName\Documents\fief_tssl_bl_srv
Whenever you add a map, you need to ensure you have an updated server configuration file which actually loads the map in. Then invoke that updated server configuration when you start the server. If you review the provided example configuration files, you can see how both native (built-in) and custom maps are loaded in a server configuration file. You cam mix multiple maps that support different game modes in a server even though that's not used in the example server configuration files.
Install Docker Desktop - Windows
https://docs.docker.com/desktop/setup/install/windows-install/ winget install -e --id Docker.DockerDesktop Make sure you run docker login once as well. You'll need to run az acr login when using Azure Container Registry.
To Host in Azure
Install Azure CLI - Windowshttps://learn.microsoft.com/en-us/cli/azure/install-azure-cli-windows?view=azure-cli-latest&pivots=winget
winget install --exact --id Microsoft.AzureCLI
Install Azure CLI - Ubuntu
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux?view=azure-cli-latest&pivots=apt
Install Docker Engine - Ubuntu
https://docs.docker.com/engine/install/ubuntu/
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh ./get-docker.sh --dry-run
- Recap of a complete build process when hosting in Azure -
Create an account for Azure Portal & Docker
Windows desktop:
Install Git, Docker Desktop, Azure CLI
Login to Docker Desktop (app) docker login from PowerShell, login to Azure CLI (PowerShell 7 az acr login)
Change to your build directory in PowerShell e.g.
cd $env:USERPROFILE\Documents\fief_tssl_bl_srv\
We'll come back and build the image after Azure Container Registry is setup.Azure:
Set up Azure Container Registry, take note of your Login Server (YourNameHere.azurecr.io)
Set up an Azure Virtual Machine, download your SSH Private Key.
VM SKU: something like a D4ads_v6 SKU
SSH to your VM, install Docker Engine & Azure CLI
Login to Azure CLI in preparation to pull the image az acr login - this requires you to open a web URL on your local desktop (read the output from your login command).
Windows Desktop:
Run a build & Push command:
docker build -f dockerfile -t YourRegistryHere.azurecr.io/bannerlord:latest .; docker push YourRegistryHere.azurecr.io/bannerlord:latest
Azure:
Run a pull command e.g. docker pull YourRegistryLoginServerNameHere.azurecr.io/YourImageNameHerePossiblyBannerlord:latest
You may need to run it as sudo docker pull etc.
Bannerlord Token Generation:
https://moddocs.bannerlord.com/multiplayer/hosting_server/#generating-a-token
Alt + ~ to launch Console
Run the following command: customserver.gettoken - hit enter.
You'll use the token from Documents\Mount & Blade II Bannerlord\Tokens in your Server launch command on your Azure VM
Start up the server command like with the following command:
docker run -d --name bnl-tdm \
-e TW_TOKEN=TW_TOKEN=FkHLdAReallyLongStringWasRedactedHereRepeatingLetters== \
-e MODULES="_MODULES_*Native*Multiplayer*_MODULES_" \
-e TICK_RATE=60 \
-e SERVER_CFG="Native/server-arena-tdm" \
-e SERVER_PORT=7210 \
-p 7210:7210/tcp -p 7210:7210/udp \
yourazureregistry.azurecr.io/bannerlord:latest
This guide was created by its original author on the Steam Community. Are you the author and want it removed? Request removal.