From 7bac34c8867dafddd28f73e9dabb8e58824bb3cc Mon Sep 17 00:00:00 2001 From: mwiegand Date: Tue, 5 May 2026 23:30:34 +0200 Subject: [PATCH] docs(l4d2): document host prerequisites --- components/l4d2-host-lib/README.md | 45 ++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/components/l4d2-host-lib/README.md b/components/l4d2-host-lib/README.md index 9ac4dac..7969300 100644 --- a/components/l4d2-host-lib/README.md +++ b/components/l4d2-host-lib/README.md @@ -23,6 +23,51 @@ The host library uses hard-coded runtime paths under `/opt/l4d2`: - `/opt/l4d2/instances/` - `/opt/l4d2/runtime//{upper,work,merged}` +## Host Prerequisites + +The host library intentionally does not install or preflight runtime dependencies. The target host must provide them before running `l4d2ctl`. + +Validated on Debian 13 during the `ckn@10.0.4.128` smoke test: + +- Python 3.12+ with virtualenv/pip tooling for installing `l4d2host`. +- `steamcmd` available on `PATH` and able to self-update as the runtime user. +- 32-bit compatibility libraries for SteamCMD on amd64 Debian: `libc6-i386`, `lib32gcc-s1`, `lib32stdc++6`. +- `fuse-overlayfs` and `fusermount3` for per-instance overlay mounts. +- `systemctl --user` and `journalctl --user` available for the runtime user. +- User lingering enabled when services must survive SSH sessions: `sudo loginctl enable-linger `. +- `/opt/l4d2` created and writable by the runtime user. + +Example Debian setup: + +```bash +sudo apt-get update +sudo apt-get install -y \ + python3 python3-venv python3-pip \ + curl ca-certificates tar gzip \ + fuse-overlayfs fuse3 \ + libc6-i386 lib32gcc-s1 lib32stdc++6 + +sudo mkdir -p /opt/steamcmd /opt/l4d2/{installation,overlays,instances,runtime} +sudo chown -R "$USER:$USER" /opt/steamcmd /opt/l4d2 +sudo loginctl enable-linger "$USER" +``` + +SteamCMD should be installed so the runtime user can update it. If installing from Valve's tarball, avoid symlinking `steamcmd.sh` directly because it derives its install root from `$0`. Use a wrapper instead: + +```bash +curl -fsSL https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz -o /tmp/steamcmd_linux.tar.gz +tar -xzf /tmp/steamcmd_linux.tar.gz -C /opt/steamcmd +sudo tee /usr/local/bin/steamcmd >/dev/null <<'EOF' +#!/bin/sh +exec /opt/steamcmd/steamcmd.sh "$@" +EOF +sudo chmod 755 /usr/local/bin/steamcmd +chmod 755 /opt/steamcmd/steamcmd.sh /opt/steamcmd/linux32/steamcmd +steamcmd +quit +``` + +`uv` is optional deployment tooling. Debian 13 did not provide an `uv` package during the smoke test, so install it explicitly if you want to use it for faster virtualenv/dependency setup. `l4d2ctl` does not require `uv` at runtime. + ## Web App Read APIs These read APIs are provided for web app integration: