Hosting a Dedicated Server Guide

Users who are viewing this thread

Dedicated server guide

1. Requirements
2. Installation
  - Windows
  - Linux
3. Configuring the server
4. Opening ports
5. Running the server
  - Windows
  - Linux
6. Checking if server works
7. Removing permanent bans

1. Requirements
Stable internet connection (Only if you want to host a game from your home)
You need a proper connection to host a game, go to: and test your Upload bandwidth.
It is displayed in Mb/s (Mega bit per second) for example 0.59 Mb/s
We need to convert this value to KB/s (KiloBytes per second) use this calculator: Megabit to Kilobyte
We need this value to calculate how many players your computer can support. In our example 0.59 Mb/s is 75.52 KB/s
One player takes about 5 KB/s so you take your value and divide it by 5 in my example that is 15.1 players which means our internet supports not more then 15 players.
If your calculated player count reaches around 10-20 players they will probably take about 7 or 10 KB/s so you need to turn the player count a bit down.

Good CPU
A server will take a lot of CPU load, especially once it hits above 40 players.
CPU usage of a server raises exponentially with the player count, which means if 40 players are taking 60% of your cpu that 60 players might take 100%!
The warband server is Single Threaded which means if you have a multicore computer or server it will only use one core and won't use other cores if this one core is full.
To test how much your server can handle for CPU usage, just start your server later in this guide with bots, A bot takes about 50% of player CPU usage,
so if your server for examples is using 100% CPU with 200 bots your server can handle about 100 players. (Note that horses are seen to the server as bots so they take CPU usage as well!)

2. Installation

The server files are made for Windows and this is the most easyest setup, although the dedicated server seems to run better on Linux.

- Mount & Blade Fire and Sword Dedicated server files: Dedicated Files Scroll down to Other Downloads.

Installing the dedicated server files.
- After downloading the server files we need to extract them.
- Open the downloaded file for example: ""
- Click on the folder "Mount&Blade With Fire and Sword Dedicated" and extract it to "C:\Program Files\" or any directory you want really.
- Go to the folder you extracted to. which in this example is C:\Program Files\Mount&Blade With Fire and Sword Dedicated\

You installed it. Skip the Linux Installation part and read on.

Linux installation is a bit complex but if you are using linux you are smart enough :smile:.
The dedicated server seems to run better for me on linux then windows. Tell me your results!
I am using Ubuntu Server 9.10 for linux so i will be using some specific Debian/Ubuntu commands, but you can just google yours.

- Mount & Blade Fire and Sword Dedicated server files: Dedicated Files Scroll down to Other Downloads.
- Wine 1.1 follow installation guide here: Wine Development build installation steps
- Screen program (sudo apt-get install screen)
- Unzip program (sudo apt-get install unzip)

Installing the dedicated server files on linux.
- After downloading the server files we need to extract them.
- Move the downloaded file to your desired location; For example: "/home/"
- execute: "unzip" (replace xxxx with the downloaded version)
- execute: "cd Mount&Blade With Fire and Sword Dedicated"

You installed it. Read on.

3. Configuring the server
Decide Gametype
To configure the server we will start with a specific game mode example file. Decide upon which gamemode you like.
You can choose from: Battle, Capture the Flag, Conquest, Deathmath, Fight and Destroy, Seige, Team Deathmatch and Captain Team Deathmatch.

Making the config.
Open up your decided config file they are named: "Sample_<Gamemode>.txt"

Set the Admin password, Server name and Welcome message first:
set_pass_admin ADMINPASS
set_server_name SERVERNAME
set_welcome_message WELCOME MESSAGE

Notice that servername can only contain simple characters: ( A-Z, 0-9, _ ) NOTHING FANCY!

Now set the max players you found with the internet speed calculation:
set_max_players 15 15

Maximum is 64 players!

Scroll down and find the set_upload_limit command This one is really important! It will basicly limit the server to use more bandwidth then your internet can handle
and scale its usage accordingly. it's really important that you set this to your Mb/s times 1000000 (one million)
In our example:
0.59 Mb/s * 1000000 = 590000 So we end up with:

set_upload_limit 590000

You will also find a setting for port here:
set_port 7240

You can change it to whatever you like, but in this tutorial I'm assuming you kept it at it's default value.

Your done setting up the basic commands, if you want to configure more commands check out the file "Readme.txt"
In the dedicated server folder, it will give you all possible set_ commands and what they do.

4. Opening ports
(Also know as Forwarding ports)

Router Firewall
To make people able to see the server in the server list and join it you need to open the port on your computer and router.
Before you can open your port you need to find out what router you are using. just find your internet cable and see what box is connected to it,
flip it over and write down the details that are written on the sticker on its back.

Find your router in this list and select it:
Router port forward guides

Once you found your router and selected it, skip the ad by clicking in the top right corner.
The page your getting now has lists of games to open ports for, Warband is not in the list so click on "Default Guide"
Now work through the port opening guide for the port you configured with the set_port command. In our example that is: 7240
You are only opening a single port, NOT a port range. Open the port for the protocol type UDP not for TCP!

Windows Firewall
Now we must create a exception in your windows firewall aswell for the same port you set in your settings.
Follow one of these guides:

For Windows 7:

For Windows Vista:

For Windows XP:

5. Running the server

This is really easy!.

Go to the folder you installed the dedicated server to and just run the file:

Your server should be running. Skip the Linux part.

For Linux it isn't that easy.

We will be running the server in a app called Wineconsole which will emulate a windows console and send it's input back to the Linux console.
Also we will be running the wineconsole inside the screen system so you can close your SSH session to the server without shutting down the server.

Use these commands to start the server:
"wineconsole --backend=curses mb_wfas_dedicated.exe -r Sample_<gamemode>.txt -m Ogniem i Mieczem"

The server should be running, detach out of screen with: Control + A + D
to attach to the screen session again type in console:
"screen -r"

If you have multiple screen sessions open you need to specify which. First get a list of all the screens:
"screen -ls"

Find the one you want to attach to then simply type:
"screen -r <name of screen>"

6. Checking if server is working
- Start your Mount & Blade Warband game and go to the server list, hit "Start Search"
- Fill in the admin password and try to join the server
- See if everything is working fine and ping is fine.

7. Removing permanent bans
You accidentally banned a mate of you? don't worry!

Votebans cannot be removed, they are automatically removed after 1 hour.
If you banned someone with the admin menu they are permanently banned. removing them is really easy!
- Open up the file ban_list.txt inside your Logs folder.
- Remove the desired line in this file which contains the person his ID and name.
- Save the file and your done.

If you guys have any questions or additions to the guide post here :smile:

22nd Battalion Server Manager

Nice guide Vince! One question. What wold you suggest as a player limit for the new Captains mode? Because of the variable amount of bots would you assume a large room for CPU usage? What are your thoughts of the captains mode in general?
Nice guide, though I do not think that the upload for each player is only 5kb. I should be able to host a 40 person server, but I can only host about 20 before it turns into massive lag fest 500-1000 ping for each player.
Hello Lindsay.
Of course you can host Servers from your PC.
but if you open more slots you need more CPU and a betthere Internet.

So if it lags you have a to slow internet.

Some of good Servers have a Internet Connection of 1.000MB/s [1Gbit/s] normaly internet conections are  16Mb or slower ....

I'm working on hosting a server for organized line battle events, and the original plan was to use the Captain mode with no respawns, and cavalry disabled, but since Captain is a deathmatch gamemode this doesn't really work.  As this is the first MnB server I have hosted I'm not sure if it is possible to change the weapons/classes available by default or if I would have to create a module for it.

So my question is: is there a way to change the items/classes that players can use in the Native game, or do I need to make a module that has the setup I want to use?

Also if anyone has any suggestions on how to set it up so that players get to command a squad like in Captain mode, but there are no respawns, that would be great to.
2 bots = the power of 1 human player in general speaking.
In This gamemode you spawn with 8?  bots.
So to speak each player represents 5 players.
So take your slotcount / 5 I'd say.
In general I think they recommend 16 slots.

What errors? Ill fix them.

Lindsay, What I said was that it raises exponentially. Let me explain.
If say one player generates 1-2 Kb/s all this information must be send to each player.
The engine does some optimalization on this part, but it could mean that with 40 players your looking at sending 10-12 KB/s to each player.

To answer your questions, You cannot.
I made for Warband native compatible class limits before but.. Im not planning to port them at this time.
Also, try battle gamemode with bots, it comes quite close to it.
Archonsod said:
Bear in mind also when hosting a server your upload is as important as your download. Most ISP's give you plenty of download bandwidth but heavily restrict the upload.

That would be my case. I have an 18 Mbps download but a 2 Mbps upload.

Vincenzo said:
Lindsay, What I said was that it raises exponentially. Let me explain.
If say one player generates 1-2 Kb/s all this information must be send to each player.
The engine does some optimalization on this part, but it could mean that with 40 players your looking at sending 10-12 KB/s to each player.

Thanks for clearing that up.
Hello: I am Raiden , spanishservers noveladmin ([Esp]Clan_blackwater)
I had a couple of questions, if you can help be:
1. exist  some for fire and swords?
2.How I can raise more than 64 slots players?

Thanks and sorry for my English
Guys i need help ;D ,i stuck on part "opening ports" i have modem motorola sb5101e surfboard ,i read on some forum that you cant open ports on modem (they are already open  :?:) but they arent open,i dont know what to  :roll:
Hi guys! I've started a small dedicated siege server (because there's only one server in Australia it's a battle server)... I'm not around often to admin it... So I'm just wondering if it's possible to setup multiple accounts for other trusted players to admin it for me

1. No not at this time.
2. You need to hex it.

Find a user manual for your router, and open those ports, there must be something in the manual about it..

Just give those trusted people your admin password......
How can i close the server if i have closed the cmd whitout exiting the server.
My server still runs, so how can i close it ? Please help! - And sorry for my very bad english  :wink:
So I've been tinkering with my F&S Dedicated, and I figured out that it wont appear on LAN or Internet server lists. While I host my own w/o a dedicated, it appears only on LAN. How could I fix my non-dedicated to appear on Servers list? (Yes, I checked the box in the upper corner) Or how could I have my dedicated appear on the internet server lists? Would copy&pasting my sample_battle.txt might help?
Players are able to join my game, but after like 5 minutes of playing it suddenly starts to lag and everyones latency, except mine, are raising up to 500, I am able to host other games without problems. 0.36 MBit/s internet should be good for 9 players according to your calculation, my server hosts a 6 slot Coop.

Help would be pretty good.
Hi, is there any way to run a dedicated server without gui?
I've only got commandline on my server.

i got a problem:
i did everything you said and i can set up the server and i can even see it(with source internet list) but other people dont see it.
Top Bottom