PhasecoreX / docker-ut2004-server

Docker image for a UT2004 server, running as a non-root user
GNU General Public License v3.0
31 stars 7 forks source link

Unreal Tournament 2004 Server

UT2004 Server, packaged nicely in a container

Docker Pulls Build Status BuyMeACoffee PayPal

Some Notes

This image contains no server data. Instead, it downloads all the data it needs:

It downloads them on first launch, keeping the image size down and allowing for it to be updated without redownloading all of the unchanging UT2004 server files. If there is an update to the contents of the server, there is an updater system in place. Additionally, this updater will not overwrite any .ini files, as they are stored elsewhere.

Looking for a UT99 Server? Check out my container for that!

How To Run

This is the base command:

docker run -v /path/to/data:/data -p 7777:7777/udp -e CD_KEY=YOUR-CDKEY-HERE -e PUID=1000 phasecorex/ut2004-server

Folder Layout

The /data folder will have three main folders:

CD Key

This server needs a cdkey file to work correctly, the contents of which being a UT2004 server key. You can either specify the environment variable CD_KEY=YOUR-CDKEY-HERE, or you can place an already created cdkey file into the /data/config folder. Once the cdkey file has been created (either method), you do not need to specify the environment variable anymore.

Addons

Simply extract your custom maps and mutators to the /data/addons folder (it has the same layout as the server folder structure) and then restart your server. All of your addons will then be present in the server. This keeps your addons and the core server maps nice and separate.

Ports

Here are the ports you can expose on the Docker image:

The right number is the port (and protocol) defined in your UT2004.ini file, and the left is what it is exposed as outside of Docker. You will want to have the /udp part included on those ports, otherwise no clients will be able to connect to your server! At minimum you will need the game port defined, and if you want other clients to query information from your server, you'd want the query ports defined.

Other Environment Variables

A Note On Downloading the Server

All of the official server downloads hosted in various locations all had issues, such as incorrect filename casing (leading to duplicated non-patched files on Linux), the UWeb and CSS problems, or some archives extracting incorrectly. I have taken the time to compile the server, both bonus packs, and the latest patches (which patch the bonus packs, hence why they were included) and made a nice compressed archive. However, I can't host a ~750MB file myself, due to residential bandwith caps and upload speeds. If for some reason my chosen host does not work (link is too popular), let me know and I will update the installer.

A Note On Unraid (or Other FUSE Filesystems)

UT2004 Server does NOT work with FUSE filesystems. This is the filesystem that Unraid uses for it's /mnt/user/ folder in order to merge all of your disks into one large folder. Not sure why it doesn't work, I just know it doesn't. For best results, just point the /data volume somewhere in /mnt/cache/appdata or /mnt/diskX/appdata, since those are pointed directly at a disk instead of a FUSE filesystem.