-
-
Notifications
You must be signed in to change notification settings - Fork 18
Dedicated Server (Linux)
You can install TC2 on a VPS or server rack and run it as a Source dedicated server.
-
Create a TC2 folder with
mkdir -p $HOME/bin/tc2server -
Get a ZIP of the game onto your server, and extract it into this new folder. Additional instructions:
cd $HOME/bin/tc2server- Transfer/download the ZIP, using rsync or scp to transfer, or wget or curl to download, or some other method. For example:
wget https://github.com/mastercomfig/tc2/releases/latest/download/game-linux.zip -O game.zip sudo apt install 7zip7z x game.ziprm game.zip
-
Install SteamCMD.
-
Install Steam Linux Runtime 3.0 (SLR3). Run
steamcmd +force_install_dir ./SteamLinuxRuntime_sniper +login anonymous +app_update 1628350 validate +quitor define$SLR_SNIPER_PATHto theruncommand path for SLR3. For container setups, you'll want to use the SLR platform image. -
Install TF2 Dedicated Server. Run
steamcmd +force_install_dir ./tf2 +login anonymous +app_update 232250 validate +quit. You can skip this step if you already have it installed. -
In the
bin/folder, runln -s $HOME/.local/share/Steam/steamcmd/tf2 ./tf2ds- Note: depending on your distro, you may have to run
ln -s $HOME/.local/share/Steam/tf2 ./tf2dsinstead
- Note: depending on your distro, you may have to run
-
In the
bin/folder, runln -s ./tf2ds ./tf2- Pro tip:
tf2ds/is used for dedicated server binaries, andtf2/is used for HL2/TF2 assets (VPKs). Since we can get both from one app, we link them together. But if you have another setup, you can link them to the corresponding folders that you have.
- Pro tip:
-
Run
mkdir -p $HOME/.steam/sdk64 -
Run
ln -s $HOME/.local/share/Steam/steamcmd/linux64/steamclient.so $HOME/.steam/sdk64/steamclient.so -
In the
tc2server/folder, run./start_dedicated_tc2.sh -nosteamclient
May need to set the following:
sudo sysctl -w kernel.apparmor_restrict_unprivileged_unconfined=0
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
Sometimes servers will get stuck in a state where they cannot start and will crash loop. In this case, launch without the -nosteamclient parameter once, wait for it to fail and exit, and then launch normally again.
On a normal desktop that runs a graphical session with Steam, you can also run a dedicated server easily.
- Open Steam.
- In Steam, install Team Fortress 2.
- In Steam, install Source SDK Base 2013 Dedicated Server.
- In Steam, install Steam Linux Runtime 3.0.
- Install Team Comtress 2 normally through the launcher.
- In the folder above
tc2/(the top-level one, not the one inside tc2/), link Source SDK Base 2013 Dedicated Server totf2ds/and link Team Fortress 2 totf2/. - In
tc2/, run./start_dedicated_tc2.sh - Steam must be running for this to work, as dependencies are checked through Steam.