No description
Find a file
2026-02-08 22:06:08 +01:00
src Initial commit 2026-02-08 22:06:08 +01:00
.gitignore Initial commit 2026-02-08 22:06:08 +01:00
Cargo.lock Initial commit 2026-02-08 22:06:08 +01:00
Cargo.toml Initial commit 2026-02-08 22:06:08 +01:00
README.md Initial commit 2026-02-08 22:06:08 +01:00

UT2004 master server

A Rust implementation of the Unreal Tournament 2004 Master Server protocol (originally operated by Epic). It accepts registrations from game servers and answers client queries, making it possible to run a fully self-hosted master server for LANs, private networks, community infrastructure, or long-term preservation.

Features:

  • Server registration + heartbeat/TTL handling
  • Client query responses compatible with UT2004/UT2003/UT2XMP version checks
  • Optional relay mode to forward requests to an upstream master server (UT2004_RELAY_MASTER-Environment variable)

Run

cargo run --release -- 28902

If no port argument is provided, 28902 is used.

Environment variables (same names as the Java version)

  • UT2004_LATEST_CLIENT_VERSION (default 3369)
  • UT2003_LATEST_CLIENT_VERSION (default 2225)
  • UT2XMP_LATEST_CLIENT_VERSION (default 2226)
  • UT2004_SERVER_TTL_SECONDS (default 600)
  • UT2004_RELAY_MASTER (optional, format host:port)
  • UT2004_RELAY_CONNECT_TIMEOUT_MS (optional, default 2000)
  • UT2004_RELAY_READ_TIMEOUT_MS (optional, default 3000)

Logging

  • Uses tracing with tracing-subscriber.
  • Configure log levels via RUST_LOG (e.g., RUST_LOG=info, RUST_LOG=debug,ut2004_master_tokio=trace).
  • Defaults to info level if RUST_LOG is not set.