It’s time for a little fun. In this tutorial we will provide you the instructions on how to run a Counter Strike Source server on a Ubuntu 16.04 Cloud Server.
For this tutorial we are using the Cloud Server 2GB , although smaller instances should handle one game server absolutely fine aswell.
Update the package manager and install some libraries that will be required:
sudo apt-get install lib32gcc1 libc6-i386
Add a new user for the game server and switch to it (we do this for security reasons, don’t run the game service in ‘root’):
sudo adduser steam su steam
We’ll use SteamCMD to download the game server so first we need to obtain it:
cd ~ mkdir SteamCMD cd SteamCMD && wget http://media.steampowered.com/installer/steamcmd_linux.tar.gz tar -xvzf steamcmd_linux.tar.gz
After extracting the archive you’ll be able to use the ./steamcmd.sh command:
In the Steam shell that will open, type in the following command to install the game server:
login anonymous force_install_dir ./css/ app_update 232330 validate
After a while the installation will be complete and you can exit the Steam shell:
Running the Counter Strike Source server
Now that you’re ready to start your server, enter the css directory:
and run the following command to start the server:
./srcds_run -console -game cstrike -maxplayers 20 - port 27015 +map de_dust2
Parameters like map and players limit are straight forward.
To connect to your server use it’s public IP address.