Team Fortress 2 – How to host a tf2 server in 2021

Team Fortress 2 – How to host a tf2 server in 2021 1 - steamlists.com
Team Fortress 2 – How to host a tf2 server in 2021 1 - steamlists.com
Basic guide for a basic tf2 server

 

Intro

So, you decided to create your own server.

To get started, you need a hosting.

Team Fortress 2 - How to host a tf2 server in 2021

Hosting

Any linux computer can be a hosting for a tf2 server.
It could be a virtual private server (VPS), dedicated server, cloud service, virtual machine, docker container, your old PC, or your college’s hacked server.

The server must meet the following requirements:

  • x86 or x86_64 (amd64) CPU architecture
  • 1 Ghz CPU frequency
  • 1 GB of RAM
  • 15 GB of disk space
  • Public static IP address
  • Thick internet connection
  • Any Linux distribution on the board. This tutorial assumes the use of Debian Buster (Debian 10, Debian Stable)

Many hosting services provide such servers. Comparing them is beyond the scope of this guide. Also I do not want to advertise them. On internet, you can find tons of guides for choosing a hosting service/hosting provider.

In terms of cost, my server costs around $26 per month.

Let’s skip the step of choosing a hosting service and assume that you already have access to your server terminal.

Server

 

  1. Add support for i386 (x86) architecture:
    sudo dpkg –add-architecture i386
  2. Update software packages database:
    sudo apt-get update
  3. Update software packages:
    sudo apt-get dist-upgrade
  4. Install required software packages:
    sudo apt-get install screen wget mc htop lib32z1 libncurses5:i386 libbz2-1.0:i386 lib32gcc1 lib32stdc++6 libtinfo5:i386 libcurl3-gnutls:i386
  5. Run new screen session.
    screen -S s1

    This utility make it easier to start the server as a background process and reconnect to it at any time.

  6. Create a folder for your server staff:
    mkdir hlserver
  7. Go inside of it:
    cd hlserver
  8. Download steam console client archive:
  9. Upack it in the current folder:
    tar zxf steamcmd_linux.tar.gz
  10. Download tf2 server:
    ./steamcmd.sh +login anonymous +force_install_dir ./hlserver +app_update 232250 +quit

    If it failed with out of memory error, don’t worry just retry this command again and again until it downloads tf2 server successfully

  11. Go to the downloaded server’s folder:
    cd hlserver
  12. Now you should get your Valve Dedicated Game Server Account (token). It looks like a string of random letters and numbers. Something like
    F1337B16B00B5

    To get one go to https://steamcommunity.com/dev/managegameservers and create new account for TF2 (Game id is 440).

  13. Run your server:
    ./srcds_run -console -game tf +sv_pure 1 +randommap +maxplayers 24 +sv_setsteamaccount <INSERT YOUR TOKEN HERE>

    Replace

    <INSERT YOUR TOKEN HERE>

    with your token from previous step.

  14. You can now disconnect from your screen session while tf2 server will be running inside of it untouched.
    To do it press Ctrl+A and then press D.
    If you want to connect to it again enter:

    screen -r s1
  15. To stop the server simply press Ctrl+C

 

Network

 

To be able to connect to your server you need to open network port

UDP 27015

 

Different hosting providers have different user interfaces for opening ports.
You need to search on internet how to open port for your hosting provider, your home router or your virtual machine software depending of what you are using as hosting.
Google compute engine have the following UI for example:
Team Fortress 2 - How to host a tf2 server in 2021

Additional configuration

You may want to make basic configuration of your server.

  • Go to config folder:
    ~/hlserver/hlserver/tf/cfg
  • Create and edit server.cfg file:
    mcedit server.cfg
  • Edit it and save it with F2 key
  • Restart your server

Example of server.cfg:
Team Fortress 2 - How to host a tf2 server in 2021

Testing

Now launch the game and connect to your server by it’s IP address.

Open console (press ~ key) and write:

connect <INSERT SERVER IP HERE>

Replace <INSERT SERVER IP HERE> with IP address of your server.
Team Fortress 2 - How to host a tf2 server in 2021

WHOA IT WORKS!!!
Team Fortress 2 - How to host a tf2 server in 2021

Acknowledgments

I apologize for my bad english and thank to http://translate.google.com.

Thanks for reading, and have fun!

I am planning to update this guide in the future to include more advanced configuration, security measures, administration tools and create docker image with preinstalled and preconfigured vanilla tf2 server.

Feel free to ask something and request guide improvement because i don’t know which part of making server process is hard for average tf2 player.

 

Written by Acid Cat

This is all about Team Fortress 2 – How to host a tf2 server in 2021; I hope you enjoy reading the Guide! If you feel like we should add more information or we forget/mistake, please let us know via commenting below, and thanks! See you soon!


Be the first to comment

Leave a Reply

Your email address will not be published.


*