Battlefield 1942 Linux Dedicated Server

Linux (Non-Privileged Runtime)

View on GitHub

Automated Setup Script

This solution installs the legacy 32-bit Battlefield 1942 dedicated server using a dedicated, non-privileged account, following best security practices.

Overview

  • Single-Script Setup

    One script handles OS dependencies, user creation, and game installation.

  • Secure Runtime

    Runs entirely under a dedicated service account (bf1942_user).

  • Modern Compatibility

    Automatically installs required i386 libraries and legacy libncurses5/libstdc++5.

  • Systemd Integration

    Managed via standard systemctl commands.

โš™๏ธ Configuration

The setup script contains several configuration variables at the top that you can customize before running.

VariableDefaultDescription
BF_USERbf1942_userThe system username created to run the server.
BF_HOME/home/bf1942_userThe home directory for the service user.
BF_ROOT~/bf1942The actual game installation directory.
SERVER_TAR_URL.../linux-bf1942-server.tarURL to the game server tarball.

๐Ÿš€ Usage

1๏ธโƒฃ Download and Run

This install script is for Ubuntu 24.0.3 servers. For other distros, please check the repository and adjust the file links accordingly.

wget https://raw.githubusercontent.com/hootmeow/bf1942-linux/main/ubuntu/24.0.3_setup.sh
chmod +x 24.0.3_setup.sh
sudo ./24.0.3_setup.sh

๐Ÿงช Supported Distributions

DistroStatusNotes
Ubuntu 24.04.3 LTSโœ… TestedPrimary tested platform.
Ubuntu 22.04 LTS๐Ÿ“ TODOLikely works; may need minor package name adjustments.
Debian 12 (Bookworm)๐Ÿ“ TODOUses the same multiarch structure as Ubuntu.
Fedora๐Ÿ“ TODORequires converting apt commands to dnf.
CentOS Stream / RHEL๐Ÿ“ TODORequires converting apt commands to yum/dnf.

๐Ÿ“œ License

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