
Host a Mount & Blade: Warband Dedicated Server
Mount & Blade: Warband is a medieval action RPG featuring intense combat and large-scale battles. Host multiplayer servers with modules like Native, Napoleonic Wars, and community mods. Supports up to 200 players depending on module and hardware.
Hardware Requirements
Here's what you need to run a Mount & Blade: Warband dedicated server.
Economy
Small server, 1-16 players
Standard
Medium server, 16-64 players
Pro
Large server, 64-200 players
Start hosting from your own computer
Run a Mount & Blade: Warband server on your desktop, laptop, VPS, or dedicated machine — GameCP automates Docker setup, resource allocation, and Mount & Blade: Warband configuration instantly. Automatic port forwarding means your friends can connect without touching your router. Start local, scale to a VPS when you're ready.
Setup in 4 Steps
Skip the manual installation, port forwarding, and configuration. Install on your own computer and start hosting instantly.
The Manual Way vs. GameCP
Manual Setup
- ✗ Configure 2+ firewall ports and router settings
- ✗ Write systemd service files
- ✗ SSH into server to edit configs
- ✗ Requires a VPS or dedicated server
- ✗ 30-60 minutes if experienced
With GameCP
- Automatic port forwarding — no router config
- Host from your own PC, VPS, or dedicated server
- Docker container with auto-restart
- Visual config editor in browser
- Under 5 minutes total
Under the Hood
The full manual process to host a Mount & Blade: Warband dedicated server on a VPS. Or install GameCP on your own computer and skip all of this.
Configure & Prepare
Set your server settings, then install Docker, and pull the Mount & Blade: Warband container image.
# Update system and install Docker sudo apt update && sudo apt install -y docker.io sudo systemctl enable --now docker # Create game server directory sudo mkdir -p /opt/gameserver # Server configuration export SERVER_NAME="GameCP Warband Server" export MAX_PLAYERS="32" export MODULE="Native" export WELCOME_MESSAGE="Welcome to the server!" # Pull the container image docker pull ghcr.io/gamecp/runtimes:wine-base
Run the Installation Script
Mount & Blade: Warband uses a custom install script to download and configure the server files.
#!/bin/bash
apt update
apt install -y wget dos2unix curl
cd /opt/gameserver/
MODULE=${MODULE:-Native}
echo "======================================="
echo "Installing M&B Warband Dedicated Server"
echo "Module: $MODULE"
echo "======================================="
# Download dedicated server files
# The Warband dedicated server is distributed as a standalone download
if [ ! -f /opt/gameserver/mb_warband_dedicated.exe ]; then
echo "Downloading Warband dedicated server files..."
wget -q "https://files.rowe.sh/pterodactyl/mb-warband/mb-warband-links.sh" -O mb-warband-links.sh
chmod +x mb-warband-links.sh
MODULE_BASE_LINK=$(./mb-warband-links.sh link "$MODULE" base)
MODULE_LINK=$(./mb-warband-links.sh link "$MODULE" mod)
if [ -z "$MODULE_LINK" ]; then
echo "ERROR: Module '$MODULE' was mistyped or is not currently supported."
echo "Available modules:"
./mb-warband-links.sh modules
rm -f mb-warband-links.sh
exit 1
fi
# Install base server files if needed
if [ -n "$MODULE_BASE_LINK" ]; then
echo "Downloading base server files..."
wget -qO- $MODULE_BASE_LINK | tar xvz --strip-components=1
fi
# Install module files
echo "Downloading module files for $MODULE..."
wget -qO- $MODULE_LINK | tar xvz --strip-components=1
rm -f mb-warband-links.sh
echo "Server files downloaded successfully."
else
echo "Server files already exist, skipping download."
fi
# Create default config if it doesn't exist
if [ ! -f /opt/gameserver/Config.txt ]; then
# Check for sample config first
if [ -f /opt/gameserver/${MODULE}_Sample_Config.txt ]; then
cp -f /opt/gameserver/${MODULE}_Sample_Config.txt /opt/gameserver/Config.txt
echo "Copied sample config for module: $MODULE"
else
cat > /opt/gameserver/Config.txt << 'CONFIG_EOF'
set_pass
set_pass_admin admin
set_server_name GameCP Warband Server
set_welcome_message Welcome to the server!
set_max_players 32 32
set_port 7240
set_map random_small
set_combat_speed 2
set_friendly_fire 1
set_control_block_dir 0
set_melee_combat_difficulty 0
set_add_to_game_servers_list 1
set_max_teamkills_before_kick 0
set_auto_team_balance_limit 8
set_team_point_limit 300
set_round_max_seconds 600
set_force_default_armor 0
CONFIG_EOF
echo "Created default server config."
fi
dos2unix /opt/gameserver/Config.txt 2>/dev/null
fi
echo "======================================="
echo "Installation completed successfully."
echo "======================================="Open Firewall Ports
Mount & Blade: Warband requires 2 ports to be open for game traffic and queries.
sudo ufw allow 7240/udp sudo ufw allow 7241/udp
Launch the Server
Start the Mount & Blade: Warband server using the configuration from Step 1.
Create the startup script
# Create the startup script cat > /opt/gameserver/start.sh << 'EOF' # Wine prefix, Mono are pre-baked in the Docker image at /opt/wine-prefix # Copy pre-baked prefix on first boot (fast local copy vs 10min download) if [ ! -f /home/container/.wine/system.reg ]; then echo 'Restoring pre-baked Wine prefix...' cp -a /opt/wine-prefix /home/container/.wine [ -d /opt/wine-cache ] && cp -a /opt/wine-cache /home/container/.cache echo 'Wine prefix restored.' fi # Fix Wine HOME ownership issue export HOME=/tmp/wine-home mkdir -p /tmp/wine-home export WINEPREFIX=/home/container/.wine # Start persistent Xvfb (NOT xvfb-run -- Wine forks and xvfb-run kills display) rm -f /tmp/.X*-lock 2>/dev/null mkdir -p /tmp/.X11-unix 2>/dev/null || true Xvfb :99 -screen 0 640x480x24 -ac 2>&1 & XVFB_PID=$! sleep 1 export DISPLAY=:99 echo 'Starting Mount & Blade: Warband server...' rm -f ./rgl_log.txt wine /home/container/mb_warband_dedicated.exe -r Config.txt -m Native 2>&1 & WINE_PID=$! # Wait for Warband to create its log file, then tail it (s=0; while true; do sleep 3; s=); echo " Waiting for server... (s)"; done) & HEARTBEAT=$! for i in ; do if [ -f ./rgl_log.txt ]; then echo "Log file detected after s" break fi sleep 1 done kill 2>/dev/null; wait 2>/dev/null if [ -f ./rgl_log.txt ]; then tail -F ./rgl_log.txt & TAIL_PID=$! else echo 'WARNING: rgl_log.txt was not created after 60s' echo 'Wine processes:' ps aux | grep -i wine || true TAIL_PID="" fi wait WINE_EXIT=$? [ -n "" ] && kill 2>/dev/null kill 2>/dev/null echo "Server exited with code: " EOF chmod +x /opt/gameserver/start.sh
Run the container
docker run -d \ --name mount-blade-warband-server \ -p 7240:7240/udp \ -p 7241:7241/udp \ -e SERVER_NAME="GameCP Warband Server" \ -e MAX_PLAYERS="32" \ -e MODULE="Native" \ -e WELCOME_MESSAGE="Welcome to the server!" \ -v /opt/gameserver:/opt/gameserver \ -w /opt/gameserver \ ghcr.io/gamecp/runtimes:wine-base \ ./start.sh
Or skip all of this
GameCP automates every step above: Docker, port forwarding, startup, and config. Install on your own PC and deploy a Mount & Blade: Warband server in under 5 minutes.
Deploy with GameCPMore Hosting Guides
Explore step-by-step setup guides for other popular games supported by GameCP.
Ready to Host Your Mount & Blade: Warband Server?
Install GameCP on your own computer and start hosting in minutes. Automatic port forwarding, zero config — your friends connect instantly.
No credit card required · Free tier available · Install local, scale later