Steven Benner’s Blog

Random articles about programming, computing, and the internet.

How to set up a Team Fortress 2 dedicated server on Ubuntu

Warning: This article is very old

This article was written in 2010. Things change over time. So the information presented here may no longer be current and up-to-date, or it may have even become factually inaccurate. There may be useful information here, but you should check recent sources before relying on this article.

Team Fortress 2 logo

I recently decided that I wanted to set up a dedicated server running Team Fortress 2, the very entertaining multiplayer first-person shooter game by Valve. I was pleasantly surprised at how easy it was to install and configure a server that runs exactly the way I want.

All Valve multiplayer games run off of the same base server software, Source Dedicated Server (SRCDS). They build a version for Windows, Linux and Mac so you can run it on whatever system you happen to have available. In my case I had Ubuntu 10.04 LTS, which is a great operating system for any server.

This article will give you a walk though guide for installing and configuring SRCDS on Ubuntu. I am writing specifically about TF2 here, but much of this information will apply to other Source games such as Counter Strike: Source, Left 4 Dead, and Half-Life 2: Deathmatch.

Basic server information

First off a few notes about the software:

Setting up Ubuntu

For a basic system set up walk through please use Part 1 of my guide to setting up an Ubuntu server. Everything in that article is relevant to this guide. The only thing that I should add is be sure not to run SSH on port 27015, since that is the port your Source server will be running on.

One extra step that you might want to do is to create an account for running the SRCDS process. This isn’t at all required, but it is good practice. The standard practice seems to be creating and account called “hlds” and using that account to run the process.

Also, if you’re running a good firewall (as you should be) remember to poke a hole for port 27015.

Installing Source Dedicated Server

The installation of SRCDS is handled entirely by the HLDSUpdateTool created by Valve. This simple little tool will handle the download and installation of your base Source Dedicated Server. The first step in this process is to get the HLDSUpdateTool.

wget http://www.steampowered.com/download/hldsupdatetool.bin

This will download hldsupdatetool.bin to your current directory. Next we need to give this file execute permissions and the run it.

chmod +x hldsupdatetool.bin
./hldsupdatetool.bin

This will run the tool. It will present you with a license agreement, type yes and hit ↵ Return to proceed. It will install steam into the current directory.

Now we have to run the steam client, which will check to see if it is currently up to date and download a whole bunch of updates. This will take some time.

./steam

Now that steam is up to date and ready to run we are ready to install the Team Fortress 2 server. We do this via the steam client by giving it the following command.

./steam -command update -game tf -dir .

The dot after the -dir flag tells it to install the game server based in the current directory. You can tell it to install wherever you want, but most people just install it in home directory.

If you thought the steam update took a while, you might want to find something else to do for a while, the initial install of the Team Fortress 2 server requires downloading about 3.5 gigabytes of files. This will take a lot of time.

Once it has finished downloading everything it will return you to the console. The game server has been completely installed.

Configuring your server

There are several files that you will want to edit for configuring and setting up your TF2 server. The big one is the server.cfg file located in the orangebox/tf/cfg folder. This file is where you set all of the server variables that control how your server runs.

There are literally hundreds of possible variables in SRCDS, many of which have no effect on a TF2 server. To simplify this guide I’ll provide you with a very simple sample server config file and talk about some of the more important variables. For a more complete list see the complete list.

Basic server configuration file

// General server settings
hostname "Payload/Control-Point Rotation [Fremont, CA]"
rcon_password "myunguessablepassword"
sv_password ""
sv_lan 0
sv_region 1

// game settings
mp_timelimit 30
mp_maxrounds 4
mp_winlimit 0

// voice settings
sv_voiceenable 1
sv_alltalk 0

// bandwidth rates/settings
sv_allowupload 1
sv_allowdownload 1
sv_minrate 10000
sv_maxrate 0
sv_maxupdaterate 100
sv_minupdaterate 66
sv_mincmdrate 66
sv_maxcmdrate 100

// run in pure mode
sv_pure 1
sv_pure_kick_clients 1

My server config is significantly more complicated than that, but trying to mention every possible variable that you can tinker with would be a huge article unto itself! This basic server config should be enough to get your server up and running with the best practices and and smoothest game play.

Any variable that you don’t explicitly set in the server config file will run it’s default value, which is exactly what you want for 99% of the variables.

General server settings

Most of these variables are pretty self-explanatory. The hostname is the server name that players will see in the server browser, rcon_password is the password for the remote console (make this a strong password), sv_password is the password to join the server (leave blank for a public server), and sv_lan 0 sets the server to run as an internet server (instead of a LAN server).

sv_region

The sv_region variable is quite important. This tells the master list server what region your server is running in so players can filter out servers not in their region. Here are the possible values.

CodeRegion
0US East coast
1US West coast
2South America
3Europe
4Asia
5Australia
6Middle East
7Africa
255World

Game settings

There are three variables in the game setting section, mp_timelimit, mp_maxrounds and mp_winlimit. These are easily confused and mean different things in different types of maps. They are also the ones that new admins are most likely to screw up.

mp_timelimit

The maximum time a game is allowed to be played (in minutes). This one is easy to understand, what is the longest time that you want players to be stuck on a single map? This doesn’t count in the tie-breaker or sudden death round (which defaults to 2 minutes long).

mp_maxrounds

The maximum number of “rounds” that one team can win before the server changes maps. A round is an entire game where the teams win or loose the game. For example, in a payload map a round is everything from the gates opening to the cart being pushed to the last point. In a CTF map a round is from the gates opening to the the point where the winning team has captured the intelligence three times.

mp_winlimit

This is the one that can really screw things up. How many “game points” can one team earn before the server changes the map. In CTF maps a point is 3 intel captures, in payload maps a point is earned every time the cart is pushed to a control point, or a single point is given to the defending team if the round ends without the cart reaching the end, and in control-point maps a point is earned when one team captures the final control point.

Setting this to zero (no limit) works best, especially if you have different maps in your rotation. If you set it to a real number, like 4, then you will find the server changing maps in the middle of a payload game.

Voice settings

These are again self-explanatory, sv_voiceenable is whether or not to support voice chat, and sv_alltalk defines if AllTalk is enabled. If AllTalk is set to 1 then everyone can hear everyone else, if it’s set to 0 then only team mates can hear each other over voice chat. Generally, players use voice chat for tactical information, so set this to 0 unless you have a good reason.

Running the server process (the right way)

Now that your Team Fortress 2 server is installed, configured and ready to go it’s time to start it up. You can do so by running the following command.

./srcds_run -game tf +map ctf_2fort

However, you probably want to be able to log out of your SSH session from time to time. So you will need to run SRCDS as a service. To do this we will use a shell script and the Screen utility. Screen is a command line multitasking tool that will allow you execute the process and detach it from your current session. Start by installing screen.

sudo aptitude install screen

Now we’re going to create a script called srcds in the /etc/init.d folder that will let you start, restart and stop the server with a very simple command.

sudo nano /etc/init.d/srcds

Now paste the following script in the text editor. I cannot take credit for this script, but it works well. I got this script from the Linux SRCDS server article on FreeNerd.net. It’s worth a read since it covers a couple things I wont bother with in this article.

# replace <newuser> with the user you created above
SRCDS_USER="<newuser>"

# Do not change this path
PATH=/bin:/usr/bin:/sbin:/usr/sbin

# The path to the game you want to host. example = /home/newuser/dod
DIR=/home/orangebox
DAEMON=$DIR/srcds_run

# Change all PARAMS to your needs.
PARAMS="-game tf +map pl_badwater"
NAME=SRCDS
DESC="source dedicated server"

case "$1" in
	start)
		echo "Starting $DESC: $NAME"
		if [ -e $DIR ]; then
			cd $DIR
			su $SRCDS_USER -l -c "screen -d -m -S $NAME $DAEMON $PARAMS"
		else
			echo "No such directory: $DIR!"
		fi
		;;

	stop)
		if screen -ls |grep $NAME; then
			echo -n "Stopping $DESC: $NAME"
			kill `screen -ls |grep $NAME |awk -F . '{print $1}'|awk '{print $1}'`
			echo " ... done."
		else
			echo "Couldn't find a running $DESC"
		fi
		;;

	restart)
		if screen -ls |grep $NAME; then
			echo -n "Stopping $DESC: $NAME"
			kill `screen -ls |grep $NAME |awk -F . '{print $1}'|awk '{print $1}'`
			echo " ... done."
		else
			echo "Couldn't find a running $DESC"
		fi
		echo -n "Starting $DESC: $NAME"
		cd $DIR
		screen -d -m -S $NAME $DAEMON $PARAMS
		echo " ... done."
		;;

	status)
		# Check whether there's a "srcds" process
		ps aux | grep -v grep | grep srcds_r > /dev/null
		CHECK=$?
		[ $CHECK -eq 0 ] && echo "SRCDS is UP" || echo "SRCDS is DOWN"
		;;

	*)
		echo "Usage: $0 {start|stop|status|restart}"
		exit 1
		;;
esac

exit 0

UPDATE: I have created a repository for this script on GitHub. Please check there for the latest version. I would also appreciate it if you would submit issues and pull requests to help improve it!

The highlighted lines are the important ones that you will need to modify. As the instructions say, replace <newuser> with the username that you will be running the service as. This will probably be your username unless you have taken the time to setup a “hlds” user (a good idea).

The SRCDS_USER variable is the appropriate username, the DIR variable needs to be the path to the orangebox folder and the PARAMS variable are the parameters that will be used when running the server.

Once you have added this script save it by pressing Ctrl+X (quit nano) and then Y to save changes.

You can now control the server via the following commands:

/etc/init.d/srcds start
/etc/init.d/srcds restart
/etc/init.d/srcds stop

Depending on your setup you may need to sudo these.

Installing mods

For the most part, I do not recommend installing any game-play mods. Aside from the massive headaches and maintenance issues with outdated mods breaking servers (especially after game updates), Valve put a lot of thought in to TF2 game pacing and balance, and judging by their wild success they seem to have gotten it right. So, if it ain’t broke don’t fix it.

However, the RCON admin system is just plain bad. As a TF2 server admin you will at the very least want to run SourceMod. This SRCDS add-on is a great administration tool and framework for other mods, you will find it to be an invaluable tool for managing your TF2 server.

SourceMod itself is a mod for the SRCDS mod framework Metamod:Source. So we will have to install that before anything else. This is pretty simple, just download the package and extract the contents to your game directory (orangebox/tf). This will add metamod to the addons folder. Metamod does not really require any configuration, once you have the files in the correct location it’s ready to go.

For a slightly more detailed walk-through check out the official guide: Installing Metamod:Source.

Now you just need to install SourceMod on top of Metamod:Source. This is the same basic process, download the archive and extract the files you your orangebox/tf game directory. You should read the official guide for this as well: Installing SourceMod.

Once you have all of the files in their correct locations then you have successfully installed SourceMod, the base admin tool and the framework for any other mod you could ever want. Restart the server and it should all be up and running.

Adding SourceMod admins

Before you start adding mods you should add yourself (and anyone else you want) as a SourceMod admin. This is quite easy. I personally use Steam IDs to authenticate people as administrators, this is reasonably secure so long as you are running the server with Steam enabled (which you should be).

Start by grabbing your Steam ID. You can easily get the Steam ID of anyone you want from the Steam ID Finder if you know their name.

Now add them to the admin file. Open up orangebox/tf/addons/sourcemod/configs/admins_simple.ini and add the following to the end of the file:

"STEAM_0:1:1234567"    "99:z"

Of course replace the Steam ID with your real Steam ID. This will grant the person with this Steam ID all admin permissions with an immunity value of 99. The next time you join the server you will be able to use the sm_admin command in the console which will bring up a simple little admin menu in-game. You will also be able to use any other the other Admin Commands.

It’s that simple, but it can get as complicated as you want. For more information on the admin format read the Adding Admins guide.

Adding mods/add-ons/plugins

The AlliedModders forums have basically every mod in existence. It would take another full article to explain the important ones and walk you though configuration, so I’ll just provide you with the basics.

Browse the SourceMod Approved Plugins forum for mod you want to install. The thread will have all of the information you need to configure the mod.

Once you’ve found a mod you want download the mod and install the files in the appropriate locations. Generally the smx files belong in the orangebox/tf/addons/sourcemod/plugins folder and the configuration files belong in the orangebox/tf/addons/sourcemod/configs folder.

Creating a MOTD

The Message of the Day (MOTD) is the intro chalkboard screen you see when you join a server. It is an HTML document that runs in WebKit, so you can do just about anything you like here. Personally, I find the chalkboard look to be the most professional looking MOTD.

TF2 MOTD

The Message of the Day page is located in the orangebox/tf folder as motd.txt. Here you can create your HTML page that will be shown to players who join your server.

I’m not going to try to teach you HTML or CSS, so I’ll simply provide you with the markup for a simple Message of the Day sample page.

Example page markup

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>Welcome to the Server</title>
	<style type="text/css">
		html, body {
			height: 100%;
			margin: 0;
			padding: 0;
			overflow: hidden;
			color: #ECECEC;
			font-family: Verdana;
		}
		img#bg {
			position: fixed;
			top: 0;
			left: 0;
			width: 100%;
			height: 100%;
		}
		#content {
			position: relative;
			z-index: 1;
			margin: 0 auto;
		}
	</style>
</head>
<body>
	<img src="https://stevenbenner.com/misc/blackboard.png" id="bg" />
	<div id="content">
		<h1>My TF2 Server</h1>
		<p>
			Welcome to my Team Fortress 2 server.
		</p>
	</div>
</body>
</html>

This is a very basic MOTD screen. I don’t remember where I got the blackboard graphic, but kudos to whoever did it because it works on just about every resolution. Replace the “Welcome to My Team Fortress 2 server” text with whatever you want.

For more advanced layout you’re going to have to learn some HTML and CSS, Google is your best friend here. Don’t get too crazy though, if your MOTD is too long then no one will read it.

Updating your server

You will have to occasionally update the server software, whenever Valve releases updates to Steam or the game itself. This is a very simple task, in fact you’ve already done it before. We will be running the same two commands that we used to install the server.

The first thing you need to do is shut down the SRCDS process.

/etc/init.d/srcds stop

Next you’ll want to execute the Steam software, which will automatically check for updates, and update itself if it needs to.

./steam

Now you’ll need to have SRCDS check for TF2 updates.

./steam -command update -game tf -dir .

That’s it! Your Steam software and TF2 server software have been fully updated. Now you can start the SRCDS process again and get back to gaming.

/etc/init.d/srcds start

You’re server is now up and running with the latest updates.

Attracting players

This is a tough topic to address, getting players to join your new server can be very difficult, and frankly random. I don’t have a recipe for success to offer you because there just isn’t one. But here are some of the top things that will make your server more desirable to other TF2 players.

TF2 Server Browser

Finding admins

It is a simple fact, you cannot be on your server 24/7/365. You can make the server more self-sufficient with mods, but you will need other admins to help keep the peace and kick/ban offensive players. I can’t really help you find admins, but I can give some some bullet points to think about.

Basically, be careful about giving out the admin role. Get to know someone (over voice chat) before you offer them an admin role. Good admins will be the single greatest addition to your server, bad admins will spell irrevocable doom.

Conclusion

It’s quite easy to setup a Team Fortress 2 server and keep it running. The hardest and most expensive part will be finding the right host or paying for the colocation at the right data center. If your server takes off and becomes successful you will be able to enjoy a gaming experience custom suited to your tastes. If you’re really lucky you can even offset the costs with donations.

If you’re planning on setting up your own TF2 server then hopefully this article has offered some helpful information and give you some food for thought. If you have any questions please leave a comment below and I’ll respond back asap.

Comments

Hobatter’s avatar Hobatter

A good base start for the TF2 install.
Running TF2 as a service is a bit more in depth than described. For admins wanting this you may want to read how to use screen before you try. I could not get this to work on Maverick

Also your Ubuntu setup guide does not tell a user to install & configure the FTP server so you can add sourcemod which is a must to admin the TF2 server. Ubuntu you would
sudo apt get-install sftpd
You will then have to edit the vsftpd.conf file and remove the # from the line to allow uploading. Not going into details on how because that is a tutorial of its own. Just a note

Good job.

Random tech dude’s avatar Random tech dude

@Hobatter if you use any kind of decent SSH server (OpenSSH etc) to manage your box, you will know that they come with SFTP included which is very handy and fast. Plus you can install sourcemod by only using console commands, no FTP is really needed.

For more info http://en.wikipedia.org/wiki/Secure_Shell

Hobatter’s avatar Hobatter

I use Putty generally to administer from a remote pc/netbook and was trying to get the point across about no detail in the FTP transfer (by default uploading is disabled in Ubuntu) and know of no Ubuntu package for sourcemod. You can directly download sourcemod/metamod but in most of the instructions I see they say to extract it first from the compressed file then upload. In the article is says it is fairly easy. I would argue that for anyone with limited Linux experience. I came across this looking for how to run TF2 as a service and still had no luck. I have 10.4 and 10.10 loaded on 2 servers and both give me invalid command when I run
sudo /etc/init.d/srcds start
/etc/init.d/srcds start gives me premission errors
I have tried to load this using a root account and a user account.

FreeNerd’s avatar FreeNerd

Hello.

I am the gamer/nerd who wrote the guide on freenerd.net. I don’t own freenerd.com which is what your article states after the link. The link is to the correct site, but the comment after of .com will point users to a website I don’t control or own and they want a FORTUNE for.

Glad you found the guide useful.

I am working on a linux COD4 guide currently. I have the server online and am in the process of running back over the steps taken to document the process.

Check it out if you are a COD4 player, Friendly Fire Shire is the name of it.

IJ’s avatar IJ

A couple of things:

:Have a good ping (>50ms)

Don’t you mean “50ms” means “greater than 50 milliseconds”.

If you’re using 64-bit Ubuntu like I am, you also need to do the following:

# apt-get install libc6-i386

(I don’t use sudo, and please don’t preach to me about it.)

However, if you are intent on sticking with 32-bit and you have 64-bit-capable hardware, you’re probably better served if you went 64-bit. This is especially true if you do other things on that machine or you want to install a lot of memory (>=4GB). 32-bit processors can only address 4GB of RAM, 3GB of it comfortably (certain segments are reserved for items such as video memory and the iike). Even with PAE (Physical Address Extension) enabled, it still has to jump through hoops to use the additional memory.

–IJ.

nitramneb’s avatar nitramneb

Hi Steve
I have been having the same trouble as Hobatter

sudo /etc/init.d/srcds start

gives me
command not found.

Which is strange the file is defiantly in the directory I can see it in GUI and can do an LS in putty in the directory and see it as well.

A friend of mine says it may be the permissions?? (i’m sure we gave the account full permission) or the type of file the GUI identifies it as a plain txt document everything else is ssh

nitramneb’s avatar nitramneb

Solved it with

sudo chmod a+x /etc/init.d/srcds

cralor’s avatar cralor

nitramneb has a great tip!

This fixed the permission issues I was having with 10.10!

Thanks for the guide!

Eric Reinsmidt’s avatar Eric Reinsmidt

Just a heads up. There is a typo in the ‘srcds’ script. Nothing major, but when you grep for when the process is running you need to look for ‘srcds_r’ not ‘hlds_r’ in this line:

ps aux | grep -v grep | grep hlds_r > /dev/null

otherwise it shows the service as always down.

Thanks for the succint intro on setting up a server. I had my home TF2 server up and running in just a couple of hours!

GUANCH3’s avatar GUANCH3

very good tutorial, the best that I have read the tf2

Ape’s avatar Ape

The init.d script in this tutorial starts 2 instances of SRCDS. It needs to be updated.

John Machacek’s avatar John Machacek

Ape – I had the issue as well, I am no expert but my solution was to comment ‘#’ out line 19

replace ” screen -d -m -S $NAME $DAEMON $PARAMS ” with “# screen -d -m -S $NAME $DAEMON $PARAMS ” and I no longer have 2 instances.

Steven – This is an AWESOME resource, thank you for taking the time to put this together!

Justin’s avatar Justin

I’m getting a syntax error when I try to start the script.

12: Syntax error: word unexpectd (expecting “in”)

Mine line 12 reads exactly as shown on this page.

Jackson’s avatar Jackson

Fantastic guide! Everything is working flawlessly. Thanks so much.

avin’s avatar avin

when I sudo /etc/init.d/srcds1, it open 2 screen for me? (screen -ls). is this nomal?

cyrozap’s avatar cyrozap

@John Machacek

Thank you! I was wondering why there were two instances running…

@avin

See John Machacek’s response to Ape.

avin’s avatar avin

@Cyrozap, Yaaa. Is working thanks
@Ape, Thanks to you. :)

Andrew’s avatar Andrew

This is great! Thanks for the awesome guide!
I’m having a couple of issues with it though. The first is that when I use “screen -r SRCDS” and then detach the screen once I’m done (using ctrl-a d) if I try to stop the server the script can’t find the screen even though it appears in “screens -ls” as “.SRCDS”. I’m not sure whats happening there. The other is that on start up the server doesn’t run. I know that my user can’t use the “su” command which is used in the script. Can I change the script to use sudo instead or are there any other fixes?

Todd’s avatar Todd

I am trying to transition to Linux from windows. I have a couple questions.

1. Does running srcds as a service restart the service if it locks up?
2. I also would like to know how to autoupdate in linux.

Andrew’s avatar Andrew

To autoupdate in Linux, put -autoupdate somewhere in the terminal command that you use to start your server. There’s a YouTube video that shows this as well.

My questions are 1) If I made changes to my server.cfg file and want them to go into immediate effect, do I have to stop the server or is there something fancy I can do to “restart” it so to speak?

Sindre’s avatar Sindre

Just a tip for saving time;
instead of running
/etc/init.d/srcds (start/stop/restart)
you can just run
service srcds (start/stop/restart)

also, if you get “command not found” you’ll need to run:
sudo chmod +x /etc/init.d/srcds
to make it executable :)

Otherwise, very nice tutorial, it helped me alot. :)

Mike’s avatar Mike

Has anyone tried this in 2012 (the instructions on this page are from 2010)?

I’m at this step:

$ ./srcds_run -game tf +map ctf_2fort
and it returns a lot of error messages:

Network: IP 10.222.156.24, mode MP, dedicated Yes, ports 27015 SV / 27005 CL
Failed to load $include VMT file (materials/TILE/FLOOR_TILE_001A.vmt)
Failed to load $include VMT file (materials/TILE/FLOOR_TILE_001A.vmt)
Failed to load $include VMT file (materials/TILE/FLOOR_TILE_001A.vmt)
Failed to load $include VMT file (materials/TILE/FLOOR_TILE_001A.vmt)
…etc and then ends on
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
‘server.cfg’ not present; not executing.
‘ctf_2fort.cfg’ not present; not executing.
Connection to Steam servers successful.
Public IP is 99.111.39.126.
Assigned anonymous gameserver Steam ID [A-1:987911168(2997)].
VAC secure mode is activated.
Connection to game coordinator established.
Current item schema is up-to-date with version 6C7F42A0.
tf_server_identity_account_id not set; not logging into registered account

Any idea on what’s going on or what I should do?

J’s avatar J

I found this to work better:

#Daemon Name = SRCDS
# replace with the user you created above
SRCDS_USER=””
# Do not change this path
PATH=/bin:/usr/bin:/sbin:/usr/sbin
# The path to the game you want to host. example = /home/newuser/dod
DIR=/home//tf2/orangebox/
DAEMON=$DIR/srcds_run
# Change all PARAMS to your needs.
PARAMS=”-console -game tf +map ctf_2fort -maxplayers 30 -autoupdate”
NAME=SRCDS
DESC=”source dedicated server”
case “$1” in
start)
echo “Starting $DESC: $NAME”
if [ -e $DIR ];
then
cd $DIR
su $SRCDS_USER -l -c “screen -d -m -S $NAME $DAEMON $PARAMS”
else echo “No such directory: $DIR!”
fi
;;
stop)
if su $SRCDS_USER -l -c “screen -ls |grep $NAME”
then
echo -n “Stopping $DESC: $NAME”
su $SRCDS_USER -l -c “screen -S SRCDS -X quit ” #This kills the screen (SRCDS) and server process.
echo ” … done.”
else
echo “Couldn’t find a running $DESC”
fi
;;
restart)
if su $SRCDS_USER -l -c “screen -ls |grep $NAME”
then
echo -n “Stopping $DESC: $NAME”
su $SRCDS_USER -l -c “screen -S SRCDS -X quit ”
echo ” … done.”
else
echo “Couldn’t find a running $DESC”
fi
echo -n “Starting $DESC: $NAME”
cd $DIR
su $SRCDS_USER -l -c “screen -d -m -S $NAME $DAEMON $PARAMS” #This kills the screen (SRCDS) and server process.
echo ” … done.”
;;
status)
# Check whether there’s a “srcds” process
ps aux | grep -v grep | grep srcds_r > /dev/null
CHECK=$?
[ $CHECK -eq 0 ] && echo “SRCDS is UP” || echo “SRCDS is DOWN”
;;
*)
echo “Usage: $0 {start|stop|status|restart}”
exit 1
;;
esac
exit 0

Josh’s avatar Josh

How do I edit config.cfg?

Also, I can’t find config.cfg!

Here’s the files in /orangebox/tf/cfg

root@10004:~/orangebox/tf/cfg# ls
360controller.cfg heavyweapons.cfg sfm_defaultanimationgroups.txt
chapter1.cfg medic.cfg sniper.cfg
chapter2.cfg mtp.cfg soldier.cfg
chapter3.cfg pyro.cfg spy.cfg
config.360.cfg replay.cfg undo360controller.cfg
config_arena.cfg replay_ftp.cfg user_default.scr
config_default.cfg replay_local_http.cfg valve.rc
demoman.cfg scout.cfg
engineer.cfg settings_default.scr

White Light’s avatar White Light

Is there a way to possibly make it so that I can execute a server command while still using screen? I know that if I run the server software normally, I can input commands directly into the server, but with screen I can’t do that anymore. How could I do this without having to restart the server?

tweak’s avatar tweak

you need to resume your screen session
do the following
screen -ls (look for your screen session)
screen -r [the name or your session]

tweak’s avatar tweak

Also I also do not have the server.cfg file did they change things with the pyro patch?

Bojidar’s avatar Bojidar

I don’t have the addons folder

theREALsaxtonHALE’s avatar theREALsaxtonHALE

Nice guide but Outdated source dedicated server is broken (I think this occurred in the 2012 halloween update) and doesn’t work anymore. You can still run a dedicated server but now it’s more complicated and will not be on the public/online server list.

Adrian’s avatar Adrian

Hello

I started my server with the user account tf2server and I wrote /etc/init.d/srcds start. PuTTY then writes the following: “Starting source dedicated server: SRCDS” I have to type in my Password for the tf2server user. After I typed it and pressed return, nothing more happens. The server is running, but how can I use the tf2 server console, e.g. for using “meta list” for checking if the metamod and the sourcemod plugins are running? And shouldn’t there be more things written in the PuTTY console?

Drew’s avatar Drew

Just got one started at the college I was at with a few of my friends. What happened after was the best fun that I have ever had in college. Stayed up the whole night playing with a group of friends.

Lapiz’s avatar Lapiz

Hey I was looking for a picture of the TF2 Chalkboard by itself, and I wanted to use it as a background for my webpage. I did not want to steal anyone’s work, so I clicked on it and it brought me here. I was wondering if this image is subject to copy right, and if it is not can I use it for my Web Page?

Lapiz’s avatar Lapiz

this is the link to the photo https://www.google.com/search?sa=G&hl=en&q=tf2+plain+background&tbm=isch&tbs=simg:CAQSlQEJfDB2lKmawLAaiQELEKjU2AQaBAgUCAMMCxCwjKcIGmAKXggDEiY4lQY3mQGaEtkMjhKCGNQHmRLWKOUn1yifN4gn4CGsNuo36yeeNxowH77wj-uX8MqiycclBjscLiIkEu130RY2-5xok3yJv9JaVPOLVACthrnCZ8vhhvtRIAQMCxCOrv4IGgoKCAgBEgTj0jQCDA&ved=0ahUKEwinmI7r75LbAhWm34MKHfKNCrIQwg4IJigA&biw=1920&bih=1012#imgrc=fDB2lKmawLBijM:

Sam’s avatar Sam

Nice