How to Host a Team Fortress 2 Server on a VPS (2026)
TF2 has had a dedicated community server scene for over 15 years and it is still going strong. Running your own server means custom maps, your own rules, no matchmaking queue, and a consistent group of regulars. A $5 VPS handles it fine. TF2 is not resource-hungry by modern standards.
⚡ Host a TF2 server from $5/mo, use code LAUNCH2026 for 50% offWhat You Need
- VPS with at least 1GB RAM and 20GB disk
- Ubuntu 24.04
- A free Steam Game Server Login Token (App ID: 440)
Step 1: Install SteamCMD
sudo dpkg --add-architecture i386
sudo apt update && sudo apt install -y lib32gcc-s1 curl screen
mkdir -p ~/steamcmd && cd ~/steamcmd
curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxf -
Step 2: Download TF2 Server Files
mkdir -p ~/tf2
~/steamcmd/steamcmd.sh +force_install_dir ~/tf2 +login anonymous +app_update 232250 validate +quit
Step 3: Get Your GSLT Token
Go to steamcommunity.com/dev/managegameservers, set App ID to 440, and generate a token. Community servers require a valid token to show up in the server browser.
Step 4: Create a Start Script
cat > ~/tf2/start.sh << 'EOF'
#!/bin/bash
cd ~/tf2
screen -dmS tf2 ./srcds_run -game tf -port 27015 +ip 0.0.0.0 +map cp_badlands +maxplayers 24 +sv_lan 0 +sv_setsteamaccount YOUR_GSLT_TOKEN -nohltv -nobreakpad
EOF
chmod +x ~/tf2/start.sh
Replace YOUR_GSLT_TOKEN with your token. Change cp_badlands to any TF2 map name.
Step 5: Open Ports and Start
On a Galaxy Cloud VPS, open these ports under Firewall Rules on your VPS page in the client portal too, before you start the server. Everything except SSH stays closed until you do.
sudo ufw allow 27015/tcp
sudo ufw allow 27015/udp
~/tf2/start.sh
screen -r tf2
Installing SourceMod and MetaMod
SourceMod gives you admin tools, plugin support, and commands like sm_kick, sm_ban, and sm_map. Download MetaMod:Source and SourceMod from their official sites and extract them to ~/tf2/tf/. Add yourself as an admin in addons/sourcemod/configs/admins_simple.ini using your Steam ID.
Auto-Start on Reboot
crontab -e
@reboot sleep 20 && /home/ubuntu/tf2/start.sh
TF2 server hosting from $5/mo
Galaxy Cloud Solutions Nebula 1 plan (1 vCPU / 1GB / 20GB) handles TF2 comfortably for up to 24 players. Use code LAUNCH2026 for 50% off your first month.
Get Started