Getting HLDS via steamcmd
This is a guide for you to create your very own Half-Life Server from scratch.
First things first, this guide assumes you have a working Linux server. Either a computer you no loger use at home or a rented VPS.
For home gamers! For your sanity, before dealing with any of the stuff below, make sure whether your ISP allows you to open ports as you wish. Then forward ports 27015 and 27016 to your server computer. (Configure port forwarding on your router then use netcat or telnet to listen on ports you forwarded then you can use this website to check whether you can listen ports.) This step can be skipped if you rented a VPS.
If you got your executable via a different way ex. Docker you can skip this step
To get HLDS without all that GUI bloat we’ll use Valve’s steamcmd tool on command line. On Linux just use your package manager(pacman, apt, …) to install steamcmd, it is also present in AUR. Check out the Valve’s documentation if you encounter any problems while installing.
After installing the steamcmd tool if you want to use an app directory other than the default(~/.steam/steamapps) pass +force_install_dir [path]
argument after steamcmd. As an example;
1
$ steamcmd +force_instal_dir [path]
This is not persistent! Alias (add alias steamcmd='steamcmd +force_install_dir [your path]'
line to the end of your ~/.bashrc) so you don’t have to deal with it every time you open up the steamcmd.
It is also advised that you define install path before doing anything.
So, whether you define an install path you are going to run steamcmd, you will be greeted by it’s shell.
I advise you to login to your steam account with the login [username]
command, so you don’t get This account does not own the game error. You can try login anonymous
if you want to.
After logging in you will get the hlds binaries to your intall path with;
1
app_update 90 validate
This step has a bug! You will need to run the line above in steamcmd until it downloads no more files.
If you want to set up a server for a mod of hl1 which is available on steam;
1
2
app_set_config 90 mod cstrike
app_update 90 validate
As an example for counter strike, you need to run the line with validate multiple times again.
To be continued…