TEAM FORTRESS 2 · SERVER SETUP GUIDE · NOVEMBER 2026

How to Set Up a Team Fortress 2 Dedicated Server

A TF2 server costs nothing to download, but a fresh install only becomes a server your friends can find after a few decisions: which launcher, which token, which ports and how strict to be with custom files. Here is the full path from SteamCMD to a joinable server that stays online and up to date.

Pick the right binary

Use the current 64-bit launcher by default. Only stay on 32-bit if a plugin or extension you need has no matching 64-bit build.

Use the right IDs

Install the server with app ID 232250, but create the GSLT with app ID 440. Those two IDs do different jobs.

Make it public properly

sv_lan 0, a valid token, and correct port forwarding are what turn a local test into a server friends can actually reach.

Plan for the long run

TF2 prefers fast single-core CPU speed, about 8 GB of free disk on Linux, and enough home upload if you self-host. If you want 24/7 uptime, hosted infrastructure is usually simpler.

Before you start: what a TF2 server needs and the decisions that matter first

The TF2 dedicated server, srcds, is free. You install it with SteamCMD, not through the normal Steam client. On Linux, keep about 8 GB of free disk available. More important than raw core count is fast single-core CPU speed, because TF2 server work is mainly limited by how quickly one main server thread can finish each tick. If you plan to host from home, read up on self-hosting a game server first, because a public server can be limited by upload speed and it only stays online while your PC does.

There are four decisions worth making before you install anything. They affect the files you use, the launch command, and how easy later admin work will be.

Four decisions to make before you install
Each one changes a step later in this guide
Windows or Linux
Both run the same server.
Linux needs 32-bit libraries
Pick the OS you can keep updated
32-bit or 64-bit
64-bit since April 2024.
Plugins must match
srcds_run_64 or srcds_win64.exe
Public or private
Public needs a token
to show in the browser
Private: set sv_password
Self-host or rent
Home upload limits a
24-player server
Renting: online 24/7
Settle these first and the rest of the setup is copying files and editing one config.
  • Windows or Linux: Windows is straightforward if you want the simplest local admin. Linux is usually cleaner for unattended running, especially once you add screen or systemd.
  • 32-bit or 64-bit: the April 2024 TF2 update added 64-bit server support on Windows and Linux, with performance improvements for most users. The catch is compatibility: a 64-bit server cannot load plugin binaries built only for 32-bit, because the process and the extension have to match architectures.
  • Public or private: a private friends server can still be an internet server. Use a password if you want, but keep sv_lan 0 so people outside your network can join.
  • Self-host or rent: self-hosting is fine for a small server if your upload and uptime are good enough. For a 24/7 community box, rented hosting is usually easier because the machine stays online and the network is built for incoming players.

One other decision sits over all of this: do you want browser listing, or is direct IP enough? If you want the server to show in the server browser, you need a valid Game Server Login Token later on. That token is not optional for public discovery.

Install the server with SteamCMD

Install app ID 232250. That is the TF2 dedicated server package. SteamCMD can fetch it anonymously, so you do not need to log your personal account into the tool just to install the files.

Windows

Create a runscript called tf2_ds.txt inside your SteamCMD folder:

@ShutdownOnFailedCommand 1
@NoPromptForPassword 1
force_install_dir C:\TF2server\
login anonymous
app_update 232250
quit

Then create update.bat in the same folder:

.\steamcmd.exe +runscript tf2_ds.txt

Linux

On Debian or Ubuntu 64-bit, install the 32-bit compatibility libraries first, because TF2 server components still rely on them. Use a dedicated non-root user so the server is not running as root.

sudo dpkg --add-architecture i386
sudo apt update
sudo apt install lib32z1 libncurses5:i386 libbz2-1.0:i386 lib32gcc-s1 lib32stdc++6 libtinfo5:i386 libcurl3-gnutls:i386 libsdl2-2.0-0:i386
sudo useradd --create-home gameserver

Some newer releases no longer ship libtinfo5:i386 or libncurses5:i386, so if your package manager complains, that part is a distro packaging issue rather than a TF2 one.

Switch to the gameserver user, then download SteamCMD and install the server files into their own folder:

mkdir ~/hlserver && cd ~/hlserver
wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz
tar zxf steamcmd_linux.tar.gz
./steamcmd.sh +force_install_dir ~/hlserver/tf2 +login anonymous +app_update 232250 validate +quit

force_install_dir needs to come before login because SteamCMD sets the target install path for that session up front. If you put it later, files can end up in the wrong place, especially if you are reusing a SteamCMD folder. Keep the install folder separate from the SteamCMD folder for the same reason: it keeps the server tree clean, predictable, and easier to update.

The first download is large and can take a while. Re-run the same command or script until SteamCMD reports Success! App '232250' fully installed. Do the same later for updates; the install command doubles as the update command.

From fresh install to a joinable TF2 server
Install and configure
SteamCMD downloads app 232250
then
Write server.cfg in tf/cfg
then
Add a token for App ID 440
Launch and join
Launch with a map
then
Open UDP 27015
then
Players connect or browse
Re-run the same SteamCMD command after every TF2 update.
The token is what lists the server in the browser.
Six steps, in this order. Skipping the token is the most common reason a working server never appears in the browser.

Get a Game Server Login Token

This is the step that most “my server is not showing up” problems come back to. To appear in the server browser, the server must have a valid Steam Game Server Login Token. Create it using App ID 440, which is TF2 itself, not 232250. The reason is simple: 232250 is the server package you download, but the browser listing and Steam game server identity are tied to TF2 as a game, which is app 440.

The Steam account used to create the token must not be limited, community-banned or locked, and it needs a qualifying phone number. Use one token per server. Do not reuse the same token on several servers, and do not publish it in screenshots, config backups or forum posts. Treat it like a password.

Add the token on the launch line with +sv_setsteamaccount YOURTOKEN. Without it, the server still starts, but it will not appear in the server browser. If you are making a public server, it is also worth reviewing basic game server security before exposing RCON and admin credentials to the internet.

Write server.cfg, mapcycle.txt and motd.txt

Your main server config lives in tf/cfg/server.cfg. Make sure it is really a .cfg file and not a text file that only looks right in Explorer. Start with a small, readable config so that when something is wrong you know where to look.

// tf/cfg/server.cfg
hostname "My TF2 Server"
sv_password ""
rcon_password "change_this"
sv_region 3
sv_lan 0
mp_timelimit 30
mp_maxrounds 10
sv_allowupload 1
sv_allowdownload 1
net_maxfilesize 15
sv_contact "admin@example.com"
  • hostname is what players see in the browser. Keep it clear so you can recognise your own server during testing.
  • sv_password controls access. An empty value means public entry. If you want “friends only”, set a password here, but leave sv_lan 0 so the server is still an internet server rather than LAN-only.
  • rcon_password secures remote admin. RCON uses TCP on the game port, so if you expose it remotely, make the password strong and keep it private.
  • sv_region 3 helps browser filtering for Europe. If you prefer no regional restriction, -1 is world.
  • sv_lan 0 is the key internet setting. If this is wrong, the server behaves like a local test box.
  • mp_timelimit and mp_maxrounds control how long a map can hold the server. These settings do not save CPU directly, but they stop one stale map from running forever and keep your rotation moving.
  • sv_allowupload 1 allows sprays. sv_allowdownload 1 allows clients to download custom content. The trade-off is bandwidth and join time: more client downloads means more network use from the server.
  • net_maxfilesize 15 (in MB) puts a ceiling on files delivered through the game download path. If your custom maps or content are larger, serve them another way rather than trying to push everything through the game server itself.
  • sv_contact gives players a way to identify the admin when something breaks.

mapcycle.txt also lives in tf/cfg. It controls your map rotation. The practical reason it matters is persistence: once the server is left online for days, the map cycle becomes the thing that decides what players keep seeing when a time limit or round limit ends. Use mapcycle_default.txt as a reference.

motd.txt is your message of the day. Keep it short; MOTD files are limited to 2 KB. Use motd_default.txt as a reference. It is mainly for rules, contact details, or a quick note about downloads, not for stuffing in long server lore.

Launch the server on Windows or Linux

At launch time you are choosing the binary, the first map, the visible player count and the token. A server that is installed correctly but started without a map, without the token or with the wrong binary can still fail in ways that look confusing to a beginner.

Windows launch lines

"C:\TF2server\srcds.exe" -console -game tf +sv_pure 1 +map ctf_2fort +maxplayers 24 +sv_setsteamaccount YOURTOKEN
"C:\TF2server\srcds_win64.exe" -console -game tf +sv_pure 1 +map ctf_2fort +maxplayers 24 +sv_setsteamaccount YOURTOKEN

Linux launch lines

./srcds_run -console -game tf +map ctf_2fort +sv_pure 1 +maxplayers 24 +sv_setsteamaccount YOURTOKEN
./srcds_run_64 -console -game tf +map ctf_2fort +sv_pure 1 +maxplayers 24 +sv_setsteamaccount YOURTOKEN

Use 64-bit first unless you already know a required extension is 32-bit only. Valve added 64-bit server support with performance improvements for most users. The trade-off is compatibility, not gameplay: old Metamod, SourceMod or binary plugin builds compiled only for 32-bit will not load into a 64-bit process.

  • -console keeps the server in console mode so you can see errors and the network bind line.
  • -game tf points srcds at TF2 rather than another Source game.
  • +map ctf_2fort tells the server what to load first. Always start with +map or +randommap, because a server with no map loaded has nothing for players to join.
  • +maxplayers sets your slots. TF2 supports up to 32. There is an -unrestricted_maxplayers option for up to 100, but Valve marks it unsupported and notes stability issues at maximum players, so it is not a sensible starting point.
  • +sv_pure sets content rules for clients, covered below.
  • +sv_setsteamaccount is your browser-listing token.

Useful optional flags are -port 27015 if you want a non-default port, -ip if the machine has more than one address, -strictportbind if you would rather the server shut down than silently move to another port, -nohltv if you do not want SourceTV, and +servercfgfile or +mapcyclefile if you run several servers from one install.

When startup is healthy, the console should print a line like Network: IP <ip>, mode MP, dedicated Yes, ports 27015 SV / 27005 CL. That line is one of your best checks because it confirms what IP and server port the process actually bound to.

Ports, port forwarding and how players actually join

A joinable TF2 server needs two separate things: the process must be listening on the right ports, and your network has to let that traffic reach it. On a home connection, that usually means forwarding ports from the router to the machine running TF2.

Port What it does Who needs it
27015 UDP game Main game traffic for the server itself. Required for players to join from outside your network.
27015 TCP RCON Remote console administration. Only needed where you want remote admin access. Do not expose it casually.
27020 UDP SourceTV SourceTV traffic. Only needed if you use SourceTV. If not, launch with -nohltv.
27005 client Client-side port shown in the server network line. Mainly relevant for diagnosing bind issues; players do not type this as the server address.

Friends can join directly from the developer console with connect <ip>:<port>. That is the quickest test because it bypasses browser search. On a Linux machine with UFW, open the ports with ufw allow 27015/udp and, if you use SourceTV, ufw allow 27020/udp. If direct connect works but browser listing does not, look at the token first. If you can join from inside the same network but friends outside cannot, the usual cause is missing or wrong port forwarding on the router.

For public browser listing, the GSLT is what gets you into the Steam server browser ecosystem. Port forwarding alone is not enough. For home servers, forward only the ports you actually use. That reduces exposure and makes faults easier to trace.

Choose an sv_pure level and understand VAC

sv_pure decides how much client-side custom content you allow. It is about fairness and consistency rather than performance: stricter levels stop players using modified files, at the cost of cosmetic freedom.

What each sv_pure level allows
SettingCustom skins and modelsCustom spraysFiles checked against a list
sv_pure -1YesYesNo
sv_pure 0YesYesMinimal list
sv_pure 1Whitelist decidesYesFull list + whitelist
sv_pure 2NoNoSteam files only
The default whitelist under sv_pure 1 still allows custom player models.
Many community servers run sv_pure 1 with an edited whitelist.
sv_pure 1 is the middle ground most servers use: strict on files that give an edge, relaxed on cosmetics.
  • sv_pure -1: no file restrictions. Useful for testing or a very open private community, but you are trusting whatever custom client files players bring.
  • sv_pure 0: uses rules in cfg/pure_server_minimal.txt. It is a looser middle ground.
  • sv_pure 1: uses pure_server_full.txt and then pure_server_whitelist.txt. This is the common balance for public community servers because it still allows you to decide what is exempted. The default whitelist still allows custom player models.
  • sv_pure 2: Steam-supplied content only. It blocks custom skins, models and even custom sprays. That gives the strictest consistency, but the player trade-off is obvious: almost no cosmetic freedom.

If you choose sv_pure 1, copy pure_server_whitelist_example.txt to pure_server_whitelist.txt first and edit that copy. This approach is popular because it lets you keep a controlled server state while still permitting the specific custom files your community cares about.

VAC is on by default. The -insecure launch option disables VAC. That is fine for isolated testing, but it is the wrong choice for a public server unless you have a very specific reason to turn off anti-cheat.

Keep it running, keep it updated, and add the usual admin tools

A good setup is not just “it launched once”. It needs to survive disconnects, restarts and game updates. On Linux, put the launch line in a small script first, ~/hlserver/tf2/tf2.sh:

#!/bin/sh
cd ~/hlserver/tf2 || exit 1
exec ./srcds_run_64 -console -game tf +map ctf_2fort +sv_pure 1 +maxplayers 24 +sv_setsteamaccount YOURTOKEN

Make it executable with chmod +x tf2.sh. For a small server, a detached session is enough:

screen -m -S tf2 ./tf2.sh

Detach with Ctrl+A, then D, and reattach later with screen -r tf2. The reason screen helps is that the server process keeps running after you close your shell. For a box that should come back after a reboot, create /etc/systemd/system/tf2server.service:

[Unit]
Description=TF2 Dedicated Server

[Service]
Type=simple
User=gameserver
ExecStart=/home/gameserver/hlserver/tf2/tf2.sh

[Install]
WantedBy=multi-user.target

Run systemctl daemon-reload, then systemctl enable tf2server. If you prefer containers, the cm2network/tf2 Docker image supports SRCDS_TOKEN, with SRCDS_PORT and SRCDS_TV_PORT for extra servers, and it updates on restart.

When Valve pushes a TF2 update, clients update first and an outdated server becomes unjoinable. The fix is simple: stop the server, re-run your SteamCMD install command or Windows update script, then start it again. If you use plugins, check those as well, because updates can change the server binary and extensions may need matching releases before they load cleanly again.

For community admin features, install Metamod:Source first, then extract SourceMod into the tf folder so that tf/addons contains both metamod and sourcemod. That order matters because SourceMod loads through Metamod. Restart the server fully, then verify with meta list and sm version in the server console. Match the 32-bit or 64-bit build to the server binary you launched, or the addons will simply refuse to load.

Custom maps go in tf/maps as .bsp files, and the exact map name without .bsp must appear in the map list. With sv_allowdownload 1, players can download custom content from the server, but large maps are better served from FastDL. That shifts the heavy file transfer off the game process, which reduces join delays and saves the game server from spending bandwidth on big downloads instead of live traffic.

When friends cannot find or join the server

Use this flow first: is the server running, does the console show the expected network bind, can you direct-connect by IP, and does it have a valid token for browser listing?

Friends can’t find or join your TF2 server? Work down the list
Your server runs, but friends can’t get in
Is a token on the launch line?
No
No GSLTAdd +sv_setsteamaccount with a token made for App ID 440.
Yes
Is it stuck in LAN-only mode?
Yes
LAN onlySet sv_lan 0. On Linux, add steam_appid.txt containing 232250.
No
Is UDP 27015 open and forwarded?
No
PortsForward UDP 27015 to the server and allow it in the firewall.
Yes
Did TF2 just update?
Yes
Outdated serverRe-run SteamCMD app_update 232250, then restart.
No
Still stuck: have them try connect ip:port from the console
Work down from the top. Most “can’t find it” reports end at the token or the port.
Symptom Likely cause First fix
Not in server browser No valid GSLT, wrong app ID used for the token, or no token on the launch line. Create a token for App ID 440, not 232250, and launch with +sv_setsteamaccount TOKEN.
Stuck in LAN-only mode sv_lan is wrong, or on Linux the app ID file is missing. Set sv_lan 0. If it still behaves like LAN on Linux, add steam_appid.txt containing 232250.
Friends cannot connect but you can Router NAT or port forwarding is wrong. Forward UDP 27015 to the server machine, then test with connect <ip>:<port> from outside your network.
SteamAPI_Init failed Common Linux message that is not fatal here. Ignore it unless another clear error follows.
Missing steamclient.so The library is not where srcds expects it. Copy it to ~/.steam/sdk32/.
replay_srv.so error Missing libcurl-gnutls. Install libcurl-gnutls.
Segmentation fault on start Usually missing 32-bit libraries on Linux. Install the required i386 compatibility packages and try again.
RCON will not connect Bind or address issue. Add +ip 0.0.0.0 and rcon_address 0.0.0.0, then confirm TCP 27015 reaches the server.
Plugins do not load after switching to 64-bit Metamod, SourceMod or plugin binaries are still 32-bit. Install matching 64-bit builds, or go back to the 32-bit server binary until your addon stack matches.
Players cannot join after a TF2 update The server is outdated, or an extension no longer matches the new server build. Re-run SteamCMD, restart the server, then update Metamod:Source and SourceMod if needed.

Tune it, or decide when to move up to better hosting

TF2 runs at a fixed 66 ticks per second, and -tickrate is disabled for TF2, so the practical performance question is not “can I raise tick?” but “can my CPU keep each tick on time?”. Use the stats command to check health: FPS near 66.67 is healthy, while below 60 during a match means the server is struggling. If the server is online and joinable but feels rough, the next job is fixing TF2 server lag.

Server type Typical slots RAM guide Good fit for home hosting? When to move to rented hosting
Competitive 6v6 12-14 slots 1-2GB Often yes, if your upload is steady and the PC can stay on when scrims happen. Move if uptime matters more than convenience, or if you want the server online at set times without relying on one home machine.
Mann vs. Machine 6-10 slots 1-2GB Usually manageable for home hosting if the box is otherwise quiet. Move if updates, restarts or home connection limits keep interrupting sessions.
24/7 community map server with SourceMod 24 slots 2GB More difficult. Home upload speed commonly becomes the limit here. Rented hosting makes more sense if you want it online all day, every day, with a steadier network.
Custom mode with heavy plugins 24-32 slots 3-4GB Least suitable. Plugin load and player count both raise the chance of bad frametime on weaker hardware. Move if your stats FPS drops in live matches, or if you need 24/7 uptime and simpler addon management.

If you are comparing rented plans, start with our Team Fortress 2 server hosting comparison. The useful differences are not flashy extras but practical ones: consistent uptime, a proper datacentre network, easier updates, and on many hosts a control panel that can add SourceMod quickly. For British players, London servers usually keep ping lower across the UK.

Need a server that stays online?

If your home line cannot keep a public TF2 server responsive, or you want 24/7 uptime without leaving a PC running, a hosted server is the simpler path. Compare current options, locations and management features before you commit.

Compare the best Team Fortress 2 server hosts

Team Fortress 2 server FAQ

Is a Team Fortress 2 dedicated server free?

Yes. The TF2 dedicated server is free and installs through SteamCMD with app ID 232250 using anonymous login. Your main costs are the machine, the connection, and the time needed to keep it updated and reachable.

Why is my TF2 server not showing in the server browser?

The first thing to check is the Game Server Login Token. It must be created for App ID 440 and passed on the launch line with +sv_setsteamaccount. After that, confirm sv_lan 0 is set and that the server is reachable on the correct public port.

Should I use the 64-bit TF2 server?

Usually, yes. Valve added 64-bit server support with performance improvements for most users, so it is the sensible default for a clean install. The reason to stay on 32-bit is addon compatibility: a plugin or extension built only for 32-bit will not load in a 64-bit server.

What ports does a TF2 server need?

The main game port is UDP 27015. RCON uses TCP 27015, and SourceTV uses UDP 27020 if you enable it. The server console also shows a client-side port in the network line, but players normally join with the server IP and game port.

How many players can a TF2 server hold?

The normal supported limit is up to 32 players with +maxplayers. There is an -unrestricted_maxplayers option that can go higher, but Valve marks it unsupported and notes stability issues at maximum players. For most communities, the better question is not the highest number possible, but how many players your CPU, plugins and upload can keep smooth at 66 tick.

More Team Fortress 2 server help

The host comparison, plus our guides on tuning and securing a server.

Checked against the official TF2 Wiki server pages, Valve’s SteamCMD and launch option documentation and the AlliedModders install notes, November 2026. On a rented server the panel handles the install and launch line for you, but the token, ports, server.cfg and sv_pure decisions work exactly the same.

Similar Posts