This guide walks you through setting up a Medal of Honor: Allied Assault server on an Ubuntu Server. Follow the steps carefully to ensure a smooth setup. The guide supports both the vanilla (v1.11) and Reborn (v1.12) patches.
Requirements
- Ubuntu Server
- Local IP of the server (e.g., 192.168.0.123)
- Access to your router to forward ports (default: 12203)
Optional: Create a User for the Server
We will use the username gameservers
for this guide. You can change it to any name, but ensure consistency throughout.
Create the user:
sudo adduser --home /home/gameservers gameservers
Grant sudo access (optional):
sudo usermod -aG sudo gameservers
Switch to the user:
su - gameservers
Setting Up the Files
Create a new directory:
mkdir mohaa
Navigate to the directory:
cd mohaa
Download the minimalist server files from github
git clone https://github.com/Grimm1/main
these are cut down versions of the original game files, they have had all images and sound files replace with placeholders.
Vanilla Server Setup
With the mohaa
folder as your working directory, download the server files:
wget grimms3dworlds.ddns.net/ul/mohaa_lnxded.tar.gz
Extract the files:
tar -xvf mohaa_lnxded.tar.gz
Remove the tar file:
rm mohaa_lnxded.tar.gz
This should result in the following file structure:
fgameded.so mohaa_lnxded main/ pak0.pk3 pak1.pk3 pak2.pk3 pak3.pk3 pak4.pk3 pak5.pk3 pak6.pk3 pak7.pk3 pak6EnUK.pk3
Reborn Server Setup
For a better experience, install the Reborn unofficial 1.12 patch from https://x-null.net/MOH2/. Follow the instructions there to apply the patch.
Common Setup for Vanilla and Reborn
Make the main executable file executable:
sudo chmod +x mohaa_lnxded
The MOHAA binaries are 32-bit, and modern Linux distributions may lack 32-bit support. Enable it with:
sudo dpkg --add-architecture i386
Update the package list:
sudo apt update
Install the required 32-bit dependencies:
sudo apt-get install libc6-i386 libstdc++5:i386
Test the server installation:
./mohaa_lnxded
Once verified, press Ctrl+C
to stop the server.
Server Configuration
Create a configuration file (e.g., server.cfg
) in the main
folder. Open it in a text editor and paste the following configuration:
// Medal of Honor: Allied Assault Server Configuration File (Stock + Reborn 1.12 Patch)
// Place in the 'main' folder of your MOHAA server directory
// Generic values for identifying fields; modify as needed
// Some values MAY NOT WORK
// Combines stock MOHAA (v1.11) and Reborn 1.12 settings
// Reborn settings in a dedicated section
// Server Information
seta sv_hostname "My MOHAA Server" // Server name displayed in the server browser
seta sv_maxclients 24 // Maximum number of players (1-64)
seta sv_privateClients 0 // Number of reserved slots for private clients
seta sv_privatePassword "" // Password for private slots (leave empty if none)
seta sv_maxRate 25000 // Maximum data rate per client (5000-25000, adjust for bandwidth)
seta sv_maxPing 0 // Maximum ping allowed for clients (0 = no limit)
seta sv_minPing 0 // Minimum ping allowed (0 = no limit)
seta sv_timeout 200 // Time (seconds) before dropping inactive clients
seta sv_zombietime 1 // Time (seconds) to wait for zombie clients before disconnect
seta sv_reconnectlimit 10 // Number of reconnect attempts allowed
seta sv_cheats 0 // Disable cheats (0 = off, 1 = on)
seta sv_pure 0 // Allow custom files (0 = off, 1 = official files only)
seta sv_fps 20 // Server frame rate (20 is default for stability)
seta sv_floodProtect 1 // Enable flood protection to prevent spam
seta sv_flood_waitdelay 10 // Flood protection delay (seconds)
seta sv_flood_persecond 4 // Max messages per second for flood protection
seta sv_flood_msgs 4 // Max flood messages
seta sv_allowDownload 0 // Disable client downloads to reduce server load
seta sv_allowAnonymous 0 // Disallow anonymous clients (0 = must login, 1 = allow anonymous)
seta sv_precache 1 // Precache game assets for faster loading
seta sv_gamespy 1 // Enable Reborn master server compatibility
// Admin and Contact Information
// Note: rconpassword is best set in the command line for security (e.g., +set rconpassword "yourpassword")
//set rconpassword "" // RCON password for remote admin access (CHANGE THIS!)
seta sv_rconIP "" // Restrict RCON to specific IP (leave empty for no restriction)
seta sv_remotetoolip "" // [Reborn] Restrict remote tool access (adjust as needed)
seta g_motd "Welcome to My MOHAA Server!" // Message of the Day displayed to clients
seta sv_admin "ServerAdmin" // Admin name (generic placeholder)
seta sv_adminemail "admin@example.com" // Admin contact email (generic placeholder)
// Gameplay Settings
seta g_gametype 1 // Game mode: 1=Free-for-All, 2=Team-Match, 3=Round-Based, 4=Objective
seta g_timelimit 10 // Time limit per map (minutes, 0 = no limit)
seta g_roundlimit 0 // Number of rounds per map (0 = no limit, for round-based modes)
seta g_fraglimit 0 // Frag limit per map (0 = no limit)
seta g_warmup 15 // Warmup time before match starts (seconds)
seta g_inactivekick 0 // Disable kicking inactive players
seta g_inactivity 0 // Disable spectator inactivity timeout
seta g_forcerespawn 0 // Allow manual respawn (0 = off)
seta g_synchronousClients 0 // Async client updates (0 = off)
seta g_smoothClients 1 // Smooth client movement (1 = on)
seta g_teamdamage 0 // Friendly fire: 0 = off, 1 = on
seta g_forceteambalance 1 // Force team balance (0 = off, 1 = on)
seta g_maxTeamKills 3 // Max team kills before auto-kick (0 = disable)
seta g_gravity 800 // Default gravity
seta g_knockback 1000 // Default knockback force
seta g_speed 320 // Default player movement speed
seta g_healrate 0 // Disable health regeneration
seta g_healthdrop 1 // Enable health pickups from players
seta g_realismmode 0 // Disable realistic damage
seta g_forceteamspectate 1 // Force spectators to team chat only
seta g_spectate_allow_full_chat 1 // Allow spectators full chat
seta sv_team_spawn_interval 0 // Instant team respawns
seta g_inactivespectate 0 // Disable moving inactive players to spectator
seta g_teamswitchdelay 10 // Delay before switching teams (seconds)
seta g_allowjointime 20 // Time to join match (seconds)
seta cg_forcemodels 1 // Force consistent player models
seta dmrespawning 0 // Default DM respawn behavior
seta dmroundlimit 0 // No round limit for DM
// Reborn Settings comment if not required
seta sv_updatedelay 168 // [Reborn] Check for updates every week (hours)
seta sv_packetantiflood 0 // [Reborn] Disable packet flood protection for Autokick/Foresight/CI
seta sv_kickbadcmd 1 // [Reborn] Kick players for bad commands
seta10 sv_minclientversion "1.12" // [Reborn] Enforce Reborn 1.12 client version
seta sv_info "MoH:AA 1.12 Reborn Patch" // [Reborn] Server info string
seta sv_antistwh 0 // [Reborn] Disable anti-shoot-through-wall protection
seta sv_antiwh 0 // [Reborn] Disable anti-wallhack protection
seta sv_antiwhskipping 400 // [Reborn] Anti-wallhack frame skipping (assumed valid)
seta sv_filterchat 0 // [Reborn] Disable chat filtering
seta sv_disablechat 0 // [Reborn] Enable chat
seta sv_banning 0 // [Reborn] Disable ban file reading
seta sv_maxconnperip 3 // [Reborn] Max 3 connections per IP
seta sv_sounddistance 8000 // [Reborn] Sound propagation for anti-cheat
seta sv_kickping 0 // [Reborn] Disable ping-based kicking
seta sv_voting 1 // [Reborn] Enable player voting for maps/modes
seta sv_votepercent 50 // [Reborn] Vote pass percentage (50%)
seta g_scripttrace 0 // [Reborn] Disable script debugging
seta sv_chatter 1 // [Reborn] Enable in-game chat
// Map Rotation
seta sv_maplist "dm/mohdm1 dm/mohdm2 dm/mohdm3 dm/mohdm4 dm/mohdm6 dm/mohdm7" // List of maps
//seta sv_maprotation "gametype ffa map dm/mohdm1 gametype ffa map dm/mohdm2 gametype ffa map dm/mohdm3 gametype ffa map dm/mohdm4 gametype ffa map dm/mohdm6 gametype ffa map dm/mohdm7" // Map rotation
map "dm/mohdm6" // Start server on dm/mohdm6
// Network Settings
seta net_noipx 1 // Disable IPX protocol (use TCP/IP only)
// Logging
seta g_log "qconsole.log" // Log file name
seta g_logSync 1 // Sync log writes (1 = immediate)
seta g_logstats 1 // Enable stats logging
seta logfile 0 // Continuous console logging
//seta fs_userpath "/log" // User data path (adjust for your system)
//seta fs_outputpath "/home/servers/logs/mohaa" // Log output path (adjust for your system)
Note: Modify the configuration as needed, especially sv_hostname
, rconpassword
(set via command line for security), and map rotation settings.
Running the Server
Start the server with the following command:
./mohaa_lnxded +set dedicated 1 +set sv_maxclients 24 +set net_ip 192.168.0.123 +set net_port 12203 +set rconpassword mystrongpassword +exec server.cfg
Command Parameters:
sv_maxclients
: Sets the maximum number of players.net_ip
: The local IP of the server (e.g.,192.168.0.123
).net_port
: The port for the server (default: 12203; use different ports for multiple servers).rconpassword
: Sets the RCON password for remote administration.+exec server.cfg
: Specifies the configuration file to use.
Port Forwarding: Ensure port 12203 (or your chosen port) is forwarded on your router to the server’s local IP. You should also forward 12300. Other ports may be required.
IMPORTANT: The 12300 port is ALWAYS 12300 for the first server you run NO MATTER ITS PORT.
E.G. for 3 servers:
Server Port | Query port |
---|---|
12204 | 12300 |
12206 | 12301 |
12222 | 12302 |
Running as a Service
To run the server as a service in a tmux
session, create the following systemd
service files.
Master TMUX Service
Create /etc/systemd/system/master.service
with:
[Unit]
Description=tmux master service
Wants=network-online.target
[Service]
Type=forking
User=gameservers
ExecStart=/usr/bin/tmux new-session -s master -d
ExecStop=/usr/bin/tmux kill-session -t master
[Install]
WantedBy=multi-user.target
MOHAA Server Service
Create /etc/systemd/system/mohserver.service
with:
[Unit]
Description=TMUX MOHAA Server
PartOf=master.service
After=master.service
[Service]
Type=forking
User=gameservers
ExecStart=/usr/bin/tmux new-session -s mohserver -d 'cd /home/gameservers/mohaa && ./mohaa_lnxded +set dedicated 1 +set sv_maxclients 24 +set net_ip 192.168.0.123 +set net_port 12203 +exec server.cfg'
ExecStop=/usr/bin/tmux kill-session -t mohserver
Restart=always
RestartSec=5
WorkingDirectory=/home/gameservers/mohaa
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
Enable and start the services:
sudo systemctl daemon-reload
sudo systemctl enable master.service
sudo systemctl enable mohserver.service
sudo systemctl start master.service
sudo systemctl start mohserver.service
Check the service status:
sudo systemctl status mohserver.service
Access the tmux session:
tmux attach-session -t mohserver
Note: The server will now run as a background service and automatically restart if it crashes. Use tmux
to monitor or manage the session.