•  Home
  •  Dashboard
  •  Company
    • About Us
    • Blog
    • Careers
    • Contact Us
    • Data Centers
    • Looking Glass
    • Network
    • Reseller
  •  Hosting Services
    • Infrastructure
      • iColocation
    • Compute
      • cMetal
      • cVirtual
    • Storage
      • sObject
      • sBlock
    • Networking
      • nCDN
      • nIP Transit
      • nWavelength
    • Protection
      • pBackup
      • pDDoS
  •  Solutions
    • Ecommerce
    • Finance
    • Gaming
    • Hosting
    • Management
    • Security
    • System Integrator
  •  Support
    • Community
    • Knowledge Base
    • Open A Ticket
  •  USA & Canada: 800-933-1517
  •  International: 626-549-2801
  •  Email: sales@psychz.net
  • Services
    • new-colocation-header-img
      Infrastructure
      • iColocation
    • new-compute-header-img
      Compute
      • cMetal
      • cVirtual
    • new-storage-header-img
      Storage
      • sObject
      • sBlock
    • new-networking-header-img
      Networking
      • nCDN
      • nIP Transit
      • nWavelength
    • new-protection-header-img
      Protection
      • pBackup
      • pDDoS
  • Solutions
    • Ecommerce
    • Security
    • Gaming
    • Hosting
    • Management
    • Finance
    • System Integrator
  • Dashboard

How to setup a dedicated server for Team Fortress 2

  • Home
  • Client
  • Knowledgebase
  • Gaming
  • How to setup a dedicated server for Team Fortress 2

Table Of Content

Related Articles

  • Step by Step Guide to Setup A PalWorld Server
  • How to setup a Dedicated server for Killing Floor 2
  • How to setup a Dedicated Server for Dont Starve Together (DST)
  • How to setup a Dedicated server for Risk of Rain 2
  • How to setup a dedicated server for Factorio
  • How to setup a Dedicated Server for Space Engineers
  • How to setup a dedicated server for Avorion
  • How to setup a Dedicated Server for Terraria
  • How to setup a dedicated server for Minecraft Bedrock
  • How to setup a dedicated server for GMOD (Garry's Mod)
  • How to setup a dedicated server for Conan Exiles
  • How to setup a dedicated server for Counter-Strike: Global offensive
  • How to setup a dedicated server for 7 days to die
  • How to setup a dedicated server for Unturned
  • How to setup a dedicated server for Ark: Survival Evolved
  • How to setup a dedicated server for Minecraft
  • How to host your own RUST server
  • Views: (3008)
  • Votes: (0)
Was this article helpful?
VOTE

How to setup a dedicated server for Team Fortress 2

Publisher: Psychz Networks,  February 26,2021

Sequel to one of the most popular games of its time, Team Fortress, developed and published by Valve in 1996, Team Fortress 2 is the successor with the same multiplayer first-person shooter game option.

In the following article, we will step by step setup Team Fortress 2 on a Ubuntu 18 server.

Requirement

To install Team Fortress Dedicated Server on Linux, you'll need:

- Server with Ubuntu 18
- Root access
- 8GB
- 20 GB Storage space

Note: Team Fortress 2 uses certain ports that must be open on your server to connect users outside your own local network. UDP 27015 is the main port used by the server browser and allows the client to connect. This port is also used for RCON (Remote connect).

Update Ubuntu 18 for latest libraries

If you have recently performed a fresh Ubuntu installation, you will have to update repositories and install a few requirements.

# sudo apt-get update

Output

# sudo apt-get update
Hit:1 http://us.archive.ubuntu.com/ubuntu bionic InRelease
Get:2 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu bionic-updates/main i386 Packages [1,228 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [1,913 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu bionic-updates/main Translation-en [394 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [256 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu bionic-updates/restricted Translation-en [34.3 kB]
Get:9 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1,718 kB]
Get:10 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe i386 Packages [1,561 kB]
Get:11 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe Translation-en [363 kB]
Get:12 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:13 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [1,109 kB]
Fetched 8,828 kB in 19s (462 kB/s)
Reading package lists... Done

If you are using 64-bit distribution, you need to install a package named lib32gcc1 or ia32-libs. This is because Steam is compiled for i386 architecture only.

# sudo dpkg --add-architecture i386
# sudo apt-get install lib32z1 libncurses5:i386 libbz2-1.0:i386 lib32gcc1 lib32stdc++6 libtinfo5:i386 libcurl3-gnutls:i386

Download and install the SteamCMD Tool

It is recommended you create a separate user (such as "tf2server") to install and run game servers.

Create a user named "tf2server"

# adduser tf2server

Create a directory in which SteamCMD will be installed, eg './hlserver':

# mkdir ./hlserver

Change the current working directory to hlserver:

# cd hlserver

Download steamcmd_linux.tar.gz :

# wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz

Use the tar command to uncompress the archive into the working directory:

# tar zxf steamcmd_linux.tar.gz

Download Team Fortress 2 Server

Use this command to download the latest server:

# ./steamcmd.sh +login anonymous +force_install_dir ./hlserver +app_update 232250 +quit

Note: 232250 is Team Fortress 2 App ID

You can update the server in the future by executing this command again.

Creating/Updating server configuration files

Now, change the current working directory to ~/hlserver/tf2/tf/cfg:

# cd ~/hlserver/tf2/tf/cfg

Create a file named server.cfg:

# nano server.cfg

Add the following content into your server.cfg (see Windows dedicated server for more information):

hostname "Your_TF2_Server_Name"
rcon_password "Enter_password"
sv_contact "admin@yourdomain.com"
mp_timelimit "30"

Note: You can add a name to your server in this file. This will be displayed when users will look for your server.

Running TF2 server

We will create a shell script which you can run to start your Team Fortress 2 Server, Create a file in './hlserver/tf2.sh' with the following contents:

#!/bin/sh
./srcds_run -console -game tf +sv_pure 1 +randommap +maxplayers 24

Name this file 'tf2.sh' to make it executable.

# chmod u+x tf2.sh

Run ./tf2.sh to launch the server:

# ./tf2.sh

This will start the server. You can now invite players to join and play on your server.

We hope you have found this guide helpful and could successfully deploy Team Fortress 2 on your Ubuntu server. Please click on the up-vote button to show your appreciation.

Related Articles

  • Step by Step Guide to Setup A PalWorld Server
  • How to setup a Dedicated server for Killing Floor 2
  • How to setup a Dedicated Server for Dont Starve Together (DST)
  • How to setup a Dedicated server for Risk of Rain 2
  • How to setup a dedicated server for Factorio
  • How to setup a Dedicated Server for Space Engineers
  • How to setup a dedicated server for Avorion
  • How to setup a Dedicated Server for Terraria
  • How to setup a dedicated server for Minecraft Bedrock
  • How to setup a dedicated server for GMOD (Garry's Mod)
  • How to setup a dedicated server for Conan Exiles
  • How to setup a dedicated server for Counter-Strike: Global offensive
  • How to setup a dedicated server for 7 days to die
  • How to setup a dedicated server for Unturned
  • How to setup a dedicated server for Ark: Survival Evolved
  • How to setup a dedicated server for Minecraft
  • How to host your own RUST server
  • Views: (3008)
  • Votes: (0)
Was this article helpful?
VOTE
Copyright © 2025 Psychz Networks,
A Profuse Solutions Inc Company
Hosting Services
Infrastructure
  • iColocation
Compute
  • cMetal
  • cVirtual
Storage
  • sObject
  • sBlock
Networking
  • nCDN
  • nIP Transit
  • nWavelength
Protection
  • pBackup
  • pDDoS
Company
  • About Us
  • Blog
  • Careers
  • Contact Us
  • Data Centers
  • Looking Glass
  • Network
  • Reseller
Policies
  • Acceptable Usage Policy
  • Privacy Policy
  • Service Level Agreement
  • Terms and Conditions
Support
  • Community
  • Knowledge Base
  • Open A Ticket
Get In Touch
  • Psychz Networks,
    A Profuse Solutions Company
    611 Wilshire Blvd #300
    Los Angeles,California 90017
    USA
  • US/Canada: 800-933-1517
  • International: 626-549-2801