How to Make a Team Fortress 2 Server

  • 8 min read
  • Updated 7 October 2026
  • ESAGAMES Team

A complete walkthrough for running your own Team Fortress 2 dedicated server — install it with SteamCMD, claim a free Steam Game Server Login Token, set the map and player count, and open the ports. Plus the one-click hosted route if you'd rather skip the setup.

Team Fortress 2 runs on Valve's Source engine, so its dedicated server is an SRCDS process that stays online after you close the game. You can self-host it free on a spare PC, or use a managed host for a 24/7 server with a panel and DDoS protection.

This guide covers the self-hosted SteamCMD route step by step, and points out where a host saves you the hassle.

Want it running without a home PC? Team Fortress 2 server hosting is ready for SourceMod plugins and custom maps, behind our Anti-DDoS network.

What you'll need

  • A machine to run the server — a spare PC for testing, or a host for 24/7 uptime.
  • SteamCMD, to download the free dedicated server (app 232250).
  • A free GSLT token for a public server.
  • Open ports: UDP 27015 and TCP 27015 (27015-27020 range).
  • A high-clock CPU for smooth ticks on a full server.

Set up a Team Fortress 2 dedicated server, step by step

  1. Step 1: Choose self-host or a managed host

    The TF2 dedicated server is free, but self-hosting needs a PC on 24/7, port-forwarding and a fast CPU. A managed host gives you an always-online server and a panel in minutes. Want zero hassle? Pick a host and skip to step 5.

  2. Step 2: Install SteamCMD and the server

    The TF2 dedicated server is Steam app 232250 — a free, anonymous download; you don't need to own the game on the server machine. Install it with SteamCMD.

    steamcmd +login anonymous +force_install_dir ./tf2server +app_update 232250 validate +quit
  3. Step 3: Get a free GSLT token

    A public server needs a Game Server Login Token to list in the browser. Generate one for app ID 232250 at the Steam Game Server Account Management page, then pass it on launch.

    # get a token at: https://steamcommunity.com/dev/managegameservers
    # then launch with:  +sv_setsteamaccount YOUR_GSLT
  4. Step 4: Launch with a map and player count

    Start srcds with a starting map and your settings. cp_dustbowl and pl_upward are classic defaults.

    ./srcds_run -game tf +map cp_dustbowl +maxplayers 24 +sv_setsteamaccount YOUR_GSLT +hostname "My ESAGAMES Server"
  5. Step 5: Open the ports

    Forward UDP 27015 (game) and TCP 27015 (RCON / management); the range 27015-27020 also covers SourceTV. On a managed host this is opened for you.

    27015/udp   game
    27015/tcp   RCON / query
    27020/udp   SourceTV (optional)
  6. Step 6: Tune the server & add plugins (optional)

    Edit server.cfg for the hostname, rcon password and rates. For admin tools and custom modes, install SourceMod + MetaMod:Source, then restart.

Keep your TF2 server smooth

  • High CPU clock matters most

    Source's tick is single-threaded — a fast per-core CPU keeps a full 24/32-player server responsive far more than extra cores or RAM.

  • Set a map rotation

    Configure a mapcycle so the server rotates through popular maps instead of sitting on one — it keeps players around longer.

  • Add SourceMod for admin

    SourceMod (on MetaMod:Source) gives you admin commands, votes and plugins — essential for a public community server.

  • Protect the IP

    A busy public TF2 server is a DDoS target. Self-hosting exposes your home IP; a managed host puts a clean, filtered IP in front.

Common problems & fixes

The server doesn't list in the browser

Usually a missing/invalid GSLT or a blocked port. Generate a valid token for app 232250 and open UDP 27015.

Players lag on a full server

Source is single-threaded — the CPU clock is the bottleneck, not RAM. Move to a faster-clocked CPU or cap maxplayers.

Plugins don't load

MetaMod:Source or SourceMod is missing or the wrong version. Install both, matched to the current TF2 build, and check the console on startup.

"Connection failed after 4 retries"

The game port (UDP 27015) isn't reachable. Forward it on the router and confirm the host firewall allows it.

Frequently asked questions

How do I make a TF2 server?

Install the free TF2 dedicated server (Steam app 232250) with SteamCMD, create a Game Server Login Token for app 232250, then start srcds with a map such as cp_dustbowl and your player count. Open UDP and TCP 27015, set the hostname and rcon password in server.cfg, and add SourceMod for admin tools.

Do I need to own TF2 to host a server?

No. The dedicated server (Steam app 232250) is a free, anonymous download, separate from the game. TF2 itself is free-to-play, but the server is its own package.

Do I need a GSLT for a Team Fortress 2 server?

For a public server that lists in the browser, yes — generate a free Game Server Login Token for app ID 232250 and pass it with +sv_setsteamaccount.

What ports does a TF2 server use?

UDP 27015 for game traffic and TCP 27015 for RCON/management, with the 27015-27020 range also covering SourceTV. Forward these at home, or let a host handle it.

How do I add admin tools and custom gamemodes?

Install MetaMod:Source and SourceMod, then add plugins. This covers admin commands, votes, and popular modes like MvM, dodgeball and x10.

How much does a TF2 server need to run well?

A high-clock CPU is the priority; 2-4 GB RAM is plenty for a standard server. Plugin-heavy servers want a faster CPU rather than more memory.

Why won't my server show in the browser?

Almost always a missing/invalid GSLT or a blocked port. Generate a valid token for app 232250 and make sure UDP 27015 is open.

Fixes for when it goes wrong

Knowledge-base fixes that pair with this guide — the errors people hit after setup.

More guides

Skip the troubleshooting

Managed, protected hosting in Frankfurt — we handle the Linux, the network and the DDoS so you don't have to.