Zavage Software

Unreal Tournament 4 - Server Controller Script and Guide

Last Updated: 2019-05-06

Described is a script which automates and simplifies much of the configuration, deployment, and management of an Unreal Tournament 4 server (HUB).

What it provides you is a simple project folder, with directories for maps, mutators, rulesets, and config files.
It then aims to script and automate:

Limitations

This is a work in-progress. I have yet to try running this on Windows quite yet and I know it will require a little adjustment to get it going. For now, this requires using this script through either the Windows subsystem for Linux, a bash-emulator such as cygwin, or my recommendation would be MSYS. I intend to make this Windows compatible but haven't gotten to it quite yet. Another one, it doesn't manage ruleset maplists. These must be created by-hand, but there is a different, awesome script, which pulls the resource names (e.g. /Game/Maps/DM-Rankin) and you need to use those names in the maplists for the pre-populated gametypes. That all being said, I wrote this script as I figured out how to get my own server going and it's been helpful in removing much of the tedious file logistics.

What You Need

*For best player experience, server and redirect should be distinct and have reserved internet capacity. However, you can technically run the server, the redirect, and even the game client on the same computer. The limitation is there will be major ping spikes if you download on the same connection. It's pretty easy to acquire these servers if you don't mind paying for it. An entry-level cloud server is $20/month.

Host Your Own UT4 Server!!

You need to configure the variables at the top of the script.

PROJECT_DIR
Filepath to the 'project' directory on your local machine.
REDIRECT_PROTOCOL
One of 'http' or 'https' which will be put into the redirect references inside Game.ini
REDIRECT_URL
Domain name and path to the redirect webserver.
REMOTE_GAME_HOST
Destination server and path for the instance files.
REMOTE_REDIRECT_HOST
Destination server and path for the redirect webserver files.

After that is configured correctly, here are the commands:

delete-instance
Delete the instance for rebuilding (this is safe).
download-linux-server
Downloading the linux server release from Epic.
generate-instance
Install the maps, mutators, and config into the server build, on your LOCAL machine. This step also computes all the md5sums required for the RedirectLines.
start-server
Starts the server, restarting if it ever crashes.
stop-server
Stops and kills all instances of the server.
upload-redirects
Upload all PAKs to the redirect web server.
upload-server
Upload the generated instance to the instance server for multiplayer hosting.