My first blog in ages, and possibly my most uninteresting I’ve ever posted (for almost anyone), however, I’m hoping they’ll be a niche that will find this post useful. After discussing with someone on the Steam Official Forums how not straight forward it is to set up a Team Fortress 2 listen server for public play, and how there are no instructions on the internet, I’ve decided to put together this guide.

Step One – Consider your bandwidth

A TF2 server needs to kick out around 6 – 10 KBps to each client playing on that server. This means that if you have a 256kbps upload (common in the UK) you’re only going to be able to host 3/4 players max, before it starts getting seriously uncomfortable. If you want to host for more than this, you might want to consider a gaming host – I would recommend Gibsworld.

Step Two – Configuring your router

So you’ve decided you still want to go ahead? Maybe you just want to farm some achievements with a few friends? To play behind a router, you need to forward the appropriate ports to your PC. How to do this type of port forwarding is extensively covered on many websites all over the internet, so I won’t go into it here. I can tell you though, you’ll need to forward UDP 27015.

Step Three – Running the server

Run TF2 normally through Steam. Once the menu loads, choose ‘Create Server’. On the first tab, you can choose a map, but don’t bother, as we’ll be changing it later. On the second tab, you can set up max players (like I said, I recommend 4) and the server name. Once you’ve done that, click ‘Create’.

Step Four – Configuring for public play

Once your server has loaded, open up the console. You’ll need to enable this in the Advanced options under Keyboard set up. You can then access it using the ` button (next to 1 key). Type in ’sv_lan 0′ without the quotes. This tells your server to accept connections from people outside of the subnet 192.168.x.x. Now this is the crucial step. In other Source games, such as CS:S or HL:Deathmatch your server would now work, however, in TF2 you need to invoke a map change. Do this now, by typing ‘map <map of your choice>’ into the console.

If you look in the console, you’ll see after the map change it reports that it connects to the steam servers, and is now VAC secure.

That’s it! Your server is now able to accept connections from the public, and with your ports forwarded correctly clients should be able to connect. To invite people to connect, tell them to type ‘connect <your external ip>:27015′ into the console. You can get your external ip here. They should connect without any problems.

(Optional) Step 5 – Getting your server listed

So your friends are noobs and can’t use the console? Fine, but be prepared for anyone to be able to join your server.

Once you’ve set your server to sv_lan 0, find out your external ip, and then type ip <external ip> into the console. Then invoke a map change as before. Your server should now be listed with all the others, and people should be able to connect to your game via Steam Friends. You may want to set sv_password though, to restrict access.

(Optional) Step 6 – Automagic

Sick and tired of all this typing huh? Ok, ok, we’ll set it up to be automatic.Go to Steam\steamapps\paranoiapersonified\team fortress 2\tf\cfg and create a file called listenserver.cfg. Edit it with notepad, and type:

//Listen server config

hostname “Server name here”
sv_lan 0
sv_password “choose password”
ip <external ip> //note, you’re external ip changes… only add this if you have a static ip from your ISP!
map <map of choice>

Now, when you load your server, your settings will be applied automatically, however, you will need to set ip, and then invoke another map change. You can also add other settings to listenserver.cfg, such as respawn timers etc.

Happy Gaming – hope this guide works!

25 Comments

  1. eddie lenton says:

    You are a fucking god send! Trawling through the vast wastelands of the internet and support forums I could not anything about why my TF2 listen server wouldn’t work. All because you have to change the map first. Thanks alot Valve. So very glad you posted this today and not tomorrow. Cheers

  2. Paranoia says:

    Glad it helped – and thanks for taking the time to comment.

  3. DrMack says:

    I have to say, this worked like a charm. Much appreciated to have someone take the time to post information well needed. I did notice though that when you host your own server from behind a router, XFIRE will show a completely different IP address than the one you’ve placed in your listenserver.cfg.
    I also have a question , is there a way to run this as a dedicated server only using a one icon option on the desktop like many other games out there? Or does Steam eliminate that option by forcing us to go through the Steam engine…just curious.

  4. Paranoia says:

    Don’t have much knowledge of running a dedicated server myself, rather than the listen server, but I believe it’s possible with srcds.exe (Source Dedicated Server), but also, as far as I know, you’ll need an extra license to use this. (i.e. your key can only be used to either play or host – not both).

  5. Humbug says:

    A little pointer on srcds.

    You do not require an extra licence to setup a dedicated server as this if freely supplied by Valve software.

    Infact is is free to host a dedicated server for all Valve Source games as it’s just a command line switch to say what server you want to install

    so for tf2 it would be…

    c:\hldsupdatetool.exe -command update -game tf -dir c:\tf2

    obviously change your directories and drives as needed. You will also need to download the hldsupatetool.

    then to run the tf2 server :

    c:\tf2\orangebox\srcds.exe -console -game TF -tickrate 66 -ip xx.xx.xx.xx -port xxxx +maxplayers 24 +map cp_badlands

    hope this helps :)

    srcds.com is a great source of information for a new hoster.

  6. The Cool Side of the Pillow says:

    This guide didn’t help me. Forwarded ports, set the right commands, etc; listen server for TF2 still fails to be recognized by clients.

  7. Farquad says:

    Wow!
    Can’t beleive this is so simple, i have tried forever to make a server THANK YOU SOOOOOO OOOOOOO O OOOOOO MUCH!

  8. mensaap says:

    Thank you

    didn’t know about the ip command, very helpfull

  9. Yammy says:

    Hey, thanks for the guide! Mine still isn’t working though..
    I’m pretty sure I did everything listed, and I can run the server, as in, I can start the game, and i can play, but people can’t join!
    Yes, I did “sv_lan 0″ and I changed map, but my friends get either “Bad server” , “Cannot connect” or “Cannot connect after 4 tries.”
    Any idea what’s going on? Any help will be appreciated, thanks!

  10. Paranoia says:

    Sounds like they can’t see your server. Either, you don’t have ports forwarded correctly, or a software firewall is blocking the incoming connections. To start, I’d disable your firewall temporarily, and see if they can connect then.

  11. Yammy says:

    Right, right , thanks! I’ll try that later. Thanks for all the help!

  12. Iragnox says:

    I’ve got the same problem Pillow has, did all the things you listed and people still keep getting “Server Not Responding.”

    Quite oblivious to what it is that’s stopping it from working.
    Also if anyone has extensive knowledge on how to set up a Dedicated server I am quite interested in learning that aswell, although I’ve no idea how HLDSUpdateTools work so would need my hand held through it all.

    Either way, cheers, and gj on a usefull post, shame it’s not worked for me though.

  13. Bob says:

    Do you need a static ip for step 5?

  14. Paranoia says:

    Bob, you don’t need a static IP for this step. Your IP won’t change while you are connected to the internet, so it won’t change while your server is running.

    You will probably find changes to your ip are quite rare, but if it does change, you’ll just need to make sure you use the correct IP when you next run your server.

  15. mikeZ says:

    ok so im very glad i found this server but i have a few problems (since im just 12 struggling to create server for me and my friend to have duel) do i have to do anything with the port???if so then how?sry bcuz im still newb in this.

  16. Paranoia says:

    If you’re behind a router mikeZ, you will need to forward port 27015, as instructed in Step Two.

  17. Idea says:

    Hey, I just wanted to say thanks for this. Probably referenced it 5 times by now and it’s worked every time (Yeah, I probably should either memorize it or do the listenserver.cfg :P) Brilliant guide.

  18. Paranoia says:

    Cheers, glad the steps work for you.

  19. Michel says:

    Thanks a lot man!
    I finally can have my own server on the server browser.

    After all these years..sniff

  20. Matt says:

    i was only able to get this working once after a major update.

    since then my servers are only listed under the ‘lan’ tab with my local ip as my ip address. (192.168.1.88)

    very confused about this, seeing as i didn’t actually do anything differently when it worked the one time.

    it was right after a major update, and my server flooded with people. now i can’t get it running at all. very confused.

    the ip “my ip” command changes nothing.

    also, when it was working it managed to lock up my router several times.

  21. Matt says:

    ok. got it working, but it still locks up my router after a few minutes. i have to reset everything to get back onto the internet. weird.

  22. The Mad Duck says:

    Almost everything seems to be working, but one of my friends tried to connect to the server with the command “connect 84.202.237.76:27015″ but it stopped on the connecting screen and he got a message saying “Connection failed after 4 retries”.

    Please help.

  23. Paranoia says:

    that’s a symptom that your friends computer cannot see yours. Make sure the ports are forwarded on your router (if your behind one).

    You could also try asking your friend to run > cmd > ping 84.202.237.76 and see if their is a response from your computer.

    Definitely sounds like a router/firewall issue.

  24. Mentin says:

    Hi ty for the guide,i have created my own map and i putted in “C:\ programe files\steam\mentin002\team fortress 2\tfc\maps” but i cant load it when i go on Team fortress 2, do you know why… Plz help me i’m only 13 years old and not the best to computer ^^

  25. Paranoia says:

    The directory should be \Steam\steamapps\username\team fortress 2\tf\maps but I guess that’s what you meant.

    If you made your own map, you need to make sure it is compiled (that is, in .bsp format). Hammer should give you some options to compile.

Leave a Reply