I don’t have time to support UT’ers all the time, so please take this info as “AT YOUR OWN RISK”. Also, this is a pre-alpha release and things are very underdeveloped at this time. Venture into a project like this knowing that there will be problems and headaches.
With that out of the way…
This tutorial is meant to concentrate on basic UT4 config and setup and does not go into the depths of Linux server administration. It also assumes you have a wee bit of knowledge making your way around the linux environment. In otherwords, I skip over some basic steps.
It also is *nix-centric (I’m using a Mac client). For those that have Windows *clients*, you can probably adapt appropriately. Putty is a good / free shell tool for Windows.
Download / Install CentOS 7
64 bit CentOS 7 Download mirrors are here:
You should be able to google on how to install this onto a server, but here is a couple ideas:
Local: You can download it to your local machine, burn a DVD, and install it on your server via DVD drive.
1.) You can do as above, then take it to your server and install use it via flash drive or DVD
2.) You can log in to your remote server locally and download the OS directly.
a.) Move it to a flash drive that’s plugged in and boot from that.
b.) If you are using a hypervisor (running Virtual Private Servers), do as I do:
I am installing remotely on a VPS.
I’m logged into the remote ESXi client via shell and am grabbing the distro… I’ve CD’ed to where I want to store the .iso file:
‘wget’ is like a browser for nerds.
I use VMware’s vSphere client to create the virtual server… which, like I said, is out of the scope of this tutorial.
Essentially… get the software to a place where you can boot from the .iso file.
After booting for the first time, you’ll be presented with some questions.. answer them and you will get to a menu screen for pre-config of your OS.
Here is what I did:
Set DATE and TIME
Software Selection: Basic Web Server (because I’m also going to be hosting a web page about this machine)
You can select whatever here, but some of things I selected were: Compatibility Libraries, Development Tools, Performance Tools, Hardware Monitoring Utilities..
(don’t be too worried about getting all the same packages as me.. you can always install needed packages later)
SYSTEM: Installation Destination, just chose default.
SYSTEM: Network & Hostname (got to have those)
Under ‘Configure‘ > ‘IPv4 Settings‘, I chose a manual Address, since my server will be dedicated.
Once you are happy with your pre-config, press ‘Begin Installation‘
Set both the root password and an initial user.
Note: I chose to make my non-root user an Administrator. This way you can log in safely, then type:
to make Administrative changes.
Once installed, reboot your server. You should be able to login locally OR remotely as root or youruser out of the gate:
ssh -p 222 root@youripaddress
(note: in the above, I have a ‘-p 222′ flag in my command… it’s a good idea to obfuscate your SSH port number to help with security. I’m behind a firewall as well. Security is important when running a server that is available to the world)
One great thing about openSSL (SSH) in CentOS 7 is that you also have immediate SFTP access as well. This not like the old days when I’d have to set up all this access manually / separately!
Once you’ve logged in successfully, it’s a good idea to do updates.
Open some local firewall ports for your services:
firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-port=7777/udp
firewall-cmd --permanent --add-port=6500/udp
firewall-cmd --permanent --add-port=13000/udp
*new* Server query port (ping line)
firewall-cmd --permanent --add-port=15000/udp
systemctl restart firewalld
A quick note about stand-alone firewalls / routers with aliased I.P.’s.. because I am behind one.
If your Server is being NAT’d, you’ll have a local I.P. such as 10.0.1.something.
You will want to make sure your outgoing reporting is that of your public I.P. Address.
(go to www.ipchicken.com to find your I.P.). If your firewall has just one I.P… no worries.. ignore
this paragraph. If you are in an environment where your firewall has multiple IP aliases… you will
also need to set an SNAT firewall record. Though out of the scope of this tutorial, I at least wanted
to mention that you may be reporting the wrong I.P. to UT’s Server Browser in this case.
We should also disable SELINUX (who wants a safe server anyway)
This file is self-explanatory to edit.
Once edited, reboot the server.
Install Unreal Tournament 4
I’ve downloaded the UT Linux 64bit UT4 Build much the same way I downloaded the OS, using wget… go to their forum:
To find the correct URL.
If I were to tell you, I’d likely be hunted down by Malcom and shot with glowing green goo.
You could instead save the file to your desktop and SFTP or SCP the file to your server. Your choice.
At this point I added another user so that I could run the game as it.
Once uploded, I copied the UT4 .zip file to /home/yournewuser/ and upacked the file there.
Inside the new users home directory (cd to /home/yournewuser), I fixed permissions:
chown -R yournewuser:yournewuser *
Then I made sure the binaries are executable:
chmod a+x Engine/Binaries/Linux/* UnrealTournament/Binaries/Linux/*
Note: in the 10/03/2014 pre-alpha build, there was a ‘MessageBox’ error for me when trying to start the binary. So, to fix this, first go through the steps of trying to run the software.. .. this will generate the config files of which we will need in order to fix the issue.
At this point, you’re ready to see if your server starts. Exit out of your current user and login as “yournewuser”.
cd to /home/yournewuser/Engine/Binaries/Linux/
Run this START command:
./UE4Server ../../../UnrealTournament/UnrealTournament.uproject DM-DeckTest?Game=DM?TimeLimit=10?GoalScore=534 -log
You may get an Error having to do with ‘MessageBox’. This has something to do with the EULA that is not there I believe. Here is a way to fix it:
Edit the file: UnrealTournament/Saved/Config/LinuxServer/Engine.ini
[/Script/UnrealTournament.UTGameEngine] bFirstRun = False
Run the START command again and you should be good to go for your basic server.
Now, you’ll probably not want to run your server like this forever. You will instead want to make some changes so that your server will run in the background, your ServerName will be reported to the world, and maybe you want more than one Map to be rotated! Here is something, extending from raxxy, that should get you started.
Stop your server:
Ctrl + C
Edit the Game.ini file
From inside your LinuxServer root directory, go to your config directory.
If you do a listing you’ll see all your config files have been created for you
With your game off, edit your Game.ini file
(I use vi to edit text files most often.. use an editor that you know something about, or google ‘vi editor’)
Make it look something like this:
[/Script/UnrealTournament.UTGameMode] +MapRotation=/Game/RestrictedAssets/Maps/WIP/DM-DeckTest +MapRotation=/Game/RestrictedAssets/Maps/WIP/DM-Focus +MapRotation=/Game/RestrictedAssets/Maps/WIP/DM-NickTest1 +MapRotation=/Game/RestrictedAssets/Maps/WIP/DM-Spacer +MapRotation=/Game/RestrictedAssets/Maps/WIP/DM-SidCastle +MapRotation=/Game/RestrictedAssets/Maps/WIP/DM-Deadfall +MapRotation=/Game/RestrictedAssets/Maps/WIP/DM-Circuit GoalScore=100 [/Script/UnrealTournament.UTGameState] ServerName=My Awesome UT4 Server ServerMOTD=Some Text
Make a script to start your server!
Inside the root of your home/<user>/LinuxServer, create a file called something like ‘startmyserver.sh’
Make it look something like this:
#!/bin/bash /abso/lute/pathto/LinuxServer/Engine/Binaries/Linux/UE4Server ../../../UnrealTournament/UnrealTournament.uproject DM-DeckTest?Game=DM?TimeLimit=10?GoalScore=534 -log
1.) Don’t copy/paste, use your common sense and replace the path.
2.) 2 lines only, second line is the actual start string command
Make this file executable:
chmod a+x startmyserver.sh
Finally, RUN YOUR SERVER
From within your LinuxServer root, type:
sh ./startmyserver.sh &
Note, I’m not sure you need to append the ‘ &’, but I read somewhere that this allows you to continue the server after it starts.. if that makes sense.
If you want to stop your server, you can use ‘top’ or ‘ps aux’ to find the ID, then kill manaully:
ps aux | grep UE4Server
It’s usually the first number, in the first line.
kill -9 firstnumber
Congrats on your new pre-alpha server running! Now go find it in your UT4 client, connect and play.
More to come.
Unreal Engine Docs: Networking
Enjoy!, despite technology.