In this tutorial, I’m using a dedicated server running Ubuntu to host a Day of Defeat: Source server.
Install the necessary packages.
sudo apt-get update
sudo apt-get install lib32gcc1 screen wget
Create a directory for the DODS server.
mkdir ~/dods ; cd ~/dods
Retrieve and extract SteamCMD.
tar -xvzf steamcmd_linux.tar.gz
The program will update itself and you’ll be brought to a Steam prompt. For DODS, you can just login anonymously.
Next, set the installation directory and let SteamCMD start downloading all of the necessary files. (Make sure you specify an absolute path)
app_update 232290 validate
That part will take a while. After it’s complete, you’re ready to run your server.
But there are a few things you should do first.
1. Create a server.cfg file
I only bother configuring a few settings, and leave all other cvars at their default values.
hostname "sample hostname"
2. Decide what kind of variables you want to pass to srcds_run.
~/dods/game/srcds_run -game dod +ip 192.168.1.150 -port 27015 +map dod_avalanche -secure
I just put that code above into a script and then execute it inside of a screen session, disconnect from the screen, and start playing.
screen -S dods ~/start-server.sh
Ctrl + A, D to disconnect from screen.
Connecting to your server
You can open the developer console and connect to your server via IP address with this command:
Remember to forward port 27015 on your router.