This project provides a Podman container based on Rocky Linux for running Unreal Tournament 2004 server. The container automatically downloads server files on first run.
Note: This project is based on PhasecoreX's docker-ut2004-server, adapted for Rocky Linux with Wine support. For a native Linux server container, check out the original project.
./build.shOr manually:
podman build -t rocky-arena:latest .The simplest way to run the server:
./run-server.shThis will:
- Create a data directory (
./ut2004-data) for server files, configs, and addons - Automatically download server files on first run (UT2004 Dedicated Server v3369.2 with bonus packs)
- Start the server with default settings
The server files are downloaded from the same source as PhasecoreX's docker-ut2004-server and include:
- Base server with latest patch (3369.2)
- Epic ECE Bonus Pack
- Bonus Megapack
You can customize the server by setting environment variables before running:
export MAP_NAME="DM-Rankin"
export GAME_TYPE="XGame.xDeathMatch"
export MAX_PLAYERS="16"
export MUTATORS="UT2Vote61.UT2VoteX"
export CD_KEY="YOUR-CD-KEY-HERE"
export UT2004_SERVER_URL="https://example.com/ut2004-server.tar.gz"
./run-server.shAvailable variables:
MAP_NAME- Initial map (default:DM-Rankin)GAME_TYPE- Game type (default:XGame.xDeathMatch)MAX_PLAYERS- Maximum players (default:16)MUTATORS- Comma-separated list of mutators (no spaces)CD_KEY- Server CD key (required for first run)UT2004_SERVER_URL- Override default server download URL (not needed - automatic download is enabled)AUTO_START- Set tofalseto prevent auto-starting serverSKIP_INSTALL- Set totrueto skip server download check
The container uses /data (mounted from ./ut2004-data by default) with this structure:
/data/
├── server/ # Server files (downloaded or manually placed)
│ ├── System/
│ ├── Maps/
│ └── ...
├── config/ # Configuration files (.ini files and cdkey)
│ ├── UT2004.ini
│ └── cdkey
└── addons/ # Custom maps and mutators
├── Maps/
└── System/
The server files are automatically downloaded on first run. You have three options:
-
Automatic Download (default - no action needed):
./run-server.sh
The container will automatically download UT2004 Dedicated Server v3369.2 with all bonus packs.
-
Manual Placement: Place your UT2004 server files in
./ut2004-data/server/to skip the download -
Skip Check: Set
SKIP_INSTALL=trueif you'll provide files later or want to skip the download
The server needs a CD key. You can provide it in two ways:
-
Environment Variable:
export CD_KEY="YOUR-CD-KEY-HERE" ./run-server.sh
-
File: Place a
cdkeyfile in./ut2004-data/config/
Once created, the CD key is saved and you don't need to provide it again.
You can override the entire server command:
podman run -d --name rocky-arena \
-v ./ut2004-data:/data:rw \
-p 7777:7777/udp \
-e SERVER_START_COMMAND="System/ucc.exe server DM-Antalus?game=XGame.xCTFGame" \
rocky-arena:latestTo get a shell in the container:
podman run -it --rm \
-v ./ut2004-data:/data:rw \
rocky-arena:latest \
/bin/bashpodman logs -f rocky-arenapodman stop rocky-arena- 7777/udp: Game port (required)
- 7778/udp: Query port (game port + 1)
- 8080/tcp: Web admin port (if enabled)
Place custom maps and mutators in ./ut2004-data/addons/ with the same directory structure as the server:
addons/
├── Maps/
│ └── DM-MyCustomMap.ut2
└── System/
└── MyMutator.u
The entrypoint script automatically links addons to the server.
- The container runs as a non-root user (uid 1000)
- Server files are downloaded on first run (if URL provided) or can be manually placed
- Configuration files are stored separately from server files for easy management
- The container uses Wine to run Windows server executables
- DirectX 9 and Visual C++ runtimes are pre-installed
If you see "Server files not found":
- Set
UT2004_SERVER_URLto download automatically, or - Manually place server files in
./ut2004-data/server/, or - Set
SKIP_INSTALL=trueto skip the check
Make sure you provide a valid CD key via CD_KEY environment variable or ./ut2004-data/config/cdkey file.
If port 7777 is already in use, change it:
podman run -d --name rocky-arena \
-v ./ut2004-data:/data:rw \
-p 7778:7777/udp \
-e SERVER_START_EXTRAS="?Port=7778" \
rocky-arena:latestThis project is inspired by and borrows heavily from PhasecoreX's docker-ut2004-server.
- Server Download Mechanism: The automatic server download functionality, including the download URL and SHA256 verification, is based on PhasecoreX's install.sh script
- Data Directory Structure: The
/datafolder layout (server, config, addons) follows the same pattern - Version Tracking: The
.versionsdirectory approach for tracking installed server files - General Architecture: The concept of downloading server files on first run rather than including them in the image
- Base OS: This project uses Rocky Linux instead of Debian
- Runtime: Uses Wine to run Windows server executables (PhasecoreX uses native Linux binaries)
- Container Runtime: Optimized for Podman (though Docker works too)
For a native Linux UT2004 server container, check out the original PhasecoreX/docker-ut2004-server project, which runs the Linux-native server binaries directly.