Getting a Server Up and Running
Setting Up the Server
You have two choices when setting up your server – you can run it in dedicated
mode or non-dedicated mode. Dedicated just means that no one is playing the
game on the server’s machine – the machine is dedicated just to acting as a
server. Non-dedicated means the opposite – the server is also being used
(probably by you) to play on the server. This guide applies equally to both types
of servers.
You also have two choices for starting your server. You can start it up from the
command line using a config file or from within the game. Starting from the
command line gives you much more control over the server and only this option
will be covered in this guide. See your game manual for instructions on how to
use the in-game server setup.
The Server Command Line
The easiest way to start your server from the command line is to create an icon
on your Windows desktop, so you just have to double click it to start the server
running. To create a Windows icon, right click on your desktop and select “New -
> Shortcut”. A short wizard will walk you through finding the program you want
the icon to run (you’ll find MOHAA.exe in \Program Files\ EA GAMES\ MOHAA).
Next, you’ll need to add the arguments to your command line. Do this by right
clicking on your newly created icon, selecting “Properties” and making your
changes in the “Target” text box. A good all purpose command line would be
"C:\Program Files\EA GAMES\MOHAA\MOHAA.exe" +set developer 1 +set dedicated 1
+set ui_console 1 +set sv_maxclients 16 +exec server.cfg
This tells the server to run in developer mode (+set developer 1), which, among
other things, allows the server to keep a log. It also runs the server in dedicated
mode (+set dedicated 1), activates the console (+set ui_console 1 – not really
needed, but useful if you need to do testing on your server), sets the maximum
number of players to 16 (+set sv_maxclients 16) and configures the server using
the settings stored in server.cfg (+exec server.cfg).
If you intend to run your server in non-dedicated mode, you will need to change
the “+set dedicated 1” to “+set dedicated 0”. You should get used to using a 1 to
mean ‘yes’ and a 0 to mean ‘no’, as it is common in many other server
commands and variables.
You can set just about any game setting from the command line, but usually,
there are just a few that you’ll want to use. You can also include many of these
same settings in your server’s config file, but they will be overridden by whatever
you have set in your command line. So, if you set sv_maxclients both on the
command line and in your config file, whatever is on your command line will be
used for setting sv_maxclients.
Why is it set up this way? Overriding settings with the command line allows
hosting companies to control specific game settings, such as the maximum
number of players on the server. Since servers are usually priced by the player
(and the bandwidth each consumes), you can see why a host would want to have
some ability to manage the server from the command line.
The Server Configuration File
Once the server starts up, it has to know what kind of game you want to run,
what the name of the server is, what maps you want, etc. This information is all
stored in the server configuration file, or ‘config’ for short. This file can be saved
anywhere, but you should keep it in your EA GAMES\ MOHAA\ main directory.
To run your game from the command line, you will have to build a config. Below
is a template for one that you can use. Whenever you are editing your config file,
you should use Notepad and not your favorite word processor. This is because
MOHAA will only understand the config file if it is in plain text format. Most word
processors store their files in a proprietary format which will cause MOHAA to
choke. You can access Notepad from your Start -> Accessories menu.
In the config below, the text that comes after double slashes (ie “\\”) is a
comment and ignored by the server. To use this template, just copy and paste it
into a Notepad text document, make your changes and save it in your
MOHAA\main directory. Items that you should modify are in red.
// Generic MoHAA Server Config File
// This block of settings controls the info players will see about your server in game
// browsers, like GameSpy. If you don’t want your server to appear in GameSpy’s server
// list, change the 1 to a 0 in sv_gamespy.
seta sv_hostname "
server name as it will appear in GameSpy"
sets Admin "
your nick goes here"
sets URL "
www.yourwebpage.com"
sets Connection "
T1" // Your connection type (you can type whatever you want here)
seta sv_gamespy "
1" // Change to a “0” if you don’t want your server on GameSpy
//This block of text controls the network settings for your server. Unless you have a
// specific reason for changing them, you should leave these as they are.
net_noipx 1 // disables the IPX protocol
net_port 12203 // specifies port 12203 for client connections
// This block of text controls your server’s security. If you don’t want to enable rcon
// commands, comment out the rconpassword line.
set rconpassword "
your password here"
seta sv_floodProtect "1" // won’t allow players to flood server
seta flood_waitdelay "10"
seta flood_persecond "4"
seta flood_msgs "4"
set sv_pure "0" // requires players to have pure game files
// This block of text controls your server’s performance variables.
seta sv_allowDownload "0" // if players don’t have maps, don’t send them
seta sv_maxRate "9000" // allow players to pull up to 9,000 bps
seta sv_fps "20" // process 20 frames per second on server
seta sv_maxping "200" // players must ping below 200 to connect
// This block of text controls the number of players on the server
// If you don’t want private slots on the server, you should comment out
// the sv_privateClients and sv_privatepassword lines
set sv_maxclients "16” // Maximum of 16 players on server
set sv_privateClients "3" // 3 of 16 slots require a password
set sv_privatepassword "your private password here"
// the password for the private slots
// This block of text controls the game play variables on the server.
seta timelimit "15" // maps will run for 15 minutes
seta fraglimit "0" // maps will not end based on frags
set g_gametype 4 // map will be objective (2 = TDM)
set g_teamdamage "0" // friendly fire is off (1 = on)
set g_inactiveSpectate "30" // players go to spectate after 30s of inactivity
set g_inactiveKick "120" // players kicked after 120s of inactivity
// the next line is the list of maps the server will run, in order
// if you change to tdm maps, don't forget to change the gametype
seta sv_maplist "obj/obj_team1 obj/obj_team2 obj/obj_team4"
map obj/obj_team1 // the first map to run
Once you’ve made your changes and saved the text file, double clicking the icon
you created will start up your server. A couple of things to note:
· If you want to use admin tools like Autokick or issue console commands
from inside the game, you will need to set your rcon password in the
config file. To use rcon, you should also check the ‘Console’ box in the
Advanced Settings in the MOHAA setup screen.
· MOHAA does not allow you to mix maps of different game types in the
same rotation. If you want to do this, you will need a mix maps mod.
Otherwise, you can save two copies of your config, one with tdm maps
and the other with objective maps (or whatever game type you want).
· The default server port is 12203. If you are behind a firewall, you will need
to open this port to the outside world. You should also open port 12300 so
services like GameSpy can see your server.