How To Setup Left 4 Dead 2 Server on Ubuntu

Updated on November 21, 2023
How To Setup Left 4 Dead 2 Server on Ubuntu header image

In this tutorial, you will learn how to setup a Left 4 Dead 2 server on Ubuntu. This guide was tested on Ubuntu server 15.10.

Prerequisites

  1. Update the packages: sudo apt-get update
  2. Upgrade the packages: sudo apt-get upgrade
  3. Install the required packages: sudo apt-get install lib32gcc1 libc6-i386
  4. Create a new user called "steam": sudo adduser steam (this is for security purposes)

Installing SteamCMD

  1. Login to the newly created user: su steam
  2. Get out of the current directory: cd ..
  3. Go into the "steam" user directory: cd steam
  4. Download SteamCMD: wget http://media.steampowered.com/installer/steamcmd_linux.tar.gz
  5. Unzip SteamCMD: tar -xvzf steamcmd_linux.tar.gz
  6. Run SteamCMD: ./steamcmd.sh

Installing the Left 4 Dead 2 server

  1. Login to the Steam servers: login anonymous
  2. Set the install directory: force_install_dir ./l4d2/
  3. Download the L4D2 server files: app_update 222860 validate (the download may take some time)

Running the Left 4 Dead 2 server

  1. Exit out of SteamCMD: exit
  2. Go into the L4D2 server folder: cd l4d2
  3. Run the game server: screen ./srcds_run +ip YOURSERVERIP -port 27015 +map c1m4_atrium -secure

In this step, you can replace the map with any desired map.

Conclusion

Congratulations! You now have a working instance of L4D2 running! To connect to your server, launch the L4D2 game client, open up the developer console and type connect 1.2.3.4 (replace 1.2.3.4 with the IP address of your server).