NEW 📢 Limited launch offer: up to 70% off your first month on every game!See plans

How to host a Team Fortress 2 server (2026)

Team Fortress 2Updated Nov 5, 20269 min read

Short answer. You can host a Team Fortress 2 server yourself for free: install Steam app 232250 (Team Fortress 2 Dedicated Server) with SteamCMD, start srcds_run with -game tf and a -port of your choice, and open that port to the internet. Or rent a Team Fortress 2 server and skip the install and the networking.

Players join from the in-game server browser or by typing the server address, as in How to join your Team Fortress 2 server.

Checked on 5 November 2026 against the newest Team Fortress 2 update announced on Steam, released on 30 October 2026.

This guide uses two sources: Valve's own Steam pages and update notes, and what we run on every Team Fortress 2 server we host. Where our setup adds something of its own, it says so. To skip to the rental route, go to Option 2.

What you need

  • The server software: "Team Fortress 2 Dedicated Server", Steam app 232250. It downloads with an anonymous Steam login, so the machine does not need a copy of the game.
  • A machine that stays on: a spare PC, a home server or a cloud virtual machine. This guide uses 64-bit Linux, which is what we run. We have not tested a Windows server.
  • RAM and CPU: Valve does not publish server requirements, so treat any figure you read elsewhere as an estimate.
  • A player cap: set with -maxplayers.
  • Network: the port you pass with -port must be reachable from the internet, on your firewall and your router.
  • Optional, a Game Server Login Token (GSLT): created at steamcommunity.com/dev/managegameservers with a Steam account that owns Team Fortress 2. Valve's page also asks for an account that is not limited and has a registered phone, and warns that a token whose server never logs in will expire.

Option 1: host it yourself

These steps are for Debian or Ubuntu. The install command and the start options are the ones our servers use.

Install the server

  1. Install the libraries SteamCMD needs.
    sudo dpkg --add-architecture i386
    sudo apt update
    sudo apt install wget tar lib32gcc-s1 libc6:i386 libstdc++6:i386 -y
    The server itself loads more 32-bit libraries. Our servers run Debian 12 with, among others, these installed:
    sudo apt install lib32stdc++6 lib32z1 libcurl4:i386 libsdl2-2.0-0:i386 libtinfo6:i386 -y
    If srcds_run stops with an error that names a missing .so file, install the 32-bit (:i386) package that provides it.
  2. Create a user for the server and switch to it.
    sudo useradd -m -s /bin/bash -U tf2
    sudo su - tf2
  3. Install SteamCMD and let it update itself once. Do this before the game download: a fresh SteamCMD restarts itself on its first run, and a download issued across that restart can fail.
    mkdir -p ~/steamcmd ~/server
    cd ~/steamcmd
    wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz
    tar -xf steamcmd_linux.tar.gz
    ./steamcmd.sh +quit
  4. Download the server.
    ~/steamcmd/steamcmd.sh +force_install_dir /home/tf2/server +login anonymous +app_update 232250 validate +quit
    Steam sometimes answers "Failed to install app (Missing configuration)" and SteamCMD still ends with "success", leaving no game files. We see this come and go. Check that steamapps/appmanifest_232250.acf exists in the server folder, and run the command again if it does not. Our installer does exactly that, up to three tries.
  5. Copy the Steam client library where the server looks for it, as our install does:
    mkdir -p ~/.steam/sdk32
    cp ~/steamcmd/linux32/steamclient.so ~/.steam/sdk32/

Start it

  1. Write a small config file with the name and an RCON password. We use a file of our own so that the name never has to go on the command line:
    mkdir -p ~/server/tf/cfg
    printf 'hostname "My TF2 server"\nrcon_password "change-this"\n' > ~/server/tf/cfg/pnh_autoexec.cfg
    Do not put a double quote in either value, because both sit between quotes in the file. Set an RCON password only if an outside tool needs it.
  2. Start the server from the server folder with the options our servers use:
    cd ~/server
    ./srcds_run -game tf -console -port 27015 -maxplayers 24 +map cp_dustbowl +ip 0.0.0.0 -strictportbind -norestart +exec pnh_autoexec
    -strictportbind makes the server fail instead of silently moving to another port if yours is taken. To use a token, add +sv_setsteamaccount YOUR_TOKEN. Our servers add it only when a token is set.
  3. Wait for the ready line. Our panel treats the server as up when the console prints gameserver Steam ID, which comes once the server has logged into Steam. Run it under a service manager such as systemd so it restarts after a crash.
  4. Update by stopping the server and running the step 4 download command again.

SourceMod and Metamod:Source

Valve added a 64-bit server to Team Fortress 2 in its update of 18 April 2024. The commands above start the 32-bit server with srcds_run, which is what our servers run. A fresh server runs vanilla Team Fortress 2. Plugins and admin commands need Metamod:Source and SourceMod, which go into the tf folder. Our installer fetches the newest 1.12 builds from the AlliedModders download sites (mms.alliedmods.net and sm.alliedmods.net) and unpacks both into tf. It then deletes tf/addons/metamod_x64.vdf: our servers run the 32-bit server, and that 64-bit loader file only adds a confusing load error to every boot log.

Option 2: host it on PlayNHost

Renting removes the install, the ports and the update routine. You still choose a name, a map and your rules.

  1. Pick a plan. Open the Team Fortress 2 server hosting page and compare the plans: SCOUT (10 players), SOLDIER (18) and PYRO (30) at the time of writing. Press Create Server (Customize Plan on PYRO) and finish the order. Prices change, so check them on that page.
  2. Wait for the install. The server appears in the panel. Its Console prints gameserver Steam ID when it is ready.
  3. Name it and pick the first map. On the Settings tab, set the Server name and the Default Map. The name takes no spaces, asterisks or question marks, so join words with - or _. Then restart.
  4. Add a token if you want one. Paste your token into Steam Login Token (GSLT) on the same tab and restart. The token is optional. Paste it exactly: with a wrong token the Steam login fails, the ready line never comes, and the panel stays at Starting.
  5. Set an RCON password in RCON password only if an outside tool needs it. The panel's Console works without one.
  6. Add plugins if you want them. Open the Modding tab, switch on SourceMod and Metamod:Source, then press Reinstall to apply and confirm with Reinstall. A restart does not install it, because the setting is read only while the server installs. The reinstall leaves your configs, maps and addons folder in place. Your plugins go in tf/addons/sourcemod/plugins under Files. See How to add mods to your Team Fortress 2 server and How to become admin on your Team Fortress 2 server and use admin commands.

What the panel does for you:

  • Your port is assigned and open from the start, and the server starts with -strictportbind, so it never quietly lands on a different port.
  • The player cap comes from your plan and is passed as -maxplayers.
  • At every start the panel rewrites tf/cfg/pnh_autoexec.cfg with the name and RCON password from the panel. Change those two in the panel, not in that file, or your edit is overwritten.
  • The install checks for the Steam app manifest and retries, so the "Missing configuration" trap above does not leave you with an empty server. With Auto Update (under Show advanced on the Settings tab) turned off and a build already installed, a reinstall keeps that build.
  • Backups of your server are covered in How to back up and restore your Team Fortress 2 world.

Self-hosting or renting: an honest comparison

  • Cost: the server software is free. Self-hosting costs power, hardware and bandwidth, or a cloud machine. Renting is a monthly fee set by the plan.
  • Uptime: a home server is only up while your PC, power and internet are. A rented server runs on the host's hardware.
  • Exposure: at home, players connect to your public IP address and you look after the firewall and router. A rented server keeps your home IP out of it.
  • Setup: self-hosting needs the command line, port forwarding and the install retry above. Renting needs a name, a map and optionally a token.
  • Control: self-hosting gives you every file. On our servers you change the main settings in the panel and still have the Files tab for your own configs and plugins.

Ready to skip the setup? See the Team Fortress 2 server plans. Already have a server? Start with How to set up your Team Fortress 2 server: key settings.

Already hosting it somewhere else? Move your server to us

OUR LATEST BLOGS