Do you have a Linux VPS and want to install the Team Fortress 2 Dedicated Server on it? You’re in the right place. In this guide, we’ll explain step by step how to install this service on your Linux server using SteamCMD. We’ll use Ubuntu as an example, but the process is very similar on other distributions.
First, connect to your VPS via SSH. If you need help, follow our SSH Getting Started guide. You’ll also need to set up SteamCMD on your Linux server the first time you use it. Follow our SteamCMD Linux Setup guide, and make sure SteamCMD is fully set up before continuing.
Log in as the steam user and switch to the steam home directory to keep everything organized.
sudo -u steam -s
cd ~
Once you’re logged in, you can start the installation with the following command. This installs the server directly through SteamCMD as the steam user.
steamcmd +force_install_dir '/home/steam/tf2-ds' +login anonymous +app_update 232250 validate +quit
Please wait for the download to finish—it may take a while for larger games. If everything worked, a confirmation message will appear.
You’ve now completed the basic installation of your Team Fortress 2 server. You can configure additional server settings directly in the startup file.
Switch to your root directory. In the cfg folder, you’ll find the server.cfg file, which you can open to customize the server options.
nano /home/steam/tf2-ds/tf2/tf/cfg/server.cfg
To allow other players to connect to your server, you need to generate and add a Game Server Login Token (GSLT). This token authenticates your server with Steam. Create your GSLT at http://steamcommunity.com/dev/managegameservers using the game ID 232250 for Team Fortress 2.
Then add the token to your server startup parameters with +sv_setsteamaccount <TOKEN>.
You can now start your server. Switch to the main game directory and run the following startup command:
./srcds_run -console -game tf -secure +maxplayers 22 +map de_dust +sv_setsteamaccount XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
You should now see logs in the terminal indicating that the server started successfully. Note that the first startup may take a little longer while everything is set up. Alternatively, you can connect directly by using the search at the bottom of the server list and entering [your_ip_address]:2456.
Congratulations, you’ve successfully installed and configured your Team Fortress 2 server on your VPS! As a next step, we recommend following our Linux Service Setup guide. It explains how to set up your Dedicated Gameserver as a service, with benefits such as automatic startup when your server boots, automatic updates, easy management, access to logs, and much more!
If you have any questions or run into any issues, our support team is available every day—don’t hesitate to contact us! 🙂
