How to Set Up HLTV on Linux for CS 1.6

May 21, 2025 Daemon666 8 min read 272 visualizações

HLTV is Valve's spectator proxy — the hltv binary that ships alongside the dedicated server tools. It connects to your game server as a special spectator client, buffers the match with a configurable delay, relays it to viewers on its own proxy port, and records the whole thing to a demo. On Linux it runs as a separate process from HLDS, so you set it up much like a second server. This guide covers a headless Linux install.

1. Locate the hltv binary

HLTV is bundled with the HLDS install you already have. If you followed the SteamCMD dedicated-server guide, the binary sits in the root of the install next to hlds_run:

cd ~/hlds
ls -l hltv hltv_run

hltv is the engine binary; hltv_run is the wrapper that restarts it if it crashes, mirroring how hlds_run wraps hlds_linux. If they are missing, re-run the SteamCMD app_update 90 — HLTV is part of app 90, not a separate download.

2. Understand the two ports

HLTV uses two endpoints. It connects out to your game server on its normal port (27015), and it listens on its own proxy port — default UDP 27020 — where spectators connect to watch. Those spectators never touch the game server directly; they only ever see the delayed HLTV feed. Keep 27020 open in your firewall if you want external viewers.

3. Launch HLTV and reach its console

Start it with the wrapper. Because it is interactive, run it inside screen or tmux so you can detach:

screen -S hltv
./hltv_run

You are dropped into the HLTV console, a stripped-down server console. Everything below is typed here. Detach the screen with Ctrl-A then D and it keeps running.

4. Connect to your server

From the HLTV console, name the proxy and connect to the running game server:

name "CSB TV"
connect 127.0.0.1:27015

If the game server is on the same box use 127.0.0.1; otherwise use its LAN or public address. Once connected, HLTV occupies one spectator slot on the game server and begins relaying. Type status to confirm it is receiving.

5. Set delay, rate and slots

The three cvars that matter are the broadcast delay, the bandwidth cap, and the viewer limit:

delay 30
maxrate 10000
maxclients 32

delay is the number of seconds HLTV holds the feed before showing it — 30 to 90 is normal, and it is what stops spectators ghosting live positions to players. maxrate caps per-viewer bandwidth. maxclients is how many spectators the proxy accepts.

6. Persist settings in hltv.cfg

HLTV executes hltv.cfg from the install root at startup, exactly like server.cfg for the game server:

// hltv.cfg
name "CSB TV"
delay 30
maxrate 10000
maxclients 32
serverport 27020
rcon_password "changeme"

Reload it live with exec hltv.cfg, then connect by hand as in step 4.

7. Record a demo

Because HLTV sees every player, its demo is the closest thing CS 1.6 has to a whole-match server recording:

record match_2026_07_15
stop

The .dem lands in the HLTV directory and plays back in a normal client with viewdemo. To automate this per map, the CSB HLTV Autorecord plugin starts and names a recording at the start of every map so you never forget to hit record.

Troubleshooting

  • "Couldn't get info from server" / connect times out — the game server has sv_lan 1, a password, or is unreachable. HLTV connects like any client and obeys the same rules; set sv_lan 0 or give HLTV the password with password xxx before connect.
  • Server rejects HLTV: no free slots — HLTV needs a spectator slot on the game server. Raise maxplayers there, or set sv_proxies 1 so the server allows a proxy to attach.
  • Viewers cannot connect to 27020 — the proxy port is firewalled. Open UDP 27020, and confirm serverport in hltv.cfg matches what you told viewers.
  • Spectators can call live positionsdelay is 0 or too low. Raise it to 30 or more so the feed lags real time.

Verification

With HLTV connected, run status in its console and confirm it lists the game server and a growing set of players. From a client, open the console and connect <hltv-ip>:27020 — you should join as a spectator and see play lagged by your delay. Record a short demo, stop, and confirm the .dem exists in the HLTV folder and opens with viewdemo. Once that round-trip works, detach the screen and HLTV keeps relaying and recording unattended.

Colaboradores: Daemon666 ✦
Compartilhar: