Setting Up a Team Fortress 2 Server

Setting Up a Team Fortress 2 Dedicated Server

Step 1 — Install SteamCMD

add-apt-repository multiverse -y
dpkg --add-architecture i386
apt update
apt install steamcmd lib32gcc-s1 -y

Step 2 — Download TF2 Server Files

adduser steam && su - steam
steamcmd +force_install_dir ~/tf2server +login anonymous +app_update 232250 validate +quit

Step 3 — Create server.cfg

mkdir -p ~/tf2server/tf/cfg
nano ~/tf2server/tf/cfg/server.cfg
hostname "My TF2 Server"
rcon_password "yourrconpassword"
sv_password ""
sv_region 1
mp_timelimit 30
mp_maxrounds 5

Step 4 — Create a Map Cycle

nano ~/tf2server/tf/cfg/mapcycle.txt
cp_badlands
cp_granary
pl_upward
ctf_2fort
koth_viaduct

Step 5 — Open Firewall Port

ufw allow 27015/tcp
ufw allow 27015/udp
ufw allow 27020/udp

Step 6 — Create a Startup Script

nano ~/start-tf2.sh
#!/bin/bash
cd ~/tf2server
./srcds_run -game tf -port 27015 +map cp_badlands +maxplayers 24
chmod +x ~/start-tf2.sh
screen -S tf2 ~/start-tf2.sh

Install SourceMod for Plugins

cd ~/tf2server/tf
wget https://sm.alliedmods.net/smdrop/1.11/sourcemod-1.11.0-git6934-linux.tar.gz
wget https://www.sourcemm.net/latest.php?os=linux&version=1.11 -O metamod.tar.gz
tar -xzf sourcemod-*.tar.gz
tar -xzf metamod.tar.gz
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Setting Up a Minecraft Java Server

Setting Up a Minecraft Java Server Deploy a Minecraft Java Edition server on your dedicated...

Setting Up a CS2 Dedicated Server

Setting Up a Counter-Strike 2 Dedicated Server Deploy a CS2 server using SteamCMD on your...

Managing Game Servers with LinuxGSM

Managing Game Servers with LinuxGSM LinuxGSM (Linux Game Server Manager) simplifies installation...

Setting Up a Rust Dedicated Server

Setting Up a Rust Dedicated Server Step 1 — Install SteamCMD add-apt-repository multiverse -y...

Setting Up a Valheim Dedicated Server

Setting Up a Valheim Dedicated Server Step 1 — Install SteamCMD add-apt-repository multiverse...