Memory shards

Do something lively!

A few months ago, Half-Life 1 received an update for its 25th anniversary. After beating it, I played a few hours on deathmatch servers. Sadly, despite its huge official map pool and countless of custom made ones, most of servers were only running crossfire… So, I decided to host my own on my VPS and here is how I did that.

First, I created a non-root account.

sudo useradd -m -d /opt/Steam -s /usr/bin/bash steam
sudo passwd steam 

Then, I installed a dependency to run SteamCMD (Ubuntu/Debian only).

sudo apt install lib32gcc-s1
sudo -u steam -s
cd ~
curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf -
./steamcmd.sh

Once I got SteamCMD running, it was time to download the Half-Life Dedicated Server. To do that, I typed login anonymous inside SteamCMD, app_update 90 validate and quit.

I went into the HL directory.

cd ~/Steam/steamapps/common/Half-Life

Inside the valve directory, I edited server.cfg to tweak the server settings.

sv_aim 0
pausable 0
hostname "example"
sv_maxspeed 320
maxplayers 8
sv_password "password"
mp_flashlight
sv_cheats 0
mp_falldamage 1
mp_fraglimit 50
mp_timelimit 10
sv_rollangle 0

I also added a mapcycle.txt to change the map pool.

contamination
disposal
pool_party
rocket_frenzy

Then, I added an exception in my firewall for the following ports: 27015, 27020 and 26900. Finally, I ran the server with ./hlds_run -game valve +map rocket_frenzy. Also, the map option is mandatory otherwise the server will crash. You should also put the last map in your map pool here since it will only start reading mapcycle.txt at the end of the first one.

See you again, have a nice day!