Files
cs16-dm-server/README.md
T
esefandClaude Opus 5.5 7e9cbee14d cs16-dm-server: CS 1.6 deathmatch server in Docker
One-command setup (SteamCMD + pinned, checksum-verified ReHLDS / ReGameDLL /
Metamod-R / AMXX / ReAPI / ReUnion / CSDM-ReAPI / YaPB / GunGame), .env
settings, ./cs menu (map, DM/GunGame mode, bots, kill counter, restart,
update), own plugins (extras, rtv, mode switch), all-time kill counter,
watchdog + nightly backup, docs for admins and players.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-11 05:03:07 +03:00

120 lines
6.7 KiB
Markdown

# cs16-dm-server
A **Counter-Strike 1.6 deathmatch server** in Docker. One command sets it up, and a menu runs it.
Free-for-all deathmatch: instant respawn, a gun menu, no rounds, everyone against everyone. Switch to **GunGame** any time. Bots keep it busy when nobody's on, and they leave as people join. Your friends can join with the Steam version or a non-Steam client.
- **One command:** `./setup.sh` asks 5 questions, then downloads the game (SteamCMD) and the mods (pinned versions, checksum-verified), compiles the plugins and starts the server.
- **One menu:** `./cs` shows status, and lets you change the map, switch DM ↔ GunGame, set the bot count, see the kill counter, restart, or update. No console commands to memorize.
- **Game feel:** damage numbers, killstreak and multikill announcer (Quake/UT voices), headshot and knife sounds, +HP per kill, a K/D/streak HUD line, rock-the-vote (`rtv`), `/rank` and `/top15` stats.
- **All-time kill counter** (`./kills`), with top fraggers and favourite weapons. Bots count too, so it climbs fast.
- **Recovers on its own:** Docker restarts the server after a crash, a watchdog restarts it if it hangs, and backups run nightly.
Built on ReHLDS + ReGameDLL + Metamod-R + AMX Mod X + ReAPI + ReUnion + CSDM-ReAPI + YaPB + GunGame. Details: [docs/HOW-IT-WORKS.md](docs/HOW-IT-WORKS.md).
## Quick start
You need:
- a Linux machine on x86-64 (the game server is 32-bit x86, so no Raspberry Pi or other ARM; any small box or VPS works: with 6 bots the server uses ~10% of one core and ~100 MB of RAM)
- [Docker with the compose plugin](https://docs.docker.com/engine/install/)
- `git` and `python3`
- ~1.5 GB of disk
```sh
git clone https://git.userevolt.app/esef/cs16-dm-server.git
cd cs16-dm-server
./setup.sh # asks: server name, join password, port, mode, bots
./scripts/install-cron.sh # optional but recommended: watchdog + nightly backup
```
Run it as a normal user in the `docker` group, not as root. When setup finishes it prints the `connect` addresses.
### Letting people in from the internet
Pick one:
- **Port forward:** forward **UDP 27015** (your `CS_PORT`) on your router to this machine. Players use `connect <your public IP>:27015`.
- **No port forwarding** (CGNAT, dorm, mobile internet): make a free [playit.gg](https://playit.gg) account, install their agent on this machine, and add a tunnel. Choose type **UDP** and local address `127.0.0.1:27015`. Players then use the address playit gives you, for example `connect something.ply.gg:12345`. Every player arrives from playit's IP, and the server is set up for that: `sv_rehlds_maxclients_from_single_ip 16`, short RCON bans. Never ban players by IP, because an IP ban would kick everyone.
- **Just friends:** a VPN like Tailscale or ZeroTier. Everyone joins with `connect <vpn IP>:27015`.
How players join, Steam or not: [docs/PLAYERS.md](docs/PLAYERS.md).
## Running it
```
./cs menu: pick a number
./cs status who's on, map, mode
./cs map de_inferno change map
./cs mode gg GunGame (./cs mode dm = back to deathmatch; the mode is remembered)
./cs bots 6 fill up to 6 players with bots (0 = none; saved in .env)
./cs kills all-time kill counter
./rcon server console (./rcon <command> for one command)
```
For admins, maps, fast downloads, several servers and backups, see [docs/ADMIN.md](docs/ADMIN.md).
## Settings
The basics live in `.env` (created from [`.env.example`](.env.example) by setup). After editing it, run `./cs apply`, which is the same as `docker compose up -d`.
| Setting | Default | |
|---|---|---|
| `CS_HOSTNAME` | `CS 1.6 Deathmatch` | name in the server browser |
| `CS_PASSWORD` | empty | join password; empty = open server |
| `CS_MAXPLAYERS` | `16` | |
| `CS_PORT` | `27015` | game port (UDP) |
| `CS_MAP` | `de_dust2` | first map; after that `hlds/cstrike/mapcycle.txt` |
| `CS_MODE` | `dm` | starting mode, `dm` or `gg` (first install only; after that use `./cs mode`) |
| `CS_BOTS` | `6` | bots fill the server up to this many players; `0` = no bots |
| `CS_BOT_DIFFICULTY` | `2` | `0` easy … `4` expert |
| `CS_NAME` | `cs16` | Docker container name |
Everything else goes in **`hlds/cstrike/custom.cfg`**. It runs after `server.cfg` on every map and setup never overwrites it. Examples are inside: time limit, alltalk, the extras' HP-per-kill and sounds.
### What the modes are
| | Deathmatch (`dm`) | GunGame (`gg`) |
|---|---|---|
| Plugin | CSDM-ReAPI | GunGame 2.13c |
| Respawn | 0.7 s, 2 s spawn protection | 1 s |
| Weapons | gun menu on spawn | glock → pistols → shotguns → SMGs → rifles → M249 → HE → knife, 2 kills per level |
| Teams | free for all | free for all |
| Map | 20 min | 30 min, 30 s knife warmup |
Both use the DM spawn points for the 11 stock maps in the default mapcycle. To add your own maps, see [docs/ADMIN.md](docs/ADMIN.md).
## Layout
```
setup.sh install / re-run / --update
cs, rcon, kills menu, console, kill counter
.env.example settings template (.env is yours, not in git)
docker-compose.yml the container; Dockerfile = Debian + 32-bit libs + SteamCMD
cstrike/ configs copied into the game on every setup (server.cfg, plugin lists, GunGame cfg)
defaults/ mapcycle.txt + custom.cfg, copied once and then yours
plugins/ source of the own plugins (extras, rtv, mode switch), compiled by setup
tools/ versions.txt (pinned downloads + sha256), install-addons.sh, start.sh, hlq.py
scripts/ watchdog, backup, install-cron
hlds/ the game server (downloaded; maps, logs, stats live here)
```
## Updating
`git pull && ./setup.sh` picks up new configs and plugins. `./setup.sh --update` also updates the game from Steam. Neither changes your `.env`, secrets, admins (`users.ini`), `mapcycle.txt`, `custom.cfg`, CSDM `config.ini`, stats or the kill counter.
## Credits
Downloaded by setup from their own projects (not part of this repo):
- [ReHLDS](https://github.com/rehlds/ReHLDS), [ReGameDLL_CS](https://github.com/rehlds/ReGameDLL_CS), [Metamod-R](https://github.com/rehlds/Metamod-R), [ReAPI](https://github.com/rehlds/ReAPI), [ReUnion](https://github.com/rehlds/ReUnion)
- [AMX Mod X](https://www.amxmodx.org)
- [CSDM-ReAPI](https://github.com/wopox1337/CSDM-ReAPI)
- [YaPB](https://github.com/yapb/yapb)
- [GunGame by Avalanche](https://github.com/fysiks1/amxx-gungame_cstrike)
- DM spawn points from [CSDM 2.1 by Arkshine](https://github.com/Arkshine/CSDM)
- announcer sounds from [hpoon/HLDS-CS1.6](https://github.com/hpoon/HLDS-CS1.6)
Counter-Strike is Valve's. The game server files come from Steam (SteamCMD, anonymous login).
The scripts, configs and plugins in this repo are MIT licensed ([LICENSE](LICENSE)).