Go Back   Left 4 Dead Forums > Left 4 Dead > Left 4 Dead General Discussion
Left 4 Dead General Discussion Discuss all aspects of Left 4 Dead here.

Reply
 
LinkBack Thread Tools Display Modes
Old November 19th, 2008, 12:51 PM   #1 (permalink)
 
arteK's Avatar
 
L4DForums Member
 
Join Date: Nov 08
Location: London
Steam ID: aRteK-/
Posts: 78
arteK is infected
Send a message via MSN to arteK
Post Left 4 Dead - Linux server guide.

Hello,

This post is to help those linux users out there, who have no idea on how to create a Left4Dead Linux Server. This guide should be easy to understand, but if you face any problems just post on this thread and I'll help you.

This linux guide is based on Fedora/Centos distribution so if you are using ubuntu/redhat/debian things might be more complicated.

Step 1.




Log into your server using SSH as user 'root'.

--


Step 2.




useradd l4d1

Add a user for your left 4 dead server. If you are hosting multiple l4d servers then I recommend using: l4d1,l4d2,l4d3, etc.

--


Step 3.




su l4d1
cd


Switch to that user by typing "su l4d1" (the user you just created) and then type "cd" (without quotes). As you can see on the screenshot I am using 'l4d3' as my user, don't get confused... I already have a l4d1 and a l4d2 user setup.

--


Step 4.




mkdir hlds
cd hlds


Make a directory called hlds and type "cd hlds" (without quotes) to enter that directory.

--

Step 5.



wget http://storefront.steampowered.com/d...updatetool.bin


*Note, you will need to RIGHT CLICK that link and go to properties to get the full link*

Type/Paste that command above and hit RETURN. It should now download the hldsupdatetool.bin file which you will need to use to create the dedicated server.

--

Step 6.



chmod +x hldsupdatetool.bin
./hldsupdatetool.bin


Add the permissions to the file by typing chmod +x hldsupdatetool.bin and then use ./hldsupdatetool.bin to run it.

*note* You will then be asked to accept their licensing agreement, simple say yes then press return.

--

Step 7.



chmod +x steam
./steam -command update -game l4d_full -dir .


Type the commands above to give steam the permission to run, and then to download the content for left4dead server.




*note* It may ask you to type the command again due to steam client being updated simply enter again: ./steam -command update -game l4d_full -dir .

As you can see the files are being downloaded to your dedibox, the speed of this process depends in how busy the steam network is and your servers connection.

--

Step 8.




cd l4d/
cd left4dead
cd cfg/
nano server.cfg


Once it has downloaded, type the commands above, so you can edit your servers config file.



Example of left 4 dead server.cfg

hostname "My awesome left4dead server www.left4deadfiles.com"

rcon_password "adminpasswordhere"

sv_allow_lobby_connect_only 0

z_difficulty hard


*note* Once you have finished writing your server.cfg hold down CTRL and press X you will then be asked "Save modified buffer (ANSWERING "No" WILL DESTROY CHANGES) ?" just type 'y' then press enter when it asks you to save to server.cfg

--

Step 9.




cd
cd hlds
cd l4d
./srcds_run l4d -autoupdate +ip 00.000.000.00 +hostport 27203 +exec server.cfg +map l4d_farm01_hilltop &

*note* where the 00.000.000.00 is, you will need to type in your servers IP address.




As you can see your server is now running.

Hold down CTRL and press C
su root
*enter password*
cd


Your server is now running.

To connect to it:

1. Open up left4dead
2. In keyboard options make sure 'Developer Console' is enabled.
3. Press ` to bring down the console then type connect 00.000.000.00 (the ip of your server)
4. bring down the console again once you have connected to it and type rcon_password 'the password you provided in the server.cfg'

That's it, if you require any assistance or an explanation of anything that I have showed you, feel free to reply to this thread.

--


Do you need a high quality affordable dedicated server?

visit: http://www.rapidswitch.com/

These dedicated servers are affordable and high quality, even with the 'value' pack, you could run at least 4 high quality Left4Dead servers.

Regards,

Jon

Last edited by arteK; November 19th, 2008 at 12:57 PM..
arteK is offline   Reply With Quote
Old November 19th, 2008, 12:51 PM   #2 (permalink)
 
arteK's Avatar
 
L4DForums Member
 
Join Date: Nov 08
Location: London
Steam ID: aRteK-/
Posts: 78
arteK is infected
Send a message via MSN to arteK
reserved

Troubleshooting

- You have followed the steps above but you still can't connect to your dedicated server.

Perhaps your server has a firewall enabled?

While logged into root type 'setup' then use the arrow keys and go down to firewall, you can enable/disable/customize your filewall from there.

- Your server has crashed

Since the guide above has the servers launch command with -autoupdate in it, your server should restart automatically... So wait 30 seconds and see if you can connect to it again.


- The server has become really laggy?

Perhaps you are running to many servers that your dedibox can handle, you might have to stop a few.

To do that log into the user of the server you want to take down, and type:

ps x

You will then see:

PID TTY STAT TIME COMMAND
7232 pts/2 S 0:00 bash
7258 pts/2 S 0:00 bash
7384 pts/2 S 0:00 bash
7526 pts/2 S 0:00 /bin/sh ./srcds_run l4d -autoupdate +ip 87.117.217.78
7537 pts/2 Sl 0:25 ./srcds_i486 l4d -autoupdate +ip 87.117.217.78 +hostp
7577 pts/2 R+ 0:00 ps x

Notice the /bin/sh ./srcds_run l4d -autoupdate +ip 87.117.217.78

and ./srcds_i486 l4d -autoupdate +ip 87.117.217.78 +hostp?

On the left you will see the number that process's number.

So you will need to:

Type 'kill -9 7526 7537' to stop the server from running.

If you want to start that server up again, you will need to go into hlds/l4d/ then run the servers launch command.

For example: ./srcds_run l4d -autoupdate +ip 00.000.000.00 +hostport 27203 +exec server.cfg +map l4d_farm01_hilltop &

Last edited by arteK; November 19th, 2008 at 01:09 PM..
arteK is offline   Reply With Quote
Old November 19th, 2008, 12:51 PM   #3 (permalink)
 
arteK's Avatar
 
L4DForums Member
 
Join Date: Nov 08
Location: London
Steam ID: aRteK-/
Posts: 78
arteK is infected
Send a message via MSN to arteK
*reserved*

Posted in wrong section of the forum, please move.

Last edited by arteK; November 19th, 2008 at 01:10 PM..
arteK is offline   Reply With Quote
Old November 19th, 2008, 03:34 PM   #4 (permalink)
 
L4D Forums Member
 
Join Date: Nov 08
Posts: 1
EiOL is infected
I'm not able to put the server with 12 slots. Always stay with 4.

./srcds_run -game left4dead +hostport 27035 +maxplayers 8 +map l4d_hospital01_apartment.bsp

Here with 18 slots
Left 4 Dead Server List Browser | Search Left 4 Dead Stats, Rankings, and Banners (COD WAW) - Game Tracker

what should be done?
EiOL is offline   Reply With Quote
Old November 19th, 2008, 04:02 PM   #5 (permalink)
 
arteK's Avatar
 
L4DForums Member
 
Join Date: Nov 08
Location: London
Steam ID: aRteK-/
Posts: 78
arteK is infected
Send a message via MSN to arteK
You are running the map: l4d_hospital01_apartment.bsp

Which is from the campaign, you can only have a max players of 4 for that mode.

VALVe only allow a limited amount of players in different modes.

If you were to load up a _vs_ map on the otherhand, your servers slot would increase because of the survivours and the horde, I havn't tested this mode out yet, but im guessing its 8 slots.

Regards,

Jon

www.rapidswitch.com - Affordable, High Quality Dedicated Servers.
arteK is offline   Reply With Quote
Old November 19th, 2008, 04:24 PM   #6 (permalink)
 
Sierra Oscar's Avatar
 
Left 4 Dead Senior Forum Staff
 
Join Date: Jul 08
Location: Ireland
National Flag:
Steam ID: Sierra_Oscar
Posts: 367
Sierra Oscar was killed in the first minute
Send a message via MSN to Sierra Oscar
Excellent guide, well done.

/Reps.
Sierra Oscar is offline   Reply With Quote
Old November 19th, 2008, 04:58 PM   #7 (permalink)
 
arteK's Avatar
 
L4DForums Member
 
Join Date: Nov 08
Location: London
Steam ID: aRteK-/
Posts: 78
arteK is infected
Send a message via MSN to arteK
Thanks, took me ages

www.rapidswitch.com - Affordable, High Quality Dedicated Servers.
arteK is offline   Reply With Quote
Old November 25th, 2008, 03:24 AM   #8 (permalink)
 
L4D Forums Member
 
Join Date: Nov 08
Posts: 2
omiethenull is infected
If you're getting an error like:
bash: ./hldsupdatetool.bin: No such file or directory

It's likely because hldsupdatetool.bin is a 32-bit binary, and you're on a 64-bit Linux install. hldsupdatetool.bin is dynamically linked and requires shared libraries installed. In this case, it's linked with 32-bit shared libraries, so you need the 32-bit libraries for your distribution. On Debian and Ubuntu, that's as simple as:

aptitude install lib32gcc1

And that's all it should need.

EDIT:
Doing this on Debian Etch doesn't appear to be enough. For some damn reason, Valve thought their steam binary just _had_ to be compiled against GLIBC 2.4. Etch is still on 2.3.6 or something (because it's the newest GLIBC that supports 2.4.x kernels, and Etch still supports those kernels). You'll have to dist-upgrade to lenny which is not exactly trivial. Make backups if you do this. Alternatively, you could install a lenny chroot with deboostrap (look up some docs on it--I recommend debian-administration's docs).

Last edited by omiethenull; November 25th, 2008 at 04:04 AM..
omiethenull is offline   Reply With Quote
Old November 26th, 2008, 05:17 AM   #9 (permalink)
 
L4D Forums Member
 
Join Date: Nov 08
Posts: 14
RhunDraco is infected
Hi, I'm following these instructions on a newly installed Ubuntu Intrepid (8.10) install and just cannot get it to work.

Here's the command line I'm using to run:

./srcds_run l4d -autoupdate +ip myip +hostport 27203 +exec server.cfg +map l4d_farm01_hilltop

And here's what I get in return:

[Auto detecting CPU
Using AMD Optimised binary.
Server will auto-restart if there is a crash.
Could not locate steam binary:./steam, ignoring.
Illegal instruction
Add "-debug" to the ./srcds_run command line to generate a debug.log to help with solving this problem
Tue Nov 25 22:11:18 MST 2008: Server restart in 10 seconds

I've copied the steam binary into the same directory as srcds_run and all that seems to do is start another download into a new l4d directory (which takes a long time, again).

I saw in other posts that glibc 2.8 is needed, and according to some docs, that's what I have . . . any ideas?
RhunDraco is offline   Reply With Quote
Old November 27th, 2008, 07:26 PM   #10 (permalink)
 
L4D Forums Member
 
Join Date: Nov 08
Posts: 14
RhunDraco is infected
Originally Posted by RhunDraco View Post
Hi, I'm following these instructions on a newly installed Ubuntu Intrepid (8.10) install and just cannot get it to work.

Here's the command line I'm using to run:

./srcds_run l4d -autoupdate +ip myip +hostport 27203 +exec server.cfg +map l4d_farm01_hilltop

And here's what I get in return:

[Auto detecting CPU
Using AMD Optimised binary.
Server will auto-restart if there is a crash.
Could not locate steam binary:./steam, ignoring.
Illegal instruction
Add "-debug" to the ./srcds_run command line to generate a debug.log to help with solving this problem
Tue Nov 25 22:11:18 MST 2008: Server restart in 10 seconds

I've copied the steam binary into the same directory as srcds_run and all that seems to do is start another download into a new l4d directory (which takes a long time, again).

I saw in other posts that glibc 2.8 is needed, and according to some docs, that's what I have . . . any ideas?
I'll answer myself in this case. After some digging, I found several posts that suggest that Valve builds their games requiring the CPU to have the SSE feature (and possibly even QEMU), and it just so happens that the box I'm running this on is an older AMD CPU that doesn't support SSE.

So, if anyone is attempting to get a l4d dedicated server running in Linux on older hardware, and keeps seeing the "illegal instruction" error message, it could be the CPU doesn't support SSE. You can verify this by doing something like:

grep -i sse /proc/cpuinfo

in a shell and seeing what's returned.

Looks like I'll need to upgrade my server hardware in order to run an l4d dedicated server. I'm always into upgrading!
RhunDraco is offline   Reply With Quote
Old November 29th, 2008, 05:31 PM   #11 (permalink)
 
L4D Forums Member
 
Join Date: Nov 08
Steam ID: chimmychangas
Posts: 90
ChimmyChanga is infected
Any way to get it to run with glibc 2.3? I'm using an old Ubuntu 6.x version and can't update due to what other things are on the server.
ChimmyChanga is offline   Reply With Quote
Old November 29th, 2008, 06:48 PM   #12 (permalink)
 
L4D Forums Member
 
Join Date: Nov 08
Posts: 14
RhunDraco is infected
Alright! I got the server up and running after swapping out some hardware. Now running on a Pentium 4. Started OK and appears to be running fine, I've been watching the console and see people in and playing, though I'm curious how the performance is.

Just a note: I got this running on an Ubuntu Intrepid Ibex server, and just in case installed glibc-source prior to installing L4D. Might not be necessary, but it doesn't seem to hurt.

Last edited by RhunDraco; November 30th, 2008 at 02:40 AM..
RhunDraco is offline   Reply With Quote
Old November 30th, 2008, 04:46 AM   #13 (permalink)
 
L4D Forums Member
 
Join Date: Nov 08
Posts: 2
omiethenull is infected
no. glibc-source is not necessary.

@ChimmyChanga
If you can't dist-upgrade your ubuntu install, then make a chroot for your srcds.

Installing new Debian systems with debootstrap

You won't need all of the directions there, and there might be better instructions elsewhere. Mainly, you're going to need to aptitude install debootstrap, and then debootstrap either lenny or a newer version of ubuntu with glibc 2.4 or maybe even 2.8. Once you get a distro debootstrapped under a certain directory, chroot into it. It's gonna be like a very sparse install, so you'll need to aptitude install certain things to get srcds up and running (not sure what). But then just get srcds up and running in that chroot envirnoment. Think of it as poor-man's virtualization =).

There are also tools to help with chrooting, mounting proc, carrying over users, etc. schroot is a good one. You could set it up so all you do to start srcds on your legacy server is to run the typical command with an alias in front of it telling it to use your chrooted environment.
omiethenull is offline   Reply With Quote
Old November 30th, 2008, 12:54 PM   #14 (permalink)
 
L4D Forums Member
 
Join Date: Nov 08
Steam ID: chimmychangas
Posts: 90
ChimmyChanga is infected
Thanks, omiethenull, I'll check it out.
For now I'm running it on a 1.2GHz Celeron D 220 w/ 1GB RAM, and it's running pretty well. Tried 4 players co-op and versus with 100 as common limit and it runs just fine

Getting some errors:
Code:
root@tulse:/l4d# ./srcds_run: line 379: ./srcds_i486: No such file or directory
Add "-debug" to the ./srcds_run command line to generate a debug.log to help with solving this problem
Sun Nov 30 13:27:27 UTC 2008: Server restart in 10 seconds
But obviously, the file is there. I just copied everything over from what I ran before into here.


It seems it does this with all files in my new chrooted OS.
Code:
bash: ./steam: No such file or directory

Last edited by ChimmyChanga; November 30th, 2008 at 01:30 PM..
ChimmyChanga is offline   Reply With Quote
Old December 1st, 2008, 04:45 AM   #15 (permalink)
 
L4D Forums Member
 
Join Date: Dec 08
Posts: 3
vitabrevis is infected
new to linux

I have tried to follow this tutorial along with others but i have been getting stuck. I have never used Linux before so i would appreciate some help. on this one i got all the way to step 8 by skipping step 1. now i figured out step one with ubuntu 8.10 this is all i get...

*****@***** -desktop:~$ sudo su -
root@*****-desktop:~# useradd l4d2
root@*****-desktop:~# su l4d2
$ su l4d2
Password:
Su: Authentication failure


that's exactly what i get i have tried everything thing i can think of. any help or am i in way over my head and give up?

Last edited by vitabrevis; December 1st, 2008 at 04:46 AM..
vitabrevis is offline   Reply With Quote
Old December 1st, 2008, 06:48 AM   #16 (permalink)
 
arteK's Avatar
 
L4DForums Member
 
Join Date: Nov 08
Location: London
Steam ID: aRteK-/
Posts: 78
arteK is infected
Send a message via MSN to arteK
Originally Posted by vitabrevis View Post
I have tried to follow this tutorial along with others but i have been getting stuck. I have never used Linux before so i would appreciate some help. on this one i got all the way to step 8 by skipping step 1. now i figured out step one with ubuntu 8.10 this is all i get...

*****@***** -desktop:~$ sudo su -
root@*****-desktop:~# useradd l4d2
root@*****-desktop:~# su l4d2
$ su l4d2
Password:
Su: Authentication failure


that's exactly what i get i have tried everything thing i can think of. any help or am i in way over my head and give up?
Try:

userdel l4d2
useradd l4d2 -p password

su l4d2
enter password

www.rapidswitch.com - Affordable, High Quality Dedicated Servers.
arteK is offline   Reply With Quote
Old December 2nd, 2008, 05:05 AM   #17 (permalink)
 
L4D Forums Member
 
Join Date: Dec 08
Posts: 3
vitabrevis is infected
Originally Posted by arteK View Post
Try:

userdel l4d2
useradd l4d2 -p password

su l4d2
enter password
so i userdel l4d1 and l4d2

then i restarted

:~$ sudo su -
:~# userdel l4d1
:~# useradd l4d1 -p password
:~# su l4d1
$ password
su: password: not found


also
:~$ sudo su -
:~# userdel l4d1
:~# useradd l4d1 -p password
:~# su l4d1
$ su l4d1
password: (i entered password but i don't see anything)
su: authentication failure



this time i put in the last 4 things of the line and not the user name and desktop just to save time because i think they might be important. But after the su l4d1 i just get a line that says "$" and then i typed in password so i dont know what that means. Again help is appreciated.

Last edited by vitabrevis; December 2nd, 2008 at 05:17 AM..
vitabrevis is offline   Reply With Quote
Old December 2nd, 2008, 10:36 PM   #18 (permalink)
 
arteK's Avatar
 
L4DForums Member
 
Join Date: Nov 08
Location: London
Steam ID: aRteK-/
Posts: 78
arteK is infected
Send a message via MSN to arteK
Originally Posted by vitabrevis View Post
so i userdel l4d1 and l4d2

then i restarted

:~$ sudo su -
:~# userdel l4d1
:~# useradd l4d1 -p password
:~# su l4d1
$ password
su: password: not found


also
:~$ sudo su -
:~# userdel l4d1
:~# useradd l4d1 -p password
:~# su l4d1
$ su l4d1
password: (i entered password but i don't see anything)
su: authentication failure



this time i put in the last 4 things of the line and not the user name and desktop just to save time because i think they might be important. But after the su l4d1 i just get a line that says "$" and then i typed in password so i dont know what that means. Again help is appreciated.
When you type a password in linux you cant actully see it writing it.

www.rapidswitch.com - Affordable, High Quality Dedicated Servers.
arteK is offline   Reply With Quote
Old December 2nd, 2008, 10:49 PM   #19 (permalink)
 
L4D Forums Member
 
Join Date: Dec 08
Posts: 3
vitabrevis is infected
wget problems

I switched to fedora 10 hoping it would make things easier. but now when i do wget http://storefront.steampowered.com/d...updatetool.bin

i get the following

resolving storefront.steampowerd.com...216.8.179.24
connecting to storefront.steampowerd.com[216.8.179.24]:80... connected
HTTP request sent, awating response....403 forbidden
2008-12-02 15:44:03 ERROR 403: Forbidden


looked it up all i can get is the server is not allowing wget or something to get it and they offed suggestions like use wget -U but i just get the error wget missing url. so yeah what should i do.
vitabrevis is offline   Reply With Quote
Old December 2nd, 2008, 11:02 PM   #20 (permalink)
 
L4D Forums Member
 
Join Date: Nov 08
Steam ID: chimmychangas
Posts: 90
ChimmyChanga is infected
You dont have permission to write to the folder your trying to download to.
ChimmyChanga is offline   Reply With Quote
Reply

Tags
guide, linux, server

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Win Prima Strategy Guide for Left 4 Dead - Round 2 S.T.A.L.K.E.R. Community Announcements 20 November 19th, 2008 06:19 PM
Win Prima Strategy Guide for Left 4 Dead AzH Community Announcements 53 November 18th, 2008 07:35 AM
Beginner's Guide to Left 4 Dead Leroy Left 4 Dead General Discussion 1 July 6th, 2008 06:01 PM
left 4 dead server question (sorry if this is noobish) emiac38 Left 4 Dead General Discussion 6 June 4th, 2008 07:16 PM



All times are GMT. The time now is 12:33 PM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0