Files
ql-lg-server/docs/ADMIN.md
T
esefandClaude Opus 5.5 bc5bd09c15 ql-lg-server: Quake Live LG vampiric practice server in Docker
One-command setup (SteamCMD + minqlx build), .env settings with a
listed/unlisted switch, three factories (lgvamp, lgvamp_nolag, lgvamp100),
warmup-text and welcome minqlx plugins, watchdog/backup/daily-restart,
docs for admins and players.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-08 01:39:43 +03:00

69 lines
3.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Running the server
Everything below is run from the repo folder on the server machine.
## Console (RCON)
`./rcon <command>` runs one server command; `./rcon` alone opens a `ql>` prompt (Ctrl+D quits). It runs inside the container and reads `secrets/rcon-password.txt` itself, so you never type the password. RCON listens on 127.0.0.1 only, so nobody can reach it from outside the machine.
| Command | |
|---|---|
| `status` | players with their slot number (`num`), ping, address (`bot` = bot) |
| `say <text>` | message to everyone |
| `addbot hunter 5` | add a bot (names: hunter, anarki, hossman, …; skill 1–5) |
| `kick allbots` | remove all bots (prints a harmless "Player allbots is not on the server") |
| `clientkick <num>` | kick a player |
| `mute <num>` / `unmute <num>` | chat mute |
| `tempban <num>` | kick + ban until the map changes |
| `ban <num>` / `unban <num>` | permanent ban (stored in `access.txt`) |
| `addadmin <num>` / `addmod <num>` | give a connected player admin / mod rights |
| `reload_access` | re-read `access.txt` |
| `map thunderstruck lgvamp` | reload the map (or switch factory: `lgvamp_nolag`, `lgvamp100`) |
**Careful:** `cvarlist` prints the RCON password into the server log. `./rcon` hides it from you, but avoid running it anyway.
## Admins and bans: `home/baseq3/access.txt`
One line per player: their 64-bit Steam ID, a `|`, and `admin`, `mod` or `ban`:
```
76561198000000000|admin
76561198000000001|ban
```
Quake Live writes this file back from memory on every map load and on shutdown, so a hand edit can be overwritten. Either use the console commands above (`addadmin`, `ban`, `unban`), or edit the file and run `./rcon reload_access` right away. To unban someone who isn't connected, delete their line and run `reload_access`.
## Settings changes
- `.env` (name, password, listed, factory, welcome text, ports): edit it, then run `docker compose up -d`.
- Gameplay: edit `home/baseq3/scripts/lgvamp.factories` (must stay valid JSON: `python3 -m json.tool home/baseq3/scripts/lgvamp.factories`), then run `docker compose restart`.
- A cvar changed over RCON (e.g. `./rcon timelimit 1`) lasts until the next restart, map changes included.
## Self-healing (`./scripts/install-cron.sh`)
| What | When | Log |
|---|---|---|
| crash restart | Docker (`restart: unless-stopped`) | `docker inspect -f '{{.RestartCount}}' ql-lg` |
| hang watchdog: 3 failed checks in a row → restart | every 5 min | `logs/watchdog.log` |
| backup of `.env`, secrets, access.txt, cfgs, plugins (14 days) | 04:40 | `backups/` |
| daily restart, skipped while a human is on | 05:00 | `logs/watchdog.log` |
`./scripts/install-cron.sh --remove` removes those cron lines. A `docker compose stop` is respected: the watchdog leaves a stopped server alone.
## Updates
- Game: `./setup.sh --update`, then `docker compose restart`. If a game update ever removes `server/run_server_x64_minqlx.sh`, plain `./setup.sh` copies it back.
- This repo: `git pull`, then `./setup.sh` (re-running it is safe: it keeps your `.env`, password and game files).
## More than one server
Clone the repo into a second folder. Before running `./setup.sh`, create `.env` there from `.env.example` with a different `QL_PORT`, `QL_RCON_PORT` and `QL_NAME` (e.g. `27961`, `28961`, `ql-lg-2`). Each folder downloads its own game files (~1.1 GB). Each server costs about 3% of a CPU core while idle.
## Logs
`docker logs --tail 50 ql-lg` (your `QL_NAME`). minqlx log: `home/minqlx.log`. Lines with the RCON password are filtered out before they reach `docker logs`, but treat logs as private anyway.
## Without minqlx
If minqlx ever breaks after a game update, change `run_server_x64_minqlx.sh` to `run_server_x64.sh` in `docker-compose.yml` and run `docker compose up -d`. Everything still works except that the warmup text ("The match will begin when more players join") comes back and there's no welcome message.