How to Set Up a Team Fortress 2 Dedicated Server
Run your own TF2 dedicated server on a Linux VPS with SteamCMD, pick your maps and game mode, add a GSLT, and keep it online with systemd.

Team Fortress 2 still has one of the most loyal communities in gaming, and a dedicated server lets you run the maps and mods you actually want — 24/7 2Fort, custom MvM, or a jump-training server. This guide sets up a TF2 dedicated server on a Linux VPS and keeps it running.
Requirements
- A VPS: Ubuntu 22.04 or Debian 12, 2 vCPU and 2–4 GB RAM is plenty for a 24-slot server. TF2 is light compared to modern shooters.
- SteamCMD: the TF2 dedicated server is App ID 232250 and installs anonymously.
- A GSLT: create a Game Server Login Token for App ID 440 at steamcommunity.com/dev/managegameservers so your server appears in the public browser.
- Ports: UDP 27015 (game), UDP 27005 (client), UDP 27020 (SourceTV).
Step 1: User and dependencies
sudo adduser --disabled-password --gecos "" tf2
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install -y lib32gcc-s1 lib32stdc++6 steamcmd
Step 2: Install TF2 with SteamCMD
sudo su - tf2
steamcmd +force_install_dir /home/tf2/server +login anonymous +app_update 232250 validate +quit
The install is a few gigabytes. When it's done you'll have srcds_run in /home/tf2/server.

Step 3: Open the firewall
sudo ufw allow 27015/udp
sudo ufw allow 27005/udp
sudo ufw allow 27020/udp
sudo ufw reload
Open the same ports in your provider's network firewall too.
Step 4: Start the server
cd /home/tf2/server
./srcds_run -game tf -console \
+sv_pure 1 +maxplayers 24 \
+map cp_dustbowl \
+sv_setsteamaccount YOUR_GSLT_TOKEN \
-port 27015
Change +map to your starting map. To run a mode like Mann vs. Machine or Payload, set the corresponding map (e.g. mvm_coaltown, pl_upward) and a matching maplist.
Step 5: Configuration
Edit /home/tf2/server/tf/cfg/server.cfg:
hostname "My Nxeon TF2 Server"
sv_password ""
rcon_password "change-this-strong-password"
sv_lan 0
sv_region 255
mp_timelimit 30
mp_maxrounds 5
Set up a rotation by editing tf/cfg/mapcycle.txt and a maplist.txt. Set a strong rcon_password and never expose it.
Step 6: Keep it online with systemd
Create /etc/systemd/system/tf2.service:
[Unit]
Description=Team Fortress 2 Dedicated Server
After=network.target
[Service]
Type=simple
User=tf2
WorkingDirectory=/home/tf2/server
ExecStart=/home/tf2/server/srcds_run -game tf -console +sv_pure 1 +maxplayers 24 +map cp_dustbowl +sv_setsteamaccount YOUR_GSLT_TOKEN -port 27015
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable --now tf2
sudo journalctl -u tf2 -f
Adding SourceMod and MetaMod
Most community servers run SourceMod (admin tools, plugins) on top of MetaMod:Source. Download both, extract into tf/addons, and restart. SourceMod gives you sm_admin, map voting, and thousands of plugins. It uses the same Source-engine pattern as our CS2 dedicated server guide and Garry's Mod server guide.
Hardware notes
TF2 is CPU-light by modern standards, so a modest 2–4 GB plan runs a full server comfortably; the main cost is bandwidth with a busy 24/7 server. To size correctly, read Game Server Specs Explained: CPU, RAM and Bandwidth. Running several Source servers on one box? See how to host multiple game servers on one VPS.
Building a map rotation
A community server lives on its rotation. Edit tf/cfg/mapcycle.txt with one map per line:
cp_dustbowl
pl_upward
koth_lakeside_final
ctf_2fort
cp_process_final
Set mp_timelimit 30 in server.cfg so maps rotate on a timer, and with SourceMod installed players can vote the next map.
Reserved slots, admins, and custom content
- Use SourceMod's reserved-slots plugin to keep a slot free for admins on a full server.
- Add admins by Steam ID in
tf/addons/sourcemod/configs/admins_simple.iniwith flags likezfor root. - Serve custom models, sounds, and maps via FastDL so clients download them quickly — set
sv_downloadurlto a small web server on the same box.
Troubleshooting
- Server not in the browser: confirm the GSLT (App ID 440),
sv_lan 0, andsv_region. - "Missing map" on join: the client doesn't have your custom map — provide it via FastDL or the Workshop.
- Sudden lag spikes: check for a runaway plugin with
sm plugins listand watch CPU withtop.
When a client can't connect after a Valve update, run +app_update 232250 validate and restart.
FAQ
What App ID is the TF2 dedicated server?
App ID 232250. Install it anonymously with SteamCMD: +app_update 232250 validate.
Do I need a GSLT for TF2?
For a public server, yes — create the token for App ID 440. Without it the server won't list in the public browser.
How do I add admins?
Install SourceMod, then add your Steam ID to tf/addons/sourcemod/configs/admins_simple.ini with the appropriate admin flags.
Why is sv_pure causing missing content?
sv_pure 1 enforces pure client files. If custom maps need custom assets, host them via FastDL or lower sv_pure for a modded server.
Launch your TF2 server on an NVMe game server VPS from Nxeon — full root access, low-latency network, and free migration help if you're moving from another host.