Installing Team Fortress 2 Dedicated Server

info:Download steam-boiler to install steam and boiler.
author:Erik Southworth
version:49.1
revision:September 08, 2012
description:Linux Reference Manual

Typical Installation in 3 Easy Steps

Assuming you have installed Steam-Boiler and have logged in to a normal user account. The following shell session demonstrates how a typical installation is accomplished. Open a shell terminal and follow these steps.

1. Make directory (if required) and change directory to where user gameserver downloads are to be stored. Here we call it ‘Gameserver’.

  • $ mkdir -pv ~/Gameserver/tf-ds
  • $ cd ~/Gameserver
[~]$ mkdir -pv ~/Gameserver/tf-ds
mkdir: created directory `/home/user/Gameserver'
mkdir: created directory `/home/user/Gameserver/tf-ds'
[~]$ cd ~/Gameserver
[Gameserver]$
  1. Download dedicated server files from Valve content servers.
  • $ steam -command update -game tf -dir tf-ds
[Gameserver]$ steam -command update -game tf -dir tf-ds
+ ionice -c 3 steam -command update -game tf -dir /home/user/Gameserver/tf-ds/
Checking bootstrapper version ...
Updating Installation
Determining which depot(s) to install/update...
6 depot(s) will be installed/updated
  0:01 Checking local files and building download list for depot 441 'Team Fortress 2 Content' version 356
  0:01     Connecting content server session for version 356
  0:01     [63.149.72.158:27030] Connecting...
  0:01     [63.149.72.158:27030] Connection established; handshaking...
  0:01     [63.149.72.158:27030] Sending login message...
  0:02     Fetching version 356 manifest
  0:04     Reading version 356 checksum table
  0:07     Fetching exclude list
  0:07     Calculating download size
  0:07     15746 file(s) totaling 5179866451 bytes will be downloaded
  0:07 Checking local files and building download list for depot 442 'Team Fortress 2 Materials' version 196
  0:07     Connecting content server session for version 196
  0:08     [63.149.72.158:27030] Reusing connection
  0:08     [63.149.72.158:27030] Sending login message...
  0:08     Fetching version 196 manifest
  0:09     Reading version 196 checksum table
  0:10     Fetching exclude list
  0:10     Calculating download size
  0:10     23269 file(s) totaling 791357863 bytes will be downloaded
  0:10 Checking local files and building download list for depot 206 'Source Materials' version 8
  0:10     Connecting content server session for version 8
  0:10     [63.149.72.158:27030] Reusing connection
  0:10     [63.149.72.158:27030] Sending login message...
  0:11     Fetching version 8 manifest
  0:11     Reading version 8 checksum table
  0:12     Fetching exclude list
  0:12     Calculating download size
  0:12     4414 file(s) totaling 948694 bytes will be downloaded
  0:12 Checking local files and building download list for depot 207 'Source Models' version 4
  0:12     Connecting content server session for version 4
  0:13     [63.149.72.158:27030] Reusing connection
  0:13     [63.149.72.158:27030] Sending login message...
  0:13     Fetching version 4 manifest
  0:14     Reading version 4 checksum table
  0:15     Fetching exclude list
  0:15     Calculating download size
  0:15     8145 file(s) totaling 241484008 bytes will be downloaded
  0:15 Checking local files and building download list for depot 208 'Source Sounds' version 4
  0:15     Connecting content server session for version 4
  0:15     [63.149.72.158:27030] Reusing connection
  0:15     [63.149.72.158:27030] Sending login message...
  0:16     Fetching version 4 manifest
  0:16     Reading version 4 checksum table
  0:16     Fetching exclude list
  0:16     Calculating download size
  0:17     5514 file(s) totaling 995522479 bytes will be downloaded
  0:17 Checking local files and building download list for depot 314 'OB Linux Dedicated Server' version 179
  0:17     Connecting content server session for version 179
  0:17     [63.149.72.158:27030] Reusing connection
  0:17     [63.149.72.158:27030] Sending login message...
  0:17     Fetching version 179 manifest
  0:17     Reading version 179 checksum table
  0:17     Calculating download size
  0:17     65 file(s) totaling 42905559 bytes will be downloaded

  0:17 Checking/Installing 'Team Fortress 2 Content' version 356

  0:18 [63.149.72.158:27030] Reusing connection
  0:18 [63.149.72.158:27030] Sending login message...

  79:34    100.00%  downloading /home/user/Gameserver/tf-ds//orangebox/libcurl.so.4
  79:34    100.00%  downloading /home/user/Gameserver/tf-ds//orangebox/libcurl.so.4.2.0
  79:34    100.00%  downloading /home/user/Gameserver/tf-ds//orangebox/srcds_linux
  79:34    100.00%  downloading /home/user/Gameserver/tf-ds//orangebox/srcds_run
  79:34 [63.149.72.158:27030] Disconnecting
HLDS installation up to date


+ Checking steam symlink in /home/user/Gameserver/tf-ds/orangebox ...       missing
+ Creating symlink /home/user/Gameserver/tf-ds/orangebox/steam -> `/usr/local/bin/steam'

Tip

Using Steam-Boiler simplifies the command-line to steam update tf tf-ds instead of steam -command update -game tf -dir tf-ds.

3. Change directory to where the run-script is located and test the dedicated server.

  • $ cd ~/Gameserver/tf-ds/orangebox
  • $ ./srcds_run -game tf +map tr_dustbowl +ip 0.0.0.0
[Gameserver]$ cd ~/Gameserver/tf-ds/orangebox
[orangebox]$ ./srcds_run -game tf +map tr_dustbowl +ip 0.0.0.0
Auto detecting CPU
Using default binary: ./srcds_linux
Server will auto-restart if there is a crash.
Using breakpad minidump system
Using breakpad crash handler

Console initialized.
Game.dll loaded for "Team Fortress"
Setting breakpad minidump AppID = 440
Forcing breakpad minidump interfaces to load
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
Installing breakpad exception handler for appid(440)/version(5051)
Particles: Missing 'particles/error.pcf'
maxplayers set to 24
No '-replayserverdir' parameter found - using default replay folder.
Replay: Creating thread pool...succeeded.
Replay: Starting thread pool with 4 threads...succeeded.
Cleaning files from temp dir, "/home/user/Gameserver/tf-ds/orangebox/tf/replay/server/tmp/" ...no files removed.
Unknown command "r_decal_cullsize"
Unknown command "startupmenu"
Network: IP 0.0.0.0, mode MP, dedicated Yes, ports 27015 SV / 27005 CL
ConVarRef room_type doesn't point to an existing ConVar
Executing dedicated server config file server.cfg
Initializing Steam libraries for secure Internet server
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
Logging into anonymous gameserver account.
'server.cfg' not present; not executing.
'tr_dustbowl.cfg' not present; not executing.
Sending CMsgGameServerMatchmakingStatus (state=ServerMatchmakingState_NOT_PARTICIPATING)
Connection to Steam servers successful.
Assigned anonymous gameserver Steam ID [A-1:1790318595(3079)].
VAC secure mode is activated.
Connection to game coordinator established.
Current item schema is up-to-date with version 8ED7AC8A.
tf_server_identity_account_id not set; not logging into registered account

Use CTRL-C to exit...

Hint

srcds_run also accepts some other, not widely useful, options. Run ./srcds_run -help for more details. All command-line options are passed through to the gameserver binary. Server cvars are specified on the command-line using the notation +CVAR VALUE. (i.e. +map de_dust)

Important

The +IP specified is normally within the local network range 192.168.xxx.xxx for underground (cable/DSL) hosted servers or wildcard 0.0.0.0 for all available interfaces. (i.e. +ip 192.168.1.15)

Table Of Contents

Previous topic

Installing Half-Life 2 DeathMatch Dedicated Server

Next topic

Logging Console Output