This is the basic method I use to create a number of game servers that I run for my gaming clan. All of these servers get a pretty decent load and work very well.
I am using an Ubuntu Linux 14.04 LTS server here, but this should work with most Linux distros.
Create A Game User
Here, I create a new user that the DoD:S server will run as. I named mine hlds, like the old version of the dedicated server, and have it use bash as it’s shell.
$ sudo useradd -s /bin/bash -m hlds $ sudo passwd hlds
Then, I logout and log back in as this new user.
First you’ll need to install the require packages:
$ sudo apt-get install lib32gcc1
As the game server user, run the following commands to download SteamCMD:
$ mkdir steamcmd && cd steamcmd $ wget http://media.steampowered.com/client/steamcmd_linux.tar.gz $ tar -xzf steamcmd_linux.tar.gz $ ./steamcmd.sh
This will auto-update SteamCMD and leave you at a Steam> prompt. Now, we install the DoD:S server files.
Steam> login anonymous Steam> force_install_dir ../ Steam> app_update 232290
This will take a while, as SteamCMD downloads all your server files. When it is done, it drops you back at the Steam> prompt and you can type quit.
Create Your Server Configuration
The game server does not come with a default configuration file, so without knowing what you’re doing, creating one can be kind of difficult. I like the dodbits DoD:S Server Config Maker, which will let you create one via fill in the blanks.
Take the server.cfg that this generates and place it in the dod/cfg/ folder.
Create A Startup Script
Using your favorite text editor (vim, emacs, etc), create a file called start.sh in your home directory. Place the following in there (obviously, change IP to match your server):
screen -A -m -d -S dod ./srcds_run -game dod +map dod_avalanche +maxplayers 30 +ip <server's ip address>
Save the file and exit your editor. Now, make that script executable with the following command:
$ chmod +x start.sh
You’re all ready to go at this point.
will fire-up your server, but you won’t see anything. That’s because we used the screen command to separate the game from your terminal session. You can logout, but the game will keep on running.
So, how do you get in? Simple:
$ screen -x
Now, you are attached to the game server’s console. You can exit back out, keeping the server running, by pressing Ctrl+A then Ctrl+D.