Left 4 Dead remote commander

Remotely administer your dedicated Left4Dead server from a convenient web interface.

After many hours of play its now quite clear that the most fun is to be had when playing with friends. The drawback is that hosting a 4-slot coop on your home machine is beset by problems like gateways, firewalls, computer specs, line speed etc. The solution is to use a dedicated server, but they come with quite a learning curve and administering or changing game settings isn’t for noobs. Of course, Steam provides dedicated server software in the Tools menu complete with a nice GUI, but most 3rd party game hosts only provide linux platforms and the Half Life Dedicated Server for linux (which is what runs l4d) has no gui to speak of, except for the console.

So…It seems dedicated servers may become more of a mainstream possession. There are other remote consoles out there (such as the confusingly feature-rich HLSW) but I’ve decided to create a simple interface that might appeal more to people reluctantly using dedicated servers and lacking a more detailed knowledge of admin stuff.

The L4D Remote Commander allows you to remotely administer your hired dedicated server, without having to memorise a bunch of console commands. It has a console of its own, but the primary things you tend to want to do, are provided as explicit controls.

How to use

Just enter the server IP (inc.Port) and server rcon password and hit ‘Connect’. The site will authenticate with your server and you’ll be able to control it remotely. At present you can change level, difficulty, say stuff and type random console commands, as well as check the status of your server.

Disclaimer

This app is very much a work-in-progress. In fact I only really used it for the first time yesterday. I’ll update the google code page whenever new additions are made, but I won’t update this page, its up to you to follow whatever progress there is. Using the app is entirely at your own risk and i’d happily admit that it isn’t very secure: putting this on an https connection is among my top “to-dos”. The site will not store your server credentials, but if you’re worried, feel free to download and host your own version.

Theres a good chance someone else will come up with a better one, or one more integrated with the game (I hear mani have one in the works), but I welcome it. If L4D effectively requires a linux server, then that server requires the same kind of usability that the regular windows interface provides. The first person to create one wins a cookie and my eternal gratitude!

Advertisement
Comments
23 Responses to “Left 4 Dead remote commander”
  1. Conduit says:

    Doesn’t work. Tested it on my Windows Dedi and it was a no go.
    Yes…my password and IP/PORT were correct.

  2. Dave Cranwell says:

    Conduit: My first thought would be that the problem is firewall/gateway related. Basic TPC communication isn’t a platform-specific affair and theres nothing more clever going on here. I see no reason why it would connect to my dedicated linux server fine and not your windows one, unless it simply couldn’t connect to your server for network reasons. For the sake of argument i’d suggest turning off your personal/router firewalls and add your computer to your router’s demilitarised zone (if such a thing exists) and try again. If it works, you know the problem.

    Having said all that, given the more-than-adequate windows gui for the HLDS, i don’t know why you’d want to use l4dcommander.com.

  3. Jernau says:

    I have it running on W2k3 IIS6 and PHP5.2.5, connecting to a srcds server within our firewall :)

    I had to turn on output_buffering in php.ini (i’ve set it to 4096 where it was set to Off) because when i logged in all i got was a blank page. I’ve also changed line 6 of /includes/config.php to point to our admin website where originally it pointed to l4dcommander.com (and so was redirecting to your site when i logged in).

    Excellent work, many thanks! :)

  4. adam says:

    Works perfectly for me !

  5. Ed Burnham says:

    This beats the crap out of HLSW. HLSW is a bloated piece. L4D Commander does exactly what I need in a nice interface, without all the BS. Too bad it doesn’t work for me. =D

    Thanks for this Dave, keep it goin.

  6. LiQuiD FeAR says:

    Hey I tried it on windows with the correct ip/port/password. It didn’t work.

  7. Richard says:

    Thanks for this! I also got errors when installing it and the problem is that there is a space after the closing php tag in rcon.class.php, on the last line. Removed that and refreshed and all was golden.

  8. TmBerg says:

    For me the problem was spaces in the password.
    Like my secretpw dont work.
    But mysecretpw do.

  9. Richard says:

    Dave, I have some code fixes for you. There are issues with the player listing function when the player name contains spaces. I stuck a regular expression into the getStatus function that will pull the steamid of the player without having to split lines . . . which was causing havoc with pulling the various tidbits of info. Want me to email the new function to you? If so, just shoot me an email!

  10. doa says:

    I also could not get this to work and so I ended up using HLSW.

    http://left4dead-info.blogspot.com/2008/12/remote-rcon-with-hlsw.html

    doa

  11. Teck says:

    I have written something like this that works with Steam games… CSS, TF2, L4D, etc… Of course mine is an in house app only for our admins but… Yours isnt too bad…

    Just some quick tips: 1) I would suggest automating some things… For example it is best to write code to parse rcon output. For things like maps it is extremely valuable… From there just cache the data and have it refresh the map data when an admin requests it or every 24 hours… 2) HTTPS does need to be added, but you already know that… 3) Write something to detect if the correct ports needed for the script are allowed…

    For anyone who cannot get it working on their own web servers… Make sure that the ports needed for source are open on the web server… I know that with my custom rcon scripts for source games, that is one of the issues… Some web servers just have super strict firewalls and they will prevent the script from running.

  12. d307 says:

    Where can I download this? I went to the google code page but I do not see where I can download the source files. Can someone assist me with this?

    Thank You

  13. Dave Cranwell says:

    d307: you download a Subversion client, (link in the main post) install it, then use it to “check out” a version of the source code, using the trunk url on google code. Read the subversion client help for explanation. I won’t provide zips as the codebase is too changeable and zips would require too much maintenance. Subversion allows all users to instantly update their codebase.

  14. me says:

    After having big troubles with the rcon pw it works now…
    I’m running the script at my dedicated Linux server.

    But got still a small Problem…the server is running with it’s own user, the script is owned by the www user, which is different. I can see the refreshcalls from the scipt to the server in the serverlogs, but it looks like the answer from the server to the script gets lost – no status returns from the server at all. I could fire rcon requests through the scrip, no problem, it works, i could see them in the log, too, but i never get response back – whatever me or the sript does. Do you have an idea how to fix this?

  15. Ivan Marak says:

    Hey Dave cool script by the way… I have a question and I know this sounds a little noobish on my part, but how to clear the server password so other players have access to the game server without entering a PW? I had looked through the console commands at http://www.left4dead411.com/l4d_cvar_list.pdf , but couldn’t find my solution. I attempted to restart the server “_restart” and no dice, in fact nothing happen. Thanks in advance for any replies…

  16. Marak says:

    wOw.. You actually deleted my post *lol* well I figured it out anyways and for anyone who cares.

    Clear Server Password:: sv_password “” …..then restart server…. _restart

  17. Simon Jones says:

    Hey Marak. Your previous post wasn’t deleted, I just hadn’t had a chance to do admin on comments today until now. Thanks for reading!

  18. Marak says:

    Yes just noticed… sorry for the preceeding post… I think it’s time to kill some zombies… Happy Fragging to ya…

  19. I am having issues with mine saying “Connection made” but the the working symbol just keeps spinning on the server tab. I have other web plugins that can connect and display the info fine. Any thoughts?

  20. muukis says:

    I can’t get this to work. I found a bug while giving the code a glance however, but fixing it did not help me much further…

    I don’t know why you convert the login info to lower case?! Is there a particular reason for doing so? On connect.php (line 12) I did the following:
    //$_POST[$param]= strtolower(trim(addslashes($_POST[$param])));
    $_POST[$param]= trim(addslashes($_POST[$param]));

    That got me to log in properly (?) but the next page is just blank… no IP no nothing… should there be some text on those fields?

Trackbacks
Check out what others are saying...
  1. [...] Original article My install Source Share and Enjoy: [...]

  2. [...] (SourceForge.net: SRCDS.py) to be compatible with l4d, but it’s not a gui and L4D Commander (Left 4 Dead remote commander Potential Gamer) still has some issues to work out before it’s really useful for anything besides viewing server [...]



Follow

Get every new post delivered to your Inbox.