Update Jul 2014 – use the shiny new SteamCMD tool. Also, I started using DigitalOcean instead of EC2 (marginally cheaper, incredibly easier to setup)
Create a Instance – spot works
Install wget, tar, ncompress – depends on your distro, fedora 17 by default didn’t come with this (which, btw, is WTF?!) Also, screen to run disconnected from the server, and vim for text editing
wget http://media.steampowered.com/client/steamcmd_linux.tar.gz && tar -xvzf steamcmd_linux.tar.gz && ./steamcmd.sh
download the actual HLDS server
mkdir tf2 && ./steamcmd.sh +force_install_dir tf2 +login anonymous +app_update 232250 +quit
setup the config files
touch cfg/server.cfg && vim cfg/server.cfg – specify what you want, I pulled mine from forums.srcds.com/viewpost/67692#pid67692
./srcds_run -game tf -autoupdate -maxplayers 32 -console +map mvm_coaltown
Pull map names from TF2 wiki, eg wiki.teamfortress.com/wiki/Mann_vs._Machine_%28game_mode%29 has the map filenames listed under “Maps”.
If you’ve got iptables running *in addition to* the aws security groups, disable iptables, or allow exceptions for the HLDS ports (UDP 27000-27015).
A t1.micro instance *isn’t* suitable for a tf2 server. The way Amazon has it set up is that Micro instances will have their CPU stolen by other instances if necessary. While this rarely happens to any great effect, when it does, there’s a large ping spike.
List of console commands, unknown how many map to the server: developer.valvesoftware.com/wiki/List_of_TF2_console_commands_and_variables
Official Valve post on setting up HLDS: support.steampowered.com/kb_article.php?ref=6758-TCMF-2234 (Wasn’t too helpful, also Windows specific.)
On the client, you have to set rcon_password to the server password, *then* issue rcon commands. Doing “rcon password” in the client won’t work.
Some other stuff relating to HLDS here: wiki.teamfortress.com/wiki/Linux_dedicated_server
18th Aug update:
For some reason, auto-update failed, had to manually update.
3:07 Updating 'Team Fortress 2 Content' from version 350 to version 352
A symptom was a bunch of messages showing up in the log:
MasterRequestRestart Your server will be restarted on map change. Your server will be restarted on map change.
Also, a bunch of config changes coming too.
Aug 19th: Since I’m
jumping between EC2 regions spinning up servers as and when I want to play on them, a ‘one’-line command to get the TF2 server up & running is now here
Also, 3 files are edited in the orangebox/tf folder: cfg/server.cfg, mapcycle.txt and motd.txt
A pretty extensive sample server.cfg was posted here: forums.steampowered.com/forums/showpost.php?p=32341843&postcount=1
If the servers were going to be around for a while, register them with Valve as per support.steampowered.com/kb_article.php?ref=2825-AFGJ-3513 for Quickplay support
More plugins: forums.alliedmods.net/showthread.php?t=84801, www.sourcemod.net/newstats.php?mod_id=558&addon_id=0, forums.alliedmods.net/showthread.php?p=592536 and forums.alliedmods.net/showthread.php?p=532620