AUTOMATED TF2SERVER INSTALLATION SCRIPT

I have made a script with will automatically deploy a tf2server utilizing LGSM’s management framework.  You can find it here.

The script is designed to be used on a Debian or Ubuntu server as with sudo privileges.

Directions:

  • ssh to your server
ssh [email protected]
  • Install git on your server.
sudo apt install git -y
  • Git clone the repo
git clone https://github.com/BurningSmile/LinuxScripts.git
mv ./LinuxScripts/Auto-tf2serverinstall.sh .
rm -rf LinuxScripts
chmod +x Auto-tf2serverinstall.sh
  • Edit the script under the variables section to use your steamid, name, and updated versions of MetaMod and SourceMod. Then run the script.
sudo ./Auto-tf2serverinstall.sh

Server cfg generation

    To generate a configuration for your server I recommend using cfg.tf’s server config generator Change the following to match your desired settings.

  • Hostname
  • Server pass (If wanted).
  • Rcon (I personally use a randomly generated one and use sm_rcon to give rcon access via the sourcemod admin file, making it easy to revoke access without having to hand out new passwords).
  • Competitive league configs. (Choose these if you want them).
  • Addons (Do NOT select MetaMod or SourceMod here. We already installed them).
  • Server purity ( I like to restrict off of a whitelist approach).
  • Random crits (Please just turn these off).
  • Random bullet spread. (The way this is shown on site is backward as it’s actually disabled bullet spread, not enable. This option if enabled, disables random bullet spread, if disabled it enables it. I recommend setting this to enabled to disable it. All the setting does when enabled is mess with bullet spreads and create inconsistency in hitscan weapons).
  • Maps section.
    • Here check the allow fastdl box, Then replace the url line with:
http://IP-GOES-HERE/fastdl/tf2/
  • Network section. (Don’t touch these unless you know what you are doing or have a good reason for doing so).
  • Custom commands. Enter what is below, changing ip-goes-here for your servers ip-address.
// Server downloads and files
net_maxfilesize "64" 
sv_allowupload "1" 
sv_consistency "1"

Click the Generate config button.

Once the file downloads, unzip it to a temporary directory, then rename server.cfg to tf2server.cfg.

Upload the config files to serverfiles/tf/cfg/ and overwrite any files as prompted.

Restart your tf2server for the changes to take effect,

su - tf2server
./tf2server restart

Your tf2server stack is now installed, Enjoy!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.