The Counter-Strike 1.6 server is an HLDS (Half-Life Dedicated Server, SteamCMD app 90) with the cstrike mod. It is lightweight: a small VPS is enough. Sources consulted: Vultr and Gentoo guides, host guides and Pterodactyl eggs; the Valve wiki was not reachable, cross-check it.
Step-by-step installation
Prepare a Linux (Ubuntu/Debian) or Windows machine; the server is very light.
Create a non-root user (steam) and install SteamCMD with the 32-bit libraries.
Install HLDS with app_set_config 90 mod cstrike then app_update 90 validate.
Rerun app_update 90 validate several times until nothing more downloads (known HLDS quirk).
Edit cstrike/server.cfg (“CS 1.6 server.cfg generator” tool) and cstrike/mapcycle.txt (“mapcycle.txt editor” tool).
Start hlds_run -game cstrike (or hlds.exe on Windows) with the desired map and slots.
Open 27015 UDP and TCP (and 27020 UDP for HLTV) in ufw, at the provider and on the router.
Test locally (connect 127.0.0.1 in the game console), then from another connection.
Create a systemd service and schedule updates and backups.
Prerequisites
- OS: Linux (Ubuntu/Debian) or Windows. HLDS is a 32-bit program.
- Resources: not officially set in the sources consulted. A 1 vCPU, 1 GB RAM machine generally suffices for 16 to 32 slots without heavy plugins (estimate, to validate).
- Accounts: anonymous installation. No GSLT token is mentioned for HLDS in the sources consulted.
- Community variant: ReHLDS (unofficial) is a widely used alternative; this guide covers Valve's HLDS.
Local installation on Windows
Unzip SteamCMD in C:\steamcmd, install HLDS (repeat the update until it downloads nothing more), then run hlds.exe. Test with connect 127.0.0.1 in the Counter-Strike 1.6 console.
cd C:\steamcmd
steamcmd +force_install_dir C:\hlds +login anonymous +app_set_config 90 mod cstrike +app_update 90 validate +quit
steamcmd +force_install_dir C:\hlds +login anonymous +app_update 90 validate +quit
cd C:\hlds
hlds.exe -console -game cstrike +maxplayers 32 +map de_dust2Linux VPS: user and dependencies
sudo adduser steam
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install -y lib32gcc-s1 lib32stdc++6 steamcmd
su - steamLinux VPS: installing HLDS
Several guides (Vultr, Gentoo, hosts) state HLDS must be updated several times: the second and third commands repeat app_update 90 validate. The mod is chosen with app_set_config 90 mod cstrike.
steamcmd +force_install_dir /home/steam/hlds +login anonymous +app_set_config 90 mod cstrike +app_update 90 validate +quit
steamcmd +force_install_dir /home/steam/hlds +login anonymous +app_update 90 validate +quit
steamcmd +force_install_dir /home/steam/hlds +login anonymous +app_update 90 validate +quitLinux VPS: first start
Start hlds_run from the install folder. The server reads cstrike/server.cfg at each map change and cstrike/mapcycle.txt for the rotation; cstrike/liblist.gam describes the mod (see the “liblist.gam editor” tool to load Metamod).
cd /home/steam/hlds
./hlds_run -console -game cstrike +ip 0.0.0.0 +port 27015 +maxplayers 32 +map de_dust2Ports to open and Linux firewall (ufw)
These ports are the usual HLDS values (not confirmed by an official page consulted). To change the port, use +port N on the launch line and open it instead of 27015.
Open only what you need, then test from another connection (not from the server itself).
- 27015/udp: game (default HLDS port)
- 27015/tcp: RCON
- 27020/udp: HLTV (optional)
sudo ufw allow OpenSSH
sudo ufw allow 27015/udp
sudo ufw allow 27015/tcp
sudo ufw allow 27020/udp
sudo ufw enable
sudo ufw statusWindows firewall (netsh)
In an administrator command prompt, create one inbound rule per port (or open “Windows Defender Firewall with Advanced Security”).
netsh advfirewall firewall add rule name="Counter-Strike 1.6 27015 UDP" dir=in action=allow protocol=UDP localport=27015
netsh advfirewall firewall add rule name="Counter-Strike 1.6 27015 TCP" dir=in action=allow protocol=TCP localport=27015
netsh advfirewall firewall add rule name="Counter-Strike 1.6 27020 UDP" dir=in action=allow protocol=UDP localport=27020Provider firewall and port forwarding (home router)
At a host (OVH, Hetzner, Scaleway…), also open the same ports in the provider's firewall or “security group”: ufw is not enough if an upstream firewall exists. For a home server, create a port forward (NAT) in your router for each port to the machine's local IP address (make it static or reserve it via DHCP).
Test: from another connection, add the server as “IP:port” in Counter-Strike 1.6's server browser or in the console. If it fails, check in order: service running, local firewall, provider firewall, NAT forward.
Automatic start: systemd service
Create /etc/systemd/system/cs16.service (as root), then enable it. Adapt the user and paths; read logs with journalctl -u cs16 -f.
[Unit]
Description=Counter-Strike 1.6 dedicated server
After=network-online.target
Wants=network-online.target
[Service]
User=steam
WorkingDirectory=/home/steam/hlds
ExecStart=/home/steam/hlds/hlds_run -console -game cstrike +ip 0.0.0.0 +port 27015 +maxplayers 32 +map de_dust2
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target
# then:
# sudo systemctl daemon-reload
# sudo systemctl enable --now cs16Windows: scheduled task at startup
On Windows, a scheduled task runs your .bat script at system startup (run the command in an administrator prompt).
schtasks /Create /TN "Counter-Strike 1.6 server" /TR "C:\hlds\start-cs16.bat" /SC ONSTART /RU SYSTEM /RL HIGHESTUpdates, backups and scheduled restarts
Stop the service before updating (same SteamCMD command as for installation), back up configuration and data files regularly, and schedule a daily restart if the server degrades over time.
sudo systemctl stop cs16
steamcmd +force_install_dir /home/steam/hlds +login anonymous +app_update 90 validate +quit
sudo systemctl start cs16
# backup
tar czf ~/cs16-$(date +%F).tar.gz -C /home/steam/hlds cstrike/server.cfg cstrike/mapcycle.txt cstrike/liblist.gam cstrike/addons cstrike/banned.cfg cstrike/listip.cfg
# daily restart at 05:00 (root crontab: sudo crontab -e)
0 5 * * * systemctl restart cs16List and find your server
Add your server at https://game-rank.com/jeux/counter-strike-1-6 to make it visible to the community. To find it in game, use the server browser or connect directly with its IP:port.
Troubleshooting: common errors
- Missing files or server not starting after installation: HLDS is known for an incomplete first install. Fix: rerun app_update 90 validate (with app_set_config 90 mod cstrike) two or three times.
- The server hangs on map change: a map listed in mapcycle.txt is missing from cstrike/maps/. Fix: check that each .bsp exists or remove the line.
- Server invisible from outside: the service runs but nobody can connect. Cause: closed port (ufw, provider firewall or missing NAT forward). Fix: open the ports listed above at all three levels and test from another connection.
- Port already in use at startup: another instance holds the port. Fix: list processes with ss -lunp | grep 27015, stop the old instance, or give each server a different port with -port.
- SteamCMD “Failed to install app” or stalled download: frequent cause, full disk or insufficient folder permissions. Fix: check df -h and the folder owner, then rerun the command with validate (several times if needed).
- srcds_run: “No such file or directory” or missing 32-bit library: the Source server is a 32-bit program. Fix: enable the i386 architecture (dpkg --add-architecture i386) and install lib32gcc-s1 and lib32stdc++6.
Frequently asked questions
- What is the SteamCMD ID of the CS 1.6 server?
- HLDS is app 90; the mod is selected with +app_set_config 90 mod cstrike before +app_update 90 validate.
- Where do I put Metamod or AMX Mod X?
- These community modules go in cstrike/addons/ and Metamod loads through the gamedll_linux (or gamedll) line of cstrike/liblist.gam. Follow the documentation of the chosen distribution; the “liblist.gam editor” tool edits that line.
- Can I run the server as root?
- Not recommended: create a dedicated user (for example steam) without admin rights, and install and run the server with it. A flaw in the server or a plugin then does not compromise the whole machine.
- My Counter-Strike 1.6 server does not appear in the list: what should I check?
- First check that the ports are open at every level, that the server is not in LAN mode (sv_lan 0) and, if the game requires it, that a valid server token (GSLT) is provided. The Steam list can take a few minutes to refresh; meanwhile, connect by IP:port.
