Deployment Tool

BF1942 Linux
Dedicated Server

Automated setup for running BF1942 servers on modern 64-bit Linux. Handles dependency resolution, user creation, systemd services, and firewall config in a single interactive script.

6 Distros SupportedMulti-Instance ReadyBFSMD + StandaloneMIT Licensed
// Capabilities
  • Single-Script Setup

    One unified script handles everything — standalone or BFSMD modes.

  • Multi-Instance Support

    Run unlimited servers on one machine with automatic port allocation.

  • Smart Configuration

    Interactive IP detection, port conflict prevention, resource validation.

  • Secure Runtime

    Runs entirely under a dedicated service account (bf1942_user).

  • Modern Compatibility

    Handles legacy 32-bit dependency resolution across all supported distros.

  • Management Tools

    Comprehensive CLI for monitoring and managing all instances.

  • Performance Optimized

    CPU affinity, memory limits, and I/O tuning automatically configured.

  • Systemd Integration

    Standard systemctl commands with auto-start on boot.

// Deployment Sequence

Prerequisite: Commands must be run by a user with sudo privileges.

01

Download Scripts

bash · download
# Download main setup script (example: Ubuntu 24.04)
wget https://raw.githubusercontent.com/hootmeow/bf1942-linux/main/installers/ubuntu/ubu_24.0.3_bfsmd_setup.sh

# Download management tool (same file for all distros)
wget https://raw.githubusercontent.com/hootmeow/bf1942-linux/main/bf1942_manager.sh

# Make executable
chmod +x ubu_24.0.3_bfsmd_setup.sh bf1942_manager.sh

Replace the script name with your distro's version from the Supported Distributions table below. bf1942_manager.sh is shared across all distros.

02

Run the Installer

BFSMD Recommended
bash · install
sudo ./ubu_24.0.3_bfsmd_setup.sh

Interactive Prompts

  • Installation modeStandalone (no remote management) or BFSMD (full GUI via BFRM)
  • Instance name(BFSMD only) — unique name like server1, conquest, tdm
  • IP addressAuto-detected; choose local, public, or enter custom
  • BFSMD version(BFSMD only) — v2.0 recommended, or v2.01 for admin/PunkBuster fixes
  • Firewall rulesOptional, interactive security level selection
03

Add More Instances

Optional

Pass an instance name as an argument. Each instance automatically gets unique ports, its own systemd service, and dedicated CPU cores when available.

bash · multi-instance
sudo ./ubu_24.0.3_bfsmd_setup.sh server2
sudo ./ubu_24.0.3_bfsmd_setup.sh conquest
sudo ./ubu_24.0.3_bfsmd_setup.sh tdm
// Port Allocation

How Port Assignment Works

When you run the installer with an instance name (e.g. server1), the script calculates a deterministic offset from that name using a CRC-32 checksum, then adds it to three base ports. The same name always produces the same ports — on any machine.

bash · port formula
# The script computes this internally:
offset = cksum("server1") % 100      # → a value 0–99

game_port = 14567 + offset            # UDP  — players connect here
query_port = 23000 + offset           # UDP  — server browser / ping
mgmt_port  = 14667 + offset           # TCP  — BFRM management

Game Port

14567–14666

UDP · offset 0–99

Query Port

23000–23099

UDP · offset 0–99

Mgmt Port

14667–14766

TCP · offset 0–99

Conflict detection: If two instance names hash to the same offset, the installer detects the port collision and tells you to pick a different name. Up to 100 unique port sets are possible from the base configuration.

Example Assignments

Instance NameGame (UDP)Mgmt (TCP)
server11460014700
server21460514705
conquest1462014720
tdm1458914689

$ ./bf1942_manager.sh ports — show actual assigned ports for all instances

// Management Commands

bf1942_manager.sh lives at the repo root and manages all instances regardless of which distro installed them.

bf1942_manager.sh · reference
./bf1942_manager.sh list                  # All instances and their status
./bf1942_manager.sh ports                 # Port assignments for all instances
./bf1942_manager.sh status server1        # Detailed status of one instance
./bf1942_manager.sh config server1        # Show config file paths
./bf1942_manager.sh health                # Health check all instances
./bf1942_manager.sh security              # Security audit (passwords, ownership, firewall)
./bf1942_manager.sh logs server1          # Live log tail (Ctrl+C to exit)

sudo ./bf1942_manager.sh start server1
sudo ./bf1942_manager.sh stop server1
sudo ./bf1942_manager.sh restart server1
sudo ./bf1942_manager.sh start-all
sudo ./bf1942_manager.sh stop-all
sudo ./bf1942_manager.sh remove server2   # Removes instance (asks for confirmation)
systemd · direct commands
# BFSMD instance
sudo systemctl status bfsmd-server1.service
sudo systemctl restart bfsmd-server1.service
journalctl -u bfsmd-server1.service -f

# Standalone server
sudo systemctl status bf1942.service
// Connect to BFRM

Default Credentials

Change Immediately

Username

bf1942

Password

battlefield

Change the default password immediately via the Admin tab in BFRM after first login.

Connection Steps

  1. 1Open BFRM client on your Windows machine
  2. 2Connect to your-server-ip:management-port
  3. 3Login with default credentials above
  4. 4Change password immediately Admin tab → Change Password

01 · Login

Connect with default credentials, then change them immediately.

BFSMD Login Screen

02 · Set Server IP

Navigate to IP settings and set your server's IP address explicitly.

Set Server IP Address

03 · Secure Remote Console

Change default remote console password and create secure admin accounts.

Remote Console Security

04 · Set Default Map

Add at least one map to the rotation before starting the server.

Set Default Map

05 · Update Admin Passwords

Create secure admin accounts and disable the default bf1942 account.

Set Admin Users
// Firewall Configuration

Firewall rules are configured during installation — UFW on Debian/Ubuntu, firewalld on Fedora/RHEL/CentOS. For the management port, choose a security posture:

Open to All

LOW
  • Anyone can attempt connection
  • Still requires password
  • Good for testing or behind another firewall

Restrict to IP

RECOMMENDED
  • Only your specified IP can connect
  • Firewall + password protection
  • Best for static admin IP

SSH Tunnel

MAX SECURITY
  • No direct internet exposure
  • All traffic encrypted via SSH
  • Port not opened in firewall at all
ssh · tunnel example
# On your local machine:
ssh -L 14700:localhost:14700 user@your-server-ip

# Then point BFRM at localhost:14700
// Network Scenarios

Home Server (Behind Router)

  • During Install:Choose Local IP (192.168.x.x)
  • Router Config:Forward Game + Query ports (UDP)
  • Players Connect To:Your public IP

Cloud / VPS (AWS, DigitalOcean…)

  • During Install:Choose Local IP (10.x.x.x or private IP)
  • Cloud Firewall:Allow Game + Query ports from 0.0.0.0/0
  • Players Connect To:Instance's public IP
// Known Issues · Resolution Protocols

"Internal error!" in Logs

This is normal. BFSMD v2.0/v2.01 produces these continuously on modern kernels when reading /proc. The server functions perfectly regardless.

filter logs
journalctl -u bfsmd-server1.service -f | grep -v "Internal error"

Can't Connect to Server

diagnostics
# 1. Check service is running
systemctl is-active bfsmd-server1.service

# 2. Check firewall (Debian/Ubuntu)
sudo ufw status
# Check firewall (Fedora/RHEL/CentOS)
sudo firewall-cmd --list-ports

# 3. Verify ports are listening
sudo ss -tulnp | grep 14567

# 4. View live logs
./bf1942_manager.sh logs server1

Port Conflict During Installation

Try a different instance name — ports are derived from the name hash, so a new name generates a different port set. Check existing assignments with ./bf1942_manager.sh ports.

Can't Login to BFRM

  1. 01Confirm credentials: bf1942 / battlefield
  2. 02Confirm management port: ./bf1942_manager.sh ports
  3. 03Confirm firewall allows the connection from your IP
  4. 04Confirm service is running: ./bf1942_manager.sh status server1
// Configuration Files

Standalone Server

file tree
/home/bf1942_user/bf1942/mods/bf1942/settings/
├── ServerSettings.con  # Game settings
└── MapList.con         # Map rotation

BFSMD Instance

file tree
/home/bf1942_user/instances/<name>/mods/bf1942/settings/
├── servermanager.con   # BFSMD settings
├── useraccess.con      # Admin accounts
├── ServerSettings.con  # Game settings
└── MapList.con         # Map rotation
// Advanced Operations

Instance Limits · Recommended Ceiling

The script warns if exceeded but won't block you.

CPU CoresRecommended Max Instances
24
48
816

Backup & Restore

bash
# Backup settings
sudo tar -czf server1-backup-$(date +%F).tar.gz \
  /home/bf1942_user/instances/server1/mods/bf1942/settings/

# Restore
sudo tar -xzf server1-backup-*.tar.gz -C /
sudo systemctl restart bfsmd-server1.service

Clone Instance

bash
sudo cp -r \
  /home/bf1942_user/instances/server1/mods/bf1942/settings/* \
  /home/bf1942_user/instances/server2/mods/bf1942/settings/

# Update port in ServerSettings.con, then:
sudo systemctl restart bfsmd-server2.service
// BFRM Downloads · Windows Client
// Supported Distributions

All distros fully tested and supported

6 / 6 Active
DistributionScript
Ubuntu 24.04 LTSinstallers/ubuntu/ubu_24.0.3_bfsmd_setup.sh
Ubuntu 22.04 LTSinstallers/ubuntu/ubu_22.04_bfsmd_setup.sh
Debian 12 (Bookworm) / 13 (Trixie)installers/debian/deb_12_bfsmd_setup.sh
Fedora 40 / 41installers/fedora/fed_40_bfsmd_setup.sh
RHEL 9installers/rhel/rhel_9_bfsmd_setup.sh
CentOS Stream 9installers/centos/centos_stream9_bfsmd_setup.sh

See the GitHub repo for the latest scripts and update history.

Applying Patches

The patches folder contains Python scripts to fix known server bugs. See each patch file for details and instructions.

License

Scripts released under the MIT License. All Battlefield 1942 game assets remain © Electronic Arts Inc.