Go Back   Steam Users' Forums > Dedicated Server Discussions > Source DS (Linux)

Reply
 
Thread Tools Display Modes
Old 11-07-2008, 12:33 PM   #1
Slyguy42o
 
Join Date: Jul 2003
Reputation: 4
Posts: 491
L4D Dedicated server guide

Hey everyone!

There has been alot of info flying around about L4D dedicated servers and I wanted to try and compile it all into a single thread.

Installation
------------------------------------------------

Left 4 Dead servers are more or less the same as any other source based game server, for the finer details on getting the update tool see here

http://www.srcds.com

Here are the update commands for each server type.

Windows

Code:
HldsUpdateTool.exe -command update -game left4dead -dir c:\serverpath
Linux

Code:
./steam -command update -game left4dead -dir /home/zombie/serverpath


General info
------------------------------------------------

openserverbrowser - in the console of the L4D client - all games are listed under the custom tab


Banner

File to edit - host.txt
Dimensions - 500 x 100 - 673x135
The banner changes size based on the resolution the client is playing the game in. I would recommend making a 500x100 image and adding black borders up to 673x135 to accommodate those who play in higher resolutions.

Simple HTML to center the banner image in the frame provided
Example -
Code:
<html>
<head>
<style type="text/css">
html, body { background: black; margin:0px; padding:0px; border-style:none}
</style>
</head>

<body scroll=no>
<center><img src="http://my.example.com/banner.png" /></center>
</body>
</html>
motd

File to edit - motd.txt
standard motd, same as any other server


Different types of servers you can run
------------------------------------------------

public server

public server steamgroup enabled - player is a specifid steam group will be able to connect to the server

private server



*** public server ***

Code:
-- startup options --

-console -game left4dead -maxplayers 4 -autoupdate +map l4d_hospital01_apartment +ip xx.xx.xx.xx -port 27015 -nohltv +sv_lan 0

-- server.cfg --

// server name
hostname	myserver

// password for rcon
rcon_password	"rcon_pass"

// Difficulty of the current game  (easy, normal, hard, impossible)
z_difficulty	normal
*** public server steamgroup enabled ***
Code:
-- startup line --

-console -game left4dead -maxplayers 4 -autoupdate +map l4d_hospital01_apartment +ip xx.xx.xx.xx -port 27015 -nohltv +sv_lan 0

-- server.cfg --


// server name
hostname	myserver

// password for rcon
rcon_password	"rcon_pass"

// Difficulty of the current game  (easy, normal, hard, impossible)
z_difficulty	normal 

// steam group that has access to the server
sv_steamgroup 12345
*** private server with steamgroup and search key option ***
Code:
-- startup line --

-console -game left4dead -maxplayers 4 -autoupdate +map l4d_hospital01_apartment +ip xx.xx.xx.xx -port 27015 -nohltv +sv_lan 0 -nomaster


-- server.cfg --


// server name
hostname	myserver

// password for rcon
rcon_password	"rcon_pass"

// password for server
sv_password	private_pass

// Difficulty of the current game  (easy, normal, hard, impossible)
z_difficulty	normal 

// this will allows you to find a server through matchmaking with a specific search string
sv_search_key	unique_key_for_server

// steam group that has access to the server
sv_steamgroup 12345

// only for members of certain steam group
sv_steamgroup_exclusive	1

VS - CO-OP
------------------------------------------------
L4D offers two gameplay modes.

VS - 4 on 4 survivor versus zombies.. human players on both sides.

CO-OP - 4 survivors fight together through the single player maps. 4 human players vs AI

The style of play is determined by the type of map loaded. the maxplayers startup option does not appear to have any affect on the max number of players.

l4d_hospital01_apartment - coop map 4 players max

l4d_vs_farm01_hilltop - versus map 8 players max


Also this CVAR controls the game server mode

"director_no_human_zombies" = "1"
- Prevents humans from joining the zombie team
------------------------------------------------



Forking
------------------------------------------------

Here are the notes I have found on server forking.

**Forking only works with Linux**

Here is A 16 server thread with several incrementing ports. the ## function will increment the number plus the number for the server instance.

-- startup line --

Code:
-netconport 90## -netconpassword foo +hostport 27015+## -steamport 27960+## +clientport 25030+## +exec server##.cfg -nohltv +map l4d_hospital01_apartment -fork 16

if your going to use per server configs, delete server.cfg and create server01.cfg server02.cfg and so forth


Broadcasting
if you're using netconport.

Telnet into the first netconport console (the one belonging to the parent)
and type "broadcast say Servers going down for updates" or "broadcast map
l4d_dem_hospital01_apartment" or "broadcast any_normal_command_here"

This will send commands to all the forks in one shot.

Type find into the console to see the other commands you can do.


Notes
------------------------------------------------

sv_search_key - lets you set up a server that can be found via matchmaking, but only by people with a matching sv_search_key. This allows you to set up a server you or your friends can play on and still use the existing matchmaking lobby to set up avatars, difficulty, map, etc.

To use the sv_search_key here is what you do.

1.) Set sv_search_key on your server.

ex. sv_search_key myserver

2.) Have the host client (the one who will be creating the lobby) set the
same sv_search_key in their console.

3.) Host client should now create the lobby.

4.) Other clients connect. Once the game is ready to be started, have the
host hit start game. Now you should join your server as long as there is a
server available with that search key.


sv_steamgroup - takes the Steam group number (which is now visible on the group's administrative page). The server will still be part of matchmaking, but users that are in that group will be able to browse directly to it from the main menu. Also, if this value is set, there will be a button near the message of the day that allows users to go directly to that group's page. This allows them to join that group if they like, and then be able to browse back to it in the future.

You will only be able to see the steamgroup number if you are the group creator, group members with admin access will not be able to see the group ID


------------------------------------------------


Please let me know if you spot any errors, this is by no means a definitive guide. I am just trying to compile all the info I have found into one spot. If you have anything to add or change please feel free to suggest accordingly.

Last edited by Slyguy42o: 12-01-2008 at 11:09 AM. Reason: adding search key option - Thanks Zoid!
Slyguy42o is offline  
Reply With Quote
Old 11-07-2008, 01:20 PM   #2
DeeBeeP
 
Join Date: Nov 2008
Reputation: 0
Posts: 44
Thanks Sly. I've been wanting to test out sv_search_key. The only problem is my clients don't know where to place their key?
DeeBeeP is offline   Reply With Quote
Old 11-07-2008, 01:32 PM   #3
Slyguy42o
 
Join Date: Jul 2003
Reputation: 4
Posts: 491
Actually valve emailed me and gave me the details, So I haven't had a chance to test it out myself but I believe the party leader will have a place to enter it in the lobby when they are ready to begin their game.
Slyguy42o is offline   Reply With Quote
Old 11-07-2008, 01:49 PM   #4
Slyguy42o
 
Join Date: Jul 2003
Reputation: 4
Posts: 491
I was wrong

Quote:
You put it on your server, and then set it on your client in your
console or whatever.

Then when you do a lobby and create the game it searches for servers
with that key.
Slyguy42o is offline   Reply With Quote
Old 11-07-2008, 01:53 PM   #5
mbmonk
 
Guest
Posts: n/a
Could you add the system specs required to run a dedicated server? Or do you know where I could find that info out?

Thanks
  Reply With Quote
Old 11-07-2008, 03:13 PM   #6
Slyguy42o
 
Join Date: Jul 2003
Reputation: 4
Posts: 491
There aren't any official specs for L4D servers, but userland testing has determined that they are about the same as a 24 man TF2 server.

Additionally if your going to run it under linux you might want to take a look at the following notes

Quote:
Linux dedicated server changes for Left4Dead

There have been many changes, enhancements, and optimizations with the
dedicated server for Linux:

* All of the code is now being compiled with gcc 4.3.0 and glibc 2.8-8
in order to take advantage of compiler fixes and optimization
enhancements. In order to run the l4d Linux dedicated server, you
will need a system which can run binaries built against this version
of glibc.

* As a performance enhancement, the dedicated server can now use the
hardware "RDTSC" timer instead of gettimeofday() for its internal
timing, on systems which support it ( such systems are identified by
having the "constant_tsc" flag set in /proc/cpuinfo ). When the code
detects that the system has this, it will execute a benchmark to
measure the actual rate of the hardware timer, and use this for all
timing. If this causes trouble on a system, you can set the
environment variable "RDTSC_FREQUENCY" to "disabled".

* The Linux dedicated server is now capable of running multiple
server instances as sub-processes off of one parent process. This
provides a memory savings (through sharing of read-only data), a
speedup when starting multiple servers, and also enhances server
stability by having the servers restart as new sub-processes after
each game is completed. This is controlled by the "-fork n" option.
For instance, you can run "srcds_run -fork 5" to start up 5 separate
server instances in this mode.

* When -fork mode is enabled, some options on the command line can be
parametrized based upon the server instance, by typing '##' on the
launching line. For instance, "-fork 10 -netconport 90##" would
cause the first server instance to use port 9001, the second to use
9002, etc.


* There is a new remote access feature which allows a server
administrator (or tool) to create a persistent connection to a
running server, and to see its entire console output and send it
commands. This feature is enabled by using the "-netconport" option
when launching srcds_i486. For instance, if a server is started with
"-netconport 9000", someone with access to port 9000 of the server
could type "telnet xxxx 9000" and view the console output. This
feature is disabled by default, and should only be used when an
appropriate firewall/tunnel is used to control access to this
port. Multiple clients can connect to the netconport of a running
server at the same time.

* If the netconsole is enabled, and the option "-netconpassword xxx"
is set, the network console will not execute commands received
through the netconport until the command "PASS xxx" is entered.
Slyguy42o is offline   Reply With Quote
Old 11-07-2008, 04:22 PM   #7
TheMG
 
TheMG's Avatar
 
Volunteer Moderator
Join Date: Mar 2007
Reputation: 1899
Posts: 10,284
Quote:
Originally Posted by Slyguy42o View Post
There aren't any official specs for L4D servers, but userland testing has determined that they are about the same as a 24 man TF2 server.
Haha yeah I was thinking "oh I'll just put up 6 servers on my box" but then it occurred to me - the AI for all those zombies must chew up some serious CPU resources. Indeed it does.
TheMG is offline   Reply With Quote
Old 11-07-2008, 04:39 PM   #8
Slyguy42o
 
Join Date: Jul 2003
Reputation: 4
Posts: 491
hehhe.. yup

Those zombies eat alot more than just brains
Slyguy42o is offline   Reply With Quote
Old 11-07-2008, 07:14 PM   #9
TragicManner
 
Guest
Posts: n/a
Hey great topic. This has been a huge help getting the details worked out on my server! Keep up the good work, guides like this just don't exist for l4d yet.
  Reply With Quote
Old 11-07-2008, 09:33 PM   #10
PsychoSnowMan
 
Guest
Posts: n/a
Thanks for posting this, very well done. That sv_unreserve option is exactly what I was looking for when I came across your thread.
  Reply With Quote
Old 11-07-2008, 10:26 PM   #11
DexterSinister
 
Join Date: Sep 2007
Reputation: 12
Posts: 241
Help a server noob?

I'm hoping someone here can give me a clue. I used to run a dedicated HL server at small LANs back in the day, but haven't tried with Source/Steam. I figure my bandwidth isn't enough to support a decent number of players. (Comcast cable)

TheMG
suggests that the server specs should be close to a 24 player TF2 server. Assuming I have the hardware to support this, I am wondering: if L4D has only 4 players connecting, can I run a decent dedicated server? Or does the number of zombies increase the amount of bandwidth I need as much as a client/player?

Also, It looks like I need a second Steam account to run a a dedicated server and play on a second machine. Is that correct?

Thanks in advance for any help.
DexterSinister is offline   Reply With Quote
Old 11-08-2008, 08:19 AM   #12
Junpei
 
Guest
Posts: n/a
-console -game left4dead -maxplayers 4 -autoupdate +map l4d_dem_hospital02_subway +ip xx.xx.xx.xx -port 27015 +sv_lan 0

the ip in each of your start strings is listed as this, do i replace this with my servers IP? i asked since my servers port is also not 27011 it is 27145.

also

setmaster add 68.142.72.250:27011
setmaster add 72.165.61.189:27011

are these also supposed to be left as this?

NOTE: I am not running my own server, i am renting from INX-Gaming. i do have full ftp access and such, just mentioning in case you know of any issues. thankyou
  Reply With Quote
Old 11-08-2008, 09:32 AM   #13
TragicManner
 
Guest
Posts: n/a
@Dexter Sinister: You need to get hlds up and running. It is basically a tool that allows you to install and run dedicated servers from a machine without using steam. The HLDS tool is hosted in all kinds of places.

Then, once you get it, go ahead go into a command prompt (if you're using windows. Linux versions are available as well) and type in:

hldsupdatetool -command update -game left4dead -dir C:/LEFT4Dead

(The path after the -dir part is wherever you want all the server files to go).

It'll take a while for everything to download, but once it is done you will be able to setup the server. You'll need to make a shortcut to the srcds executable, and in the properties to that shortcut you'll need to add the startup options shown in the first post in this thread. I would recommend changing "l4d_dem_hospital02_subway" to "l4d_dem_hospital01_apartment" to allow for the game to load at the first level each time.

Once that's up, you'll need to go into your .\l4d_demo\left4dead\cfg directory and create a text file called "server.cfg" (without quotes, I do say). Set that cfg file like the one shown in this thread. It's a basic setup that'll get you up and running.

Once your server.cfg is ready and you have a connection setup, run the shortcut and if all goes well, you'll see the VAC protection thing come up and that all loaded correctly, and your server should be running... unless I forgot something here.

@Junpei - I actually didn't need the +ip value in my startup options. It all depends on how your server machine is connected to the net. And yes, leave the setmaster values just as they were written, that's what allows you to send your info over to steam so your server can be listed. The port that your server is going to run on is the -port value in your startup string, and should be set to 27015 as slyguy demonstrated.

Also, I've not been able to get my banner to work. Any ideas why? Sometimes it'll load in the MOTD area, but I've never seen it come up on the actual banner space. The dimensions are correct, and it's a .png file. Basically, what I did is I placed the url to the .png file in the host.txt file. That correct?

Last edited by TragicManner: 11-08-2008 at 09:37 AM.
  Reply With Quote
Old 11-08-2008, 10:37 AM   #14
OriginalOreo
 
Join Date: Jan 2008
Reputation: 0
Posts: 70
I keep having issues with the sv_search_key myself...

Everytime I attempt to use it, and then try to connect using the key in a lobby. It always say "No Dedicated Server Host found, Would you like to host?"

I have changed the sv_search_key to many words, it just doesn't want to accept.

Any help?
OriginalOreo is offline   Reply With Quote
Old 11-08-2008, 10:56 AM   #15
TragicManner
 
Guest
Posts: n/a
I haven't tried the search key stuff out yet. I haven't heard of anyone using it successfully, either, so I don't know if the kinks have been ironed out for that yet.
  Reply With Quote
Reply

Go Back   Steam Users' Forums > Dedicated Server Discussions > Source DS (Linux)


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing Counter-Strike: Source Server, Server.cfg, MOTD & RCON Lady Racquel Source DS (Windows) 361 07-15-2012 10:04 PM
Common Server/Router Problems and Fixes Cloud_909 Half-Life DS (Windows) 0 04-14-2007 05:26 PM
server not working, please help iamjaredk Source DS (Linux) 12 09-09-2005 08:33 AM
Webmin Game Control Panel Guide funkdoC Half-Life DS (Linux) 43 06-03-2005 10:25 AM
Dedicated Source Server Info CrackTek Source DS (Windows) 0 04-07-2005 12:24 PM


All times are GMT -7. The time now is 11:15 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site Content Copyright Valve Corporation 1998-2014, All Rights Reserved.