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.
| Variable | Default | Description |
|---|---|---|
| BF_USER | bf1942_user | The system username created to run the server. |
| BF_HOME | /home/bf1942_user | The home directory for the service user. |
| BF_ROOT | ~/bf1942 | The actual game installation directory. |
| SERVER_TAR_URL | .../linux-bf1942-server.tar | URL to the game server tarball. |
๐ Usage
Prerequisite
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
| Distro | Status | Notes |
|---|---|---|
| Ubuntu 24.04.3 LTS | โ Tested | Primary tested platform. |
| Ubuntu 22.04 LTS | ๐ TODO | Likely works; may need minor package name adjustments. |
| Debian 12 (Bookworm) | ๐ TODO | Uses the same multiarch structure as Ubuntu. |
| Fedora | ๐ TODO | Requires converting apt commands to dnf. |
| CentOS Stream / RHEL | ๐ TODO | Requires converting apt commands to yum/dnf. |
๐ License
Scripts released under the MIT License. All Battlefield 1942 game assets remain ยฉ Electronic Arts Inc.