Option 1: by hand with SteamCMD
The dedicated server is a free, anonymous download from Steam (application 232250), about 15 GB. Since 2024 it has a native 64-bit Linux build, srcds_run_64, which takes up to 100 players.
- Install SteamCMD, then run: +login anonymous +force_install_dir ./tf2 +app_update 232250 validate +quit
- On Linux, install libcurl-gnutls (libcurl3t64-gnutls on Ubuntu 24.04): without it the 64-bit server stops with "Could not load: replay_srv.so".
- Start it: ./srcds_run_64 -game tf -port 27015 +maxplayers 24 +map ctf_2fort +sv_setsteamaccount <token>
- Write tf/cfg/server.cfg for everything else: hostname, sv_password, mp_timelimit, and exec banned_user.cfg so bans survive a restart.
- Open port 27015 for UDP (game and query) and TCP (RCON) in your firewall, and forward it on your router.
The Steam token
A community server needs a Game Server Login Token to appear in TF2's server browser. It is free: sign in at steamcommunity.com/dev/managegameservers, enter App ID 440, and copy the Login Token into +sv_setsteamaccount. Without one the server logs in anonymously and is unlisted; friends can still join by address.
Option 2: Docker
runonflux/tf2-server-flux, our image (source on GitHub, RunOnFlux/tf2-server-flux), installs and updates the server on every start and builds the launch line from environment variables: TF2_HOSTNAME, TF2_MAP, TF2_MAXPLAYERS, TF2_GSLT, TF2_PASSWORD, TF2_RCON_PASSWORD, TF2_SOURCEMOD and GAME_PORT.
- Mount /mnt/tf2/server on a volume for the 15 GB install, and /mnt/tf2/data on one for your files: custom/ (server.cfg, maps), addons/ (SourceMod), the ban lists and the logs.
- With TF2_SOURCEMOD=true it installs Metamod:Source and SourceMod (1.12, the stable 64-bit builds) and updates them on every start, never overwriting your admins and configs.
- srcds writes its console only to a terminal; the image runs it in one, so the console reaches docker logs.
Option 3: managed on Flux
Deploy a TF2 server on the Flux decentralized cloud, on that same image, with the launch line as a form, the port opened and routed for you, DDoS protection included, and a dashboard with a live server console, a Maps tab, SourceMod plugins and admins, bans, server.cfg as a form, a file browser and backups. Plans start at $4.49 a month.
- Pick the 12, 24 or 32-player plan.
- Choose a region close to your players.
- Name the server, pick the starting map, paste your Steam token and deploy. The first start downloads about 15 GB and installs SourceMod.
- Connect with the address from the dashboard, or find the server in the Community Server Browser.
Frequently asked questions
Is the TF2 dedicated server free?
Yes. It is a free, anonymous download from Steam (application 232250); the game itself is free to play too. What costs money is the machine that runs it.
Does the TF2 server run on Linux?
Yes, natively, and as a 64-bit program since 2024 (srcds_run_64). It needs libcurl-gnutls installed.
How long does a TF2 server take to start?
The first start downloads about 15 GB. Once installed, the server is on its map in about 20 seconds.