TürkiyeVPS

How to Host a CS 1.6 Server on Linux: Step-by-Step HLDS Guide

Set up a Counter-Strike 1.6 server on Ubuntu 24.04: HLDS files with SteamCMD, server.cfg and map cycle, port 27015, a systemd service, admin rights with AMX Mod X and fixes for common errors.

8 min read

Years after its release, Counter-Strike 1.6 is still widely played in Turkey and the wider region: it runs smoothly on modest hardware, and clan matches and community servers are very much alive. With your own server you decide the map rotation, the rules and who the admins are. In this guide we set up a CS 1.6 server on Ubuntu 24.04 using Valve's official server software, HLDS (Half-Life Dedicated Server).

Summary: download the HLDS files (App ID 90, mod cstrike) anonymously with SteamCMD, prepare server.cfg, open port 27015/UDP and run the server as a systemd service. CS 1.6 is very light; what it really needs is a public IPv4 address of its own and a stable CPU.

How many resources do you need?

  • RAM: a standard 20–32 player server uses a few hundred MB of RAM. Plugins and custom mods (zombie, jailbreak, deathrun and so on) increase usage; 1–2 GB gives comfortable headroom.
  • CPU: HLDS runs on a single core. On servers whose CPU is shared with other customers you may see lag and choke at busy hours; choose a server with dedicated vCPUs.
  • Disk: the server files take around 1 GB. Leave a few GB for extra maps, sounds and logs.
  • Public IP: for players to connect directly and for the server to appear in the server browser, it needs its own public IPv4 address. A server behind a shared (NAT) IP is not suitable for this.

1. Prepare the system

Connect to your server over SSH. HLDS is a 32-bit program, so enable the i386 architecture and install the required libraries:

sudo dpkg --add-architecture i386
sudo apt update && sudo apt upgrade -y
sudo apt install -y lib32gcc-s1 lib32stdc++6 libc6-i386 curl tmux

Do not run the server as root; create a separate user:

sudo adduser --disabled-password --gecos "" cs16

2. Install SteamCMD and download the HLDS files

Switch to the cs16 user and download Valve's official SteamCMD package:

sudo -iu cs16
mkdir -p ~/steamcmd && cd ~/steamcmd
curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf -

The CS 1.6 server files use App ID 90. The app_set_config part makes sure the Counter-Strike mod is installed instead of plain Half-Life:

~/steamcmd/steamcmd.sh +force_install_dir /home/cs16/hlds +login anonymous +app_set_config 90 mod cstrike +app_update 90 validate +quit

The first HLDS install through SteamCMD is known to stop halfway with an error such as Error! App '90' state is 0x... after update job. This is normal: run the same command 2–3 more times until you see Success! App '90' fully installed. You can confirm the install with ls ~/hlds/cstrike; files such as maps, liblist.gam and server.cfg should be there.

Link the Steam library to where the server expects it. If you skip this step you may get a steamclient.so error at startup:

mkdir -p ~/.steam/sdk32
ln -sf ~/steamcmd/linux32/steamclient.so ~/.steam/sdk32/steamclient.so

3. server.cfg and the map cycle

Server settings live in cstrike/server.cfg:

nano ~/hlds/cstrike/server.cfg

A basic configuration:

hostname "My CS 1.6 Server"
rcon_password "AStrongRconPassword"
sv_password ""
sv_lan 0
mp_timelimit 30
mp_freezetime 3
mp_roundtime 2.5
mp_buytime 0.25
mp_friendlyfire 0
mp_autoteambalance 1
sv_maxupdaterate 101
sv_minupdaterate 30
sv_maxrate 100000
sv_minrate 25000
Setting What it does
hostname The name shown in the server browser
rcon_password Remote admin password; it must be strong
sv_password If set, only players who know the password can join (clan matches, practice)
mp_timelimit Minutes per map
mp_freezetime / mp_roundtime Freeze time at round start and round length
sv_maxupdaterate / sv_maxrate Update frequency and data limit sent to players

mapcycle.txt decides which maps are played in which order:

nano ~/hlds/cstrike/mapcycle.txt
de_dust2
de_inferno
de_nuke
de_train
de_aztec
cs_assault

To add a custom map, put its .bsp file into cstrike/maps/ and add its name to mapcycle.txt. If the map needs extra sound or texture files, copy them into the matching folders too.

4. Open the firewall

Switch back to your own user (exit). In CS 1.6, game traffic, server browser queries and RCON all use the same 27015/UDP port:

sudo ufw allow OpenSSH
sudo ufw allow 27015/udp
sudo ufw enable

5. Start the server for the first time

Do the first run inside a tmux session:

sudo -iu cs16
tmux new -s cs16
cd ~/hlds
./hlds_run -game cstrike -port 27015 +maxplayers 20 +map de_dust2 +sv_lan 0

You should see the map load and the line Connection to Steam servers successful. in the console. Press Ctrl+B, then D to detach from tmux; the server keeps running.

To join, open the console in CS 1.6 (the ~ key) and type connect SERVER_IP:27015. If you set a password, enter password YOURPASSWORD first.

6. A systemd service so the server starts on its own

Stop the server in tmux (tmux attach -t cs16, then type quit), switch back to your own user and create the service file:

sudo nano /etc/systemd/system/cs16.service
[Unit]
Description=Counter-Strike 1.6 server
After=network-online.target
Wants=network-online.target

[Service]
User=cs16
WorkingDirectory=/home/cs16/hlds
ExecStart=/home/cs16/hlds/hlds_run -game cstrike -port 27015 +maxplayers 20 +map de_dust2 +sv_lan 0 -norestart
Restart=on-failure
RestartSec=10

[Install]
WantedBy=multi-user.target

-norestart leaves restarting to systemd instead of the hlds_run script. Enable the service:

sudo systemctl daemon-reload
sudo systemctl enable --now cs16
sudo journalctl -u cs16 -f

The server now starts at every boot and comes back within 10 seconds if it crashes. Valve rarely updates HLDS; when an update comes out, stop the service and run the SteamCMD command from step 2 again (without validate). For user and file management, see our server management commands article.

7. Admin rights and plugins with AMX Mod X

For in-game kicking, banning, map changes and votes, the standard plugin platform for CS 1.6 is AMX Mod X, which runs on top of Metamod. The general steps are:

  1. Install Metamod (or an actively maintained fork of it) into cstrike/addons/metamod/ and change the gamedll_linux line in cstrike/liblist.gam to point at Metamod's .so file.
  2. Download the Linux Base Package and Counter-Strike Addon from amxmodx.org and extract them into cstrike/.
  3. Add the line linux addons/amxmodx/dlls/amxmodx_mm_i386.so to cstrike/addons/metamod/plugins.ini.
  4. To make yourself an admin, add your Steam ID to cstrike/addons/amxmodx/configs/users.ini:
"STEAM_0:1:12345678" "" "abcdefghijklmnopqrstu" "ce"

File paths and version compatibility depend on the Metamod build you use, so follow each project's official documentation. After restarting the server, the console commands meta list and amxx plugins show whether the plugins loaded. Only install plugins from sources you trust: .amxx files of unknown origin can open a backdoor into your server.

Security

Never share the RCON password; RCON gives full control of the server. Use SSH keys instead of passwords, keep the system updated and do not run the server as root. See our Linux server security guide for the basics.

TürkiyeVPS game servers for CS 1.6

Our game server plans are in Istanbul and come with dedicated vCPUs on an Intel Core i5-10400F, guaranteed RAM, 60–100 GB of disk, your own IPv4 address, unmetered speed, 3 TB of traffic per month and root access; the server is set up automatically after payment. Because CS 1.6 is light, the smallest plan, Oyun VDS 1 (2 vCPUs, 2 GB RAM, 60 GB disk), is enough for a standard 20–32 player server; if you want to run several CS 1.6 servers or heavy mods on the same machine, Oyun VDS 2 with 4 GB RAM gives more room. Our standard VPS plans do not include a dedicated public IPv4 address, so they are not suitable for a game server that players connect to directly. Payments are made in USDT (TRC20). For the newer game, see our CS2 server guide.

Frequently Asked Questions

Is it free to host a CS 1.6 server?

HLDS is free and is downloaded anonymously with SteamCMD. Unlike CS2, a CS 1.6 server does not need a Game Server Login Token (GSLT). You only pay for the machine the server runs on.

How much RAM does a CS 1.6 server need?

A standard 20–32 player server runs in a few hundred MB. With plugins and custom mods, 1–2 GB is comfortable. Single-core stability and a public IP address matter more than RAM.

SteamCMD says "state is 0x... after update job". What should I do?

This is common when installing HLDS. Run the same app_update 90 validate command a few more times until you see the Success! line. Also check that you have enough free disk space with df -h.

My server is not in the list or players cannot connect. What should I do?

First check with sudo ufw status that port 27015/UDP is open, then make sure the start command includes +sv_lan 0. The server must have a public IPv4 address. If the console shows a steamclient.so error, create the link from step 2 (~/.steam/sdk32).

Can I add bots?

The Steam version of CS 1.6 has no built-in bots; bots are added with community-made Metamod plugins. Each bot adds a little CPU load.