Video coming soon…

🎪 Setup TF2 Server — Team Fortress 2 Multiplayer

Deploy a dedicated Team Fortress 2 server for free-to-play team-based combat with custom maps, game modes, and SourceMod plugin support.

Gaming TF2 FPS
⚠️ This script is provided for demo and testing purposes only. Not intended for production use.

📦 Resources & Setup Scripts

Grab the automated bash script from GitHub to follow along with the video.

Automated install script — TF2 dedicated server running in one command.
View on GitHub

Quick Install:

wget https://raw.githubusercontent.com/mhmdali94/Docker/main/gaming/tf2/tf2-ubuntu.sh
chmod +x tf2-ubuntu.sh
sudo bash tf2-ubuntu.sh

Tutorial Steps

1 Download & Run the Installer

The script installs Docker if needed, downloads TF2 via SteamCMD, and starts the server container. The game files are approximately 15 GB — allow time for the initial download to complete.

wget https://raw.githubusercontent.com/mhmdali94/Docker/main/gaming/tf2/tf2-ubuntu.sh
chmod +x tf2-ubuntu.sh
sudo bash tf2-ubuntu.sh

2 Configure the Server

Edit the server configuration to set hostname, password, player limit, RCON credentials, and game mode.

# Edit server.cfg
nano /opt/tf2/tf/cfg/server.cfg

# Key settings to configure:
hostname "My TF2 Server"
sv_password ""
maxplayers 24
rcon_password "your_rcon_password_here"
tf_gamemode_payload 1

3 Connect with the Game Client

Open TF2 and find your server through the community browser or connect directly using the console.

# Option 1: In-game console (press ~)
connect <your-server-ip>:27015

# Option 2: Community browser
# TF2 → Find a Game → Community Servers → search name

4 Admin Management

Use RCON or SourceMod admin commands to manage maps, players, and server behavior.

# RCON from TF2 console
rcon_address <your-server-ip>:27015
rcon_password your_rcon_password_here

# Common RCON commands
rcon status                        # list players
rcon changelevel pl_badwater       # change map
rcon kick <player_name>            # kick a player
rcon sm_ban #<userid> 60 "reason"  # ban via SourceMod
rcon mp_restartgame 1              # restart game

Ports Used

PortPurpose
27015 UDPGame traffic & server query
27020 UDPSourceTV broadcast

Overview

Team Fortress 2 is Valve's classic team-based multiplayer FPS with distinct character classes. A TF2 dedicated server lets you host private matches, community servers with custom configs, or Sourcemod-powered fun servers with plugins.

Why Use It

Self-hosting a TF2 server lets you run private scrimmage matches for competitive teams, set up custom fun servers (dodgeball, achievement maps, surf), and use Sourcemod plugins without restrictions imposed by community server hosts.

When You Need It

    Who Should Use It

      Real Use Cases

        Main Features

          How to Use After Installation

            Security Best Practices

              Ports and Firewall Notes

              TF2 uses UDP port 27015 for game connections. Open UDP 27015 in your firewall. The Steam server browser query also uses this port. RCON uses TCP 27015 — keep this accessible only from trusted IPs.

              Backup and Maintenance

                Common Mistakes

                  Troubleshooting

                    Alternatives

                    Alternatives include using the built-in valve matchmaking, playing on existing community servers, and using community hosting services. Self-hosting is best for competitive practice, custom game modes, and plugin development.

                    When Not to Use It

                    Avoid self-hosting TF2 if you just want to play casually — existing community servers are plentiful. Self-hosting is best when you need specific control over rules, plugins, and player access for competitive or custom play.

                    PrismaTechWork Professional Help

                    PrismaTechWork provides end-to-end infrastructure services — from initial deployment and security hardening to ongoing monitoring, automated backups, and dedicated support. Whether you need a single-server setup or a multi-site network, our team ensures your infrastructure is built right, secured properly, and maintained reliably.

                      Contact Us

                      Frequently Asked Questions

                      How do I install Sourcemod on my TF2 server?

                      First install Metamod:Source (TF2 requires it for Sourcemod). Download Metamod from sourcemm.net and extract to the tf directory. Then download Sourcemod from sourcemod.net and extract it to the tf directory as well. Restart the server and verify both are loaded with the meta version and sm version console commands.

                      Can I run a competitive 6v6 server?

                      Yes. Download and configure a competitive config such as the ETF2L or RGL match configs. These configs set the correct max players, weapon bans, and tournament settings. Install Sourcemod plugins like STV Demo recording and a pause plugin for proper competitive match management.

                      How do I add custom maps to my TF2 server?

                      Place custom .bsp map files in the tf/maps directory. Add the maps to your mapcycle.txt or maplist.txt. For clients to automatically download custom maps, enable sv_allowdownload 1 and sv_allowupload 1, or set up a FastDL web server for faster custom content distribution.

                      What is FastDL and do I need it?

                      FastDL is a web server that serves custom maps, sounds, and textures to clients faster than the in-game download system. Without FastDL, custom content downloads slowly via the game connection. If you run a server with many custom maps, set up a FastDL web server and configure sv_downloadurl to point to it.

                      Can I run a TF2 dodgeball server?

                      Yes. Install the TF2 Dodgeball Sourcemod plugin, set your server to Arena mode on dodgeball maps, and configure the plugin settings. Dodgeball is one of the most popular custom TF2 game modes — Pyros deflect rockets back and forth. Many dedicated dodgeball maps and configs are available from the community.